Microsoft.ServiceFabric clusters/applications template reference

Template format

To create a Microsoft.ServiceFabric/clusters/applications resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.ServiceFabric/clusters/applications",
  "apiVersion": "2019-03-01",
  "location": "string",
  "tags": {},
  "properties": {
    "typeVersion": "string",
    "parameters": {},
    "upgradePolicy": {
      "upgradeReplicaSetCheckTimeout": "string",
      "forceRestart": "boolean",
      "rollingUpgradeMonitoringPolicy": {
        "failureAction": "string",
        "healthCheckWaitDuration": "string",
        "healthCheckStableDuration": "string",
        "healthCheckRetryTimeout": "string",
        "upgradeTimeout": "string",
        "upgradeDomainTimeout": "string"
      },
      "applicationHealthPolicy": {
        "considerWarningAsError": "boolean",
        "maxPercentUnhealthyDeployedApplications": "integer",
        "defaultServiceTypeHealthPolicy": {
          "maxPercentUnhealthyServices": "integer",
          "maxPercentUnhealthyPartitionsPerService": "integer",
          "maxPercentUnhealthyReplicasPerPartition": "integer"
        },
        "serviceTypeHealthPolicyMap": {}
      }
    },
    "minimumNodes": "integer",
    "maximumNodes": "integer",
    "removeApplicationCapacity": "boolean",
    "metrics": [
      {
        "name": "string",
        "maximumCapacity": "integer",
        "reservationCapacity": "integer",
        "totalApplicationCapacity": "integer"
      }
    ],
    "typeName": "string"
  },
  "resources": []
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.ServiceFabric/clusters/applications object

Name Type Required Value
name string Yes The name of the application resource.
type enum Yes applications
-or-
Microsoft.ServiceFabric/clusters/applications

See Set name and type for child resources.
apiVersion enum Yes 2019-03-01
location string No It will be deprecated in New API, resource location depends on the parent resource.
tags object No Azure resource tags.
properties object Yes The application resource properties. - ApplicationResourceProperties object
resources array No services

ApplicationResourceProperties object

Name Type Required Value
typeVersion string No The version of the application type as defined in the application manifest.
parameters object No List of application parameters with overridden values from their default values specified in the application manifest.
upgradePolicy object No Describes the policy for a monitored application upgrade. - ApplicationUpgradePolicy object
minimumNodes integer No The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property.
maximumNodes integer No The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. By default, the value of this property is zero and it means that the services can be placed on any node.
removeApplicationCapacity boolean No Remove the current application capacity settings.
metrics array No List of application capacity metric description. - ApplicationMetricDescription object
typeName string No The application type name as defined in the application manifest.

ApplicationUpgradePolicy object

Name Type Required Value
upgradeReplicaSetCheckTimeout string No The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer).
forceRestart boolean No If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).
rollingUpgradeMonitoringPolicy object No The policy used for monitoring the application upgrade - ArmRollingUpgradeMonitoringPolicy object
applicationHealthPolicy object No Defines a health policy used to evaluate the health of an application or one of its children entities. - ArmApplicationHealthPolicy object

ApplicationMetricDescription object

Name Type Required Value
name string No The name of the metric.
maximumCapacity integer No The maximum node capacity for Service Fabric application.This is the maximum Load for an instance of this application on a single node. Even if the capacity of node is greater than this value, Service Fabric will limit the total load of services within the application on each node to this value.If set to zero, capacity for this metric is unlimited on each node.When creating a new application with application capacity defined, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.When updating existing application with application capacity, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.
reservationCapacity integer No The node reservation capacity for Service Fabric application.This is the amount of load which is reserved on nodes which have instances of this application.If MinimumNodes is specified, then the product of these values will be the capacity reserved in the cluster for the application.If set to zero, no capacity is reserved for this metric.When setting application capacity or when updating application capacity; this value must be smaller than or equal to MaximumCapacity for each metric.
totalApplicationCapacity integer No The total metric capacity for Service Fabric application.This is the total metric capacity for this application in the cluster. Service Fabric will try to limit the sum of loads of services within the application to this value.When creating a new application with application capacity defined, the product of MaximumNodes and MaximumCapacity must always be smaller than or equal to this value.

ArmRollingUpgradeMonitoringPolicy object

Name Type Required Value
failureAction enum No The activation Mode of the service package. - Rollback or Manual
healthCheckWaitDuration string No The amount of time to wait after completing an upgrade domain before applying health policies. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.
healthCheckStableDuration string No The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.
healthCheckRetryTimeout string No The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.
upgradeTimeout string No The amount of time the overall upgrade has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.
upgradeDomainTimeout string No The amount of time each upgrade domain has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.

ArmApplicationHealthPolicy object

Name Type Required Value
considerWarningAsError boolean No Indicates whether warnings are treated with the same severity as errors.
maxPercentUnhealthyDeployedApplications integer No The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100.The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error.This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster.The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.
defaultServiceTypeHealthPolicy object No The health policy used by default to evaluate the health of a service type. - ArmServiceTypeHealthPolicy object
serviceTypeHealthPolicyMap object No The map with service type health policy per service type name. The map is empty by default.

ArmServiceTypeHealthPolicy object

Name Type Required Value
maxPercentUnhealthyServices integer No The maximum percentage of services allowed to be unhealthy before your application is considered in error.
maxPercentUnhealthyPartitionsPerService integer No The maximum percentage of partitions per service allowed to be unhealthy before your application is considered in error.
maxPercentUnhealthyReplicasPerPartition integer No The maximum percentage of replicas per partition allowed to be unhealthy before your application is considered in error.