Microsoft.ServiceFabric managedclusters/applications 2021-05-01

Template format

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

{
  "name": "string",
  "type": "Microsoft.ServiceFabric/managedclusters/applications",
  "apiVersion": "2021-05-01",
  "location": "string",
  "tags": {},
  "systemData": {
    "createdBy": "string",
    "createdByType": "string",
    "lastModifiedAt": "string"
  },
  "identity": {
    "type": "string",
    "userAssignedIdentities": {}
  },
  "properties": {
    "version": "string",
    "parameters": {},
    "upgradePolicy": {
      "applicationHealthPolicy": {
        "considerWarningAsError": "boolean",
        "maxPercentUnhealthyDeployedApplications": "integer",
        "defaultServiceTypeHealthPolicy": {
          "maxPercentUnhealthyServices": "integer",
          "maxPercentUnhealthyPartitionsPerService": "integer",
          "maxPercentUnhealthyReplicasPerPartition": "integer"
        },
        "serviceTypeHealthPolicyMap": {}
      },
      "forceRestart": "boolean",
      "rollingUpgradeMonitoringPolicy": {
        "failureAction": "string",
        "healthCheckWaitDuration": "string",
        "healthCheckStableDuration": "string",
        "healthCheckRetryTimeout": "string",
        "upgradeTimeout": "string",
        "upgradeDomainTimeout": "string"
      },
      "instanceCloseDelayDuration": "integer",
      "upgradeMode": "string",
      "upgradeReplicaSetCheckTimeout": "integer",
      "recreateApplication": "boolean"
    },
    "managedIdentities": [
      {
        "name": "string",
        "principalId": "string"
      }
    ]
  },
  "resources": []
}

Property values

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

Microsoft.ServiceFabric/managedclusters/applications object

Note

In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.

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

See Set name and type for child resources.
apiVersion enum Yes For JSON - 2021-05-01
location string No Resource location depends on the parent resource.
tags object No Azure resource tags.
systemData object No SystemData object
identity object No ManagedIdentity object
properties object Yes ApplicationResourceProperties object
resources array No services

SystemData object

Name Type Required Value
createdBy string No The identity that created the resource.
createdByType string No The type of identity that created the resource.
lastModifiedAt string No The timestamp of resource last modification (UTC).

ManagedIdentity object

Name Type Required Value
type enum No None, SystemAssigned, UserAssigned, SystemAssigned, UserAssigned
userAssignedIdentities object No The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

ApplicationResourceProperties object

Name Type Required Value
version string No The version of the application type as defined in the application manifest. This name must be the full Arm Resource ID for the referenced application type version.
parameters object No List of application parameters with overridden values from their default values specified in the application manifest.
upgradePolicy object No ApplicationUpgradePolicy object
managedIdentities array No List of user assigned identities for the application, each mapped to a friendly name. - ApplicationUserAssignedIdentity object

ApplicationUpgradePolicy object

Name Type Required Value
applicationHealthPolicy object No ApplicationHealthPolicy object
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 RollingUpgradeMonitoringPolicy object
instanceCloseDelayDuration integer No Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description.
upgradeMode enum No Monitored or UnmonitoredAuto
upgradeReplicaSetCheckTimeout integer 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).
recreateApplication boolean No Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed.

ApplicationUserAssignedIdentity object

Name Type Required Value
name string Yes The friendly name of user assigned identity.
principalId string Yes The principal id of user assigned identity.

ApplicationHealthPolicy object

Name Type Required Value
considerWarningAsError boolean Yes Indicates whether warnings are treated with the same severity as errors.
maxPercentUnhealthyDeployedApplications integer Yes 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. - ServiceTypeHealthPolicy object
serviceTypeHealthPolicyMap object No The map with service type health policy per service type name. The map is empty by default.

RollingUpgradeMonitoringPolicy object

Name Type Required Value
failureAction enum Yes The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. - Rollback or Manual
healthCheckWaitDuration string Yes The amount of time to wait after completing an upgrade domain before applying health policies. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff".
healthCheckStableDuration string Yes The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff".
healthCheckRetryTimeout string Yes The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff".
upgradeTimeout string Yes The amount of time the overall upgrade has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff".
upgradeDomainTimeout string Yes The amount of time each upgrade domain has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff".

ServiceTypeHealthPolicy object

Name Type Required Value
maxPercentUnhealthyServices integer Yes The maximum allowed percentage of unhealthy services.The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error.If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning.This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type.The computation rounds up to tolerate one failure on small numbers of services.
maxPercentUnhealthyPartitionsPerService integer Yes The maximum allowed percentage of unhealthy partitions per service.The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error.If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning.The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service.The computation rounds up to tolerate one failure on small numbers of partitions.
maxPercentUnhealthyReplicasPerPartition integer Yes The maximum allowed percentage of unhealthy replicas per partition.The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error.If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning.The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition.The computation rounds up to tolerate one failure on small numbers of replicas.