你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.ServiceFabric clusters/applications

Bicep 资源定义

群集/应用程序资源类型可以通过针对以下操作进行部署:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ServiceFabric/clusters/applications 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.ServiceFabric/clusters/applications@2023-11-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  parent: resourceSymbolicName
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  properties: {
    managedIdentities: [
      {
        name: 'string'
        principalId: 'string'
        name: 'string'
        principalId: 'string'
      }
    ]
    maximumNodes: int
    metrics: [
      {
        maximumCapacity: int
        name: 'string'
        reservationCapacity: int
        totalApplicationCapacity: int
      }
    ]
    minimumNodes: int
    parameters: {
      {customized property}: 'string'
    }
    removeApplicationCapacity: bool
    typeName: 'string'
    typeVersion: 'string'
    upgradePolicy: {
      applicationHealthPolicy: {
        considerWarningAsError: bool
        defaultServiceTypeHealthPolicy: {
          maxPercentUnhealthyPartitionsPerService: int
          maxPercentUnhealthyReplicasPerPartition: int
          maxPercentUnhealthyServices: int
        }
        maxPercentUnhealthyDeployedApplications: int
        serviceTypeHealthPolicyMap: {
          {customized property}: {
            maxPercentUnhealthyPartitionsPerService: int
            maxPercentUnhealthyReplicasPerPartition: int
            maxPercentUnhealthyServices: int
          }
        }
      }
      forceRestart: bool
      recreateApplication: bool
      rollingUpgradeMonitoringPolicy: {
        failureAction: 'string'
        healthCheckRetryTimeout: 'string'
        healthCheckStableDuration: 'string'
        healthCheckWaitDuration: 'string'
        upgradeDomainTimeout: 'string'
        upgradeTimeout: 'string'
      }
      upgradeMode: 'string'
      upgradeReplicaSetCheckTimeout: 'string'
      applicationHealthPolicy: {
        defaultServiceTypeHealthPolicy: {
          maxPercentUnhealthyServices: int
          maxPercentUnhealthyPartitionsPerService: int
          maxPercentUnhealthyReplicasPerPartition: int
          maxPercentUnhealthyServices: int
        }
        serviceTypeHealthPolicies: {
          {customized property}: {
            maxPercentUnhealthyServices: int
            maxPercentUnhealthyPartitionsPerService: int
            maxPercentUnhealthyReplicasPerPartition: int
            maxPercentUnhealthyServices: int
          }
        }
        considerWarningAsError: bool
        defaultServiceTypeHealthPolicy: {
          maxPercentUnhealthyServices: int
          maxPercentUnhealthyPartitionsPerService: int
          maxPercentUnhealthyReplicasPerPartition: int
          maxPercentUnhealthyServices: int
        }
        maxPercentUnhealthyDeployedApplications: int
        serviceTypeHealthPolicyMap: {
          {customized property}: {
            maxPercentUnhealthyServices: int
            maxPercentUnhealthyPartitionsPerService: int
            maxPercentUnhealthyReplicasPerPartition: int
            maxPercentUnhealthyServices: int
          }
        }
      }
      forceRestart: bool
      instanceCloseDelayDuration: int
      recreateApplication: bool
      rollingUpgradeMonitoringPolicy: {
        failureAction: 'string'
        healthCheckRetryTimeout: 'string'
        healthCheckStableDuration: 'string'
        healthCheckWaitDuration: 'string'
        upgradeDomainTimeout: 'string'
        upgradeTimeout: 'string'
      }
      upgradeMode: 'string'
      upgradeReplicaSetCheckTimeout: int
    }
    managedIdentities: [
      {
        name: 'string'
        principalId: 'string'
        name: 'string'
        principalId: 'string'
      }
    ]
    parameters: {
      {customized property}: 'string'
    }
    upgradePolicy: {
      applicationHealthPolicy: {
        considerWarningAsError: bool
        defaultServiceTypeHealthPolicy: {
          maxPercentUnhealthyPartitionsPerService: int
          maxPercentUnhealthyReplicasPerPartition: int
          maxPercentUnhealthyServices: int
        }
        maxPercentUnhealthyDeployedApplications: int
        serviceTypeHealthPolicyMap: {
          {customized property}: {
            maxPercentUnhealthyPartitionsPerService: int
            maxPercentUnhealthyReplicasPerPartition: int
            maxPercentUnhealthyServices: int
          }
        }
      }
      forceRestart: bool
      recreateApplication: bool
      rollingUpgradeMonitoringPolicy: {
        failureAction: 'string'
        healthCheckRetryTimeout: 'string'
        healthCheckStableDuration: 'string'
        healthCheckWaitDuration: 'string'
        upgradeDomainTimeout: 'string'
        upgradeTimeout: 'string'
      }
      upgradeMode: 'string'
      upgradeReplicaSetCheckTimeout: 'string'
      applicationHealthPolicy: {
        defaultServiceTypeHealthPolicy: {
          maxPercentUnhealthyServices: int
          maxPercentUnhealthyPartitionsPerService: int
          maxPercentUnhealthyReplicasPerPartition: int
          maxPercentUnhealthyServices: int
        }
        serviceTypeHealthPolicies: {
          {customized property}: {
            maxPercentUnhealthyServices: int
            maxPercentUnhealthyPartitionsPerService: int
            maxPercentUnhealthyReplicasPerPartition: int
            maxPercentUnhealthyServices: int
          }
        }
        considerWarningAsError: bool
        defaultServiceTypeHealthPolicy: {
          maxPercentUnhealthyServices: int
          maxPercentUnhealthyPartitionsPerService: int
          maxPercentUnhealthyReplicasPerPartition: int
          maxPercentUnhealthyServices: int
        }
        maxPercentUnhealthyDeployedApplications: int
        serviceTypeHealthPolicyMap: {
          {customized property}: {
            maxPercentUnhealthyServices: int
            maxPercentUnhealthyPartitionsPerService: int
            maxPercentUnhealthyReplicasPerPartition: int
            maxPercentUnhealthyServices: int
          }
        }
      }
      forceRestart: bool
      instanceCloseDelayDuration: int
      recreateApplication: bool
      rollingUpgradeMonitoringPolicy: {
        failureAction: 'string'
        healthCheckRetryTimeout: 'string'
        healthCheckStableDuration: 'string'
        healthCheckWaitDuration: 'string'
        upgradeDomainTimeout: 'string'
        upgradeTimeout: 'string'
      }
      upgradeMode: 'string'
      upgradeReplicaSetCheckTimeout: int
    }
    version: 'string'
  }
}

属性值

clusters/applications

名称 说明
name 资源名称

了解如何在 Bicep 中为子资源设置名称和类型。
字符串 (必需)
location 它将在新 API 中弃用,资源位置取决于父资源。 字符串
标记 Azure 资源标记。 标记名称和值的字典。 请参阅 模板中的标记
父级 (parent) 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源之外的子资源
类型为资源的符号名称: clusters
标识 介绍 Azure 资源的托管标识。 ManagedIdentity
properties 应用程序资源属性。 ApplicationResourceProperties

ManagedIdentity

名称 说明 Value
type 资源的托管标识类型。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识字典密钥引用将采用以下格式的 ARM 资源 ID:
“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。
UserAssignedIdentityMap
类型 资源的托管标识类型。 “None”
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识字典密钥引用将采用以下格式的 ARM 资源 ID:
“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。
UserAssignedIdentityMap

UserAssignedIdentityMap

名称 说明
{customized property} UserAssignedIdentity

UserAssignedIdentity

此对象不包含在部署期间要设置的任何属性。 所有属性均为 ReadOnly。

ApplicationResourceProperties

名称 说明
managedIdentities 应用程序的用户分配标识列表,每个标识都映射到一个友好名称。 ApplicationUserAssignedIdentity[]
maximumNodes Service Fabric 为此应用程序保留的容量的最大节点数。 请注意,这并不表示此应用程序的服务放置在所有这些节点上。 默认情况下,此属性的值为零,这意味着服务可以放置在任何节点上。 int

约束:
最小值 = 0
指标 应用程序容量指标说明的列表。 ApplicationMetricDescription[]
minimumNodes Service Fabric 为此应用程序保留的容量的最小节点数。 请注意,这并不表示此应用程序的服务放置在所有这些节点上。 如果此属性设置为零,则不会保留任何容量。 此属性的值不能超过 MaximumNodes 属性的值。 int

约束:
最小值 = 0
parameters 应用程序参数列表,其中包含应用程序清单中指定的默认值中重写的值。 ApplicationParameterList
removeApplicationCapacity 删除当前应用程序容量设置。 bool
typeName 应用程序清单中定义的应用程序类型名称。 字符串
typeVersion 应用程序清单中定义的应用程序类型的版本。 字符串
upgradePolicy 介绍受监视应用程序升级的策略。 ApplicationUpgradePolicy
managedIdentities 应用程序的用户分配标识列表,每个标识都映射到一个友好名称。 ApplicationUserAssignedIdentity[]
parameters 应用程序参数列表,其中包含应用程序清单中指定的默认值中重写的值。 ApplicationParameterList
upgradePolicy 介绍受监视应用程序升级的策略。 ApplicationUpgradePolicy
版本 应用程序清单中定义的应用程序类型的版本。
此名称必须是引用的应用程序类型版本的完整 Arm 资源 ID。
字符串

ApplicationUserAssignedIdentity

名称 说明
name 用户分配的标识的友好名称。 字符串 (必需)
principalId 用户分配的标识的主体 ID。 字符串 (必需)
name 用户分配的标识的友好名称。 字符串 (必需)
principalId 用户分配的标识的主体 ID。 字符串 (必需)

ApplicationMetricDescription

名称 说明
maximumCapacity Service Fabric 应用程序的最大节点容量。
这是单个节点上此应用程序实例的最大负载。 即使节点的容量大于此值,Service Fabric 也会将每个节点上应用程序内服务的总负载限制为此值。
如果设置为零,则此指标在每个节点上的容量不受限制。
创建定义了应用程序容量的新应用程序时,MaximumNodes 和此值的乘积必须始终小于或等于 TotalApplicationCapacity。
使用应用程序容量更新现有应用程序时,MaximumNodes 和此值的乘积必须始终小于或等于 TotalApplicationCapacity。
int
name 指标的名称。 字符串
reservationCapacity Service Fabric 应用程序的节点预留容量。
这是在具有此应用程序实例的节点上保留的负载量。
如果指定了 MinimumNodes,则这些值的乘积将是群集中为应用程序保留的容量。
如果设置为零,则不为此指标保留任何容量。
设置应用程序容量或更新应用程序容量时;对于每个指标,此值必须小于或等于 MaximumCapacity。
int
totalApplicationCapacity Service Fabric 应用程序的总指标容量。
这是群集中此应用程序的总指标容量。 Service Fabric 将尝试将应用程序中的服务负载之和限制为此值。
创建定义了应用程序容量的新应用程序时,MaximumNodes 和 MaximumCapacity 的乘积必须始终小于或等于此值。
int

ApplicationParameterList

名称 说明
{customized property} 字符串

ApplicationUpgradePolicy

名称 说明
applicationHealthPolicy 定义用于评估应用程序或其子实体之一的运行状况的运行状况策略。 ArmApplicationHealthPolicy
forceRestart 如果为 true,则在升级过程中强制重启进程,即使代码版本未更改, (升级仅更改配置或数据) 。 bool
recreateApplication 确定是否应在更新时重新创建应用程序。 如果 value=true,则不允许使用升级策略参数的其余参数,这将导致可用性丢失。 bool
rollingUpgradeMonitoringPolicy 用于监视应用程序升级的策略 ArmRollingUpgradeMonitoringPolicy
upgradeMode 在滚动升级期间用于监视运行状况的模式。 值为 UnmonitoredAuto、UnmonitoredManual 和 Monitored。 “无效”
“Monitored”
“UnmonitoredAuto”
“UnmonitoredManual”
upgradeReplicaSetCheckTimeout 出现意外问题时,阻止处理升级域并防止可用性丢失的最大时长。 当此超时到期时,无论是否存在可用性丢失问题,都将继续处理升级域。 每个升级域启动时重置超时。 有效值介于 0 和 42949672925(含)之间。 (无符号 32 位整数) 。 字符串
applicationHealthPolicy 定义用于评估应用程序或其子实体之一运行状况的运行状况策略。 ApplicationHealthPolicy
forceRestart 如果为 true,则在升级过程中强制重启进程,即使代码版本未更改 (升级仅更改配置或数据) 。 bool
instanceCloseDelayDuration 持续时间(以秒为单位),用于在关闭无状态实例之前等待,以允许活动请求正常排出。 当实例在应用程序/群集升级期间关闭时,这才有效,仅适用于在服务说明中配置了非零延迟持续时间的实例。 int
recreateApplication 确定是否应在更新时重新创建应用程序。 如果 value=true,则不允许使用其余的升级策略参数。 bool
rollingUpgradeMonitoringPolicy 用于监视应用程序升级的策略 RollingUpgradeMonitoringPolicy
upgradeMode 在滚动升级期间用于监视运行状况的模式。 值为 Monitored 和 UnmonitoredAuto。 “Monitored”
“UnmonitoredAuto”
upgradeReplicaSetCheckTimeout 出现意外问题时,阻止处理升级域并防止可用性丢失的最大时长。 当此超时到期时,无论是否存在可用性丢失问题,都将继续处理升级域。 每个升级域启动时重置超时。 有效值介于 0 和 42949672925(含)之间。 (无符号 32 位整数) 。 int

ArmApplicationHealthPolicy

名称 说明
considerWarningAsError 指示是否将警告的严重性视为与错误相同。 bool
defaultServiceTypeHealthPolicy 默认情况下用于评估服务类型的运行状况的运行状况策略。 ArmServiceTypeHealthPolicy
maxPercentUnhealthyDeployedApplications 允许的已部署的不正常应用程序的最大百分比。 允许的值为 0 到 100 的字节值。
该百分比表示在将应用程序视为错误之前可处于不正常状态的已部署应用程序的最大允许百分比。
这是通过将不正常的已部署应用程序数除以群集中应用程序当前部署在上的节点数计算得出的。
计算结果调高为整数,以便容忍少量节点上出现一次失败。 默认百分比为零。
int
serviceTypeHealthPolicyMap 每个服务类型名称具有服务类型运行状况策略的映射。 映射默认为空。 ArmServiceTypeHealthPolicyMap

ArmServiceTypeHealthPolicy

名称 说明
maxPercentUnhealthyPartitionsPerService 在将应用程序视为错误之前,每个服务允许运行不正常的分区的最大百分比。 int

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyReplicasPerPartition 在将应用程序视为错误之前,每个分区允许运行不正常的最大副本百分比。 int

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyServices 在应用程序被视为错误之前允许运行不正常的服务的最大百分比。 int

约束:
最小值 = 0
最大值 = 100

ArmServiceTypeHealthPolicyMap

名称 说明
{customized property} ArmServiceTypeHealthPolicy

ArmRollingUpgradeMonitoringPolicy

名称 说明
failureAction 服务包的激活模式 “Manual”
“Rollback”
healthCheckRetryTimeout 执行 FailureAction 前,当应用程序或群集不正常时,重试运行状况评估所需的时间。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
healthCheckStableDuration 升级继续到下一升级域之前,应用程序或群集必须保持正常的时长。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
healthCheckWaitDuration 应用运行状况策略之前,完成升级域后等待的时间长度。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
upgradeDomainTimeout 执行 FailureAction 前,每个升级域需等待的时长。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
upgradeTimeout 执行 FailureAction 前,完成整个升级需等待的时长。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串

ApplicationHealthPolicy

名称 说明
defaultServiceTypeHealthPolicy 默认情况下用于评估服务类型的运行状况的运行状况策略。 ServiceTypeHealthPolicy
serviceTypeHealthPolicies 每个服务类型名称具有服务类型运行状况策略的映射。 映射默认为空。 ServiceTypeHealthPolicyMap
considerWarningAsError 指示是否将警告的严重性视为与错误相同。 需要 bool ()
defaultServiceTypeHealthPolicy 默认情况下用于评估服务类型的运行状况的运行状况策略。 ServiceTypeHealthPolicy
maxPercentUnhealthyDeployedApplications 允许的已部署的不正常应用程序的最大百分比。 允许的值为 0 到 100 的字节值。
该百分比表示在将应用程序视为错误之前可处于不正常状态的已部署应用程序的最大允许百分比。
这是通过将不正常的已部署应用程序数除以群集中应用程序当前部署在上的节点数计算得出的。
计算结果调高为整数,以便容忍少量节点上出现一次失败。 默认百分比为零。
int (必需)
serviceTypeHealthPolicyMap 每个服务类型名称具有服务类型运行状况策略的映射。 映射默认为空。 ServiceTypeHealthPolicyMap

ServiceTypeHealthPolicy

名称 说明
maxPercentUnhealthyServices 在应用程序被视为错误之前允许运行不正常的服务的最大百分比。 int

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyPartitionsPerService 每个服务允许的最大不正常分区百分比。

该百分比表示在将服务视为错误之前,可以运行不正常的分区的最大容许百分比。
如果遵循百分比,但至少有一个不正常的分区,则运行状况评估为“警告”。
百分比的计算方法是将不正常的分区数除以服务中的分区总数。
计算向上舍入,以容忍少量分区出现一次故障。
int (必需)

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyReplicasPerPartition 每个分区允许的最大不正常副本百分比。

该百分比表示在将分区视为错误之前可运行不正常的副本的最大允许百分比。
如果遵循百分比,但至少有一个不正常的副本 (replica) ,则运行状况评估为“警告”。
百分比的计算方法是将不正常副本数除以分区中副本总数。
计算向上舍入,以容忍少量副本出现一次失败。
int (必需)

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyServices 不正常服务允许的最大百分比。

该百分比表示在将应用程序视为错误之前可能处于不正常状态的服务的最大容许百分比。
如果遵循百分比,但至少有一个不正常的服务,则运行状况评估为“警告”。
这是通过将特定服务类型的不正常服务数除以特定服务类型的服务总数计算得出的。
计算向上舍入,以容忍少量服务出现一次故障。
int (必需)

约束:
最小值 = 0
最大值 = 100

ServiceTypeHealthPolicyMap

名称 说明
{customized property} ServiceTypeHealthPolicy

RollingUpgradeMonitoringPolicy

名称 说明
failureAction Monitored 升级遇到违反监视策略或运行状况策略的情况时需执行的补救操作。 无效表示失败操作无效。 Rollback 指定升级将开始自动回滚。 手动指示升级将切换到 UnmonitoredManual 升级模式。 “Manual”
需要“回滚” ()
healthCheckRetryTimeout 执行 FailureAction 前,当应用程序或群集不正常时,重试运行状况评估所需的时间。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
healthCheckStableDuration 升级继续到下一升级域之前,应用程序或群集必须保持正常的时长。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
healthCheckWaitDuration 应用运行状况策略之前,完成升级域后等待的时间长度。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
upgradeDomainTimeout 执行 FailureAction 前,每个升级域需等待的时长。 不能大于 12 小时。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
upgradeTimeout 执行 FailureAction 前,完成整个升级需等待的时长。 不能大于 12 小时。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)

ARM 模板资源定义

可以使用面向以下操作部署群集/应用程序资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ServiceFabric/clusters/applications 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.ServiceFabric/clusters/applications",
  "apiVersion": "2023-11-01-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {}
    },
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {}
    }
  },
  "properties": {
    "managedIdentities": [
      {
        "name": "string",
        "principalId": "string",
        "name": "string",
        "principalId": "string"
      }
    ],
    "maximumNodes": "int",
    "metrics": [
      {
        "maximumCapacity": "int",
        "name": "string",
        "reservationCapacity": "int",
        "totalApplicationCapacity": "int"
      }
    ],
    "minimumNodes": "int",
    "parameters": {
      "{customized property}": "string"
    },
    "removeApplicationCapacity": "bool",
    "typeName": "string",
    "typeVersion": "string",
    "upgradePolicy": {
      "applicationHealthPolicy": {
        "considerWarningAsError": "bool",
        "defaultServiceTypeHealthPolicy": {
          "maxPercentUnhealthyPartitionsPerService": "int",
          "maxPercentUnhealthyReplicasPerPartition": "int",
          "maxPercentUnhealthyServices": "int"
        },
        "maxPercentUnhealthyDeployedApplications": "int",
        "serviceTypeHealthPolicyMap": {
          "{customized property}": {
            "maxPercentUnhealthyPartitionsPerService": "int",
            "maxPercentUnhealthyReplicasPerPartition": "int",
            "maxPercentUnhealthyServices": "int"
          }
        }
      },
      "forceRestart": "bool",
      "recreateApplication": "bool",
      "rollingUpgradeMonitoringPolicy": {
        "failureAction": "string",
        "healthCheckRetryTimeout": "string",
        "healthCheckStableDuration": "string",
        "healthCheckWaitDuration": "string",
        "upgradeDomainTimeout": "string",
        "upgradeTimeout": "string"
      },
      "upgradeMode": "string",
      "upgradeReplicaSetCheckTimeout": "string",
      "applicationHealthPolicy": {
        "defaultServiceTypeHealthPolicy": {
          "maxPercentUnhealthyServices": "int",
          "maxPercentUnhealthyPartitionsPerService": "int",
          "maxPercentUnhealthyReplicasPerPartition": "int",
          "maxPercentUnhealthyServices": "int"
        },
        "serviceTypeHealthPolicies": {
          "{customized property}": {
            "maxPercentUnhealthyServices": "int",
            "maxPercentUnhealthyPartitionsPerService": "int",
            "maxPercentUnhealthyReplicasPerPartition": "int",
            "maxPercentUnhealthyServices": "int"
          }
        },
        "considerWarningAsError": "bool",
        "defaultServiceTypeHealthPolicy": {
          "maxPercentUnhealthyServices": "int",
          "maxPercentUnhealthyPartitionsPerService": "int",
          "maxPercentUnhealthyReplicasPerPartition": "int",
          "maxPercentUnhealthyServices": "int"
        },
        "maxPercentUnhealthyDeployedApplications": "int",
        "serviceTypeHealthPolicyMap": {
          "{customized property}": {
            "maxPercentUnhealthyServices": "int",
            "maxPercentUnhealthyPartitionsPerService": "int",
            "maxPercentUnhealthyReplicasPerPartition": "int",
            "maxPercentUnhealthyServices": "int"
          }
        }
      },
      "forceRestart": "bool",
      "instanceCloseDelayDuration": "int",
      "recreateApplication": "bool",
      "rollingUpgradeMonitoringPolicy": {
        "failureAction": "string",
        "healthCheckRetryTimeout": "string",
        "healthCheckStableDuration": "string",
        "healthCheckWaitDuration": "string",
        "upgradeDomainTimeout": "string",
        "upgradeTimeout": "string"
      },
      "upgradeMode": "string",
      "upgradeReplicaSetCheckTimeout": "int"
    },
    "managedIdentities": [
      {
        "name": "string",
        "principalId": "string",
        "name": "string",
        "principalId": "string"
      }
    ],
    "parameters": {
      "{customized property}": "string"
    },
    "upgradePolicy": {
      "applicationHealthPolicy": {
        "considerWarningAsError": "bool",
        "defaultServiceTypeHealthPolicy": {
          "maxPercentUnhealthyPartitionsPerService": "int",
          "maxPercentUnhealthyReplicasPerPartition": "int",
          "maxPercentUnhealthyServices": "int"
        },
        "maxPercentUnhealthyDeployedApplications": "int",
        "serviceTypeHealthPolicyMap": {
          "{customized property}": {
            "maxPercentUnhealthyPartitionsPerService": "int",
            "maxPercentUnhealthyReplicasPerPartition": "int",
            "maxPercentUnhealthyServices": "int"
          }
        }
      },
      "forceRestart": "bool",
      "recreateApplication": "bool",
      "rollingUpgradeMonitoringPolicy": {
        "failureAction": "string",
        "healthCheckRetryTimeout": "string",
        "healthCheckStableDuration": "string",
        "healthCheckWaitDuration": "string",
        "upgradeDomainTimeout": "string",
        "upgradeTimeout": "string"
      },
      "upgradeMode": "string",
      "upgradeReplicaSetCheckTimeout": "string",
      "applicationHealthPolicy": {
        "defaultServiceTypeHealthPolicy": {
          "maxPercentUnhealthyServices": "int",
          "maxPercentUnhealthyPartitionsPerService": "int",
          "maxPercentUnhealthyReplicasPerPartition": "int",
          "maxPercentUnhealthyServices": "int"
        },
        "serviceTypeHealthPolicies": {
          "{customized property}": {
            "maxPercentUnhealthyServices": "int",
            "maxPercentUnhealthyPartitionsPerService": "int",
            "maxPercentUnhealthyReplicasPerPartition": "int",
            "maxPercentUnhealthyServices": "int"
          }
        },
        "considerWarningAsError": "bool",
        "defaultServiceTypeHealthPolicy": {
          "maxPercentUnhealthyServices": "int",
          "maxPercentUnhealthyPartitionsPerService": "int",
          "maxPercentUnhealthyReplicasPerPartition": "int",
          "maxPercentUnhealthyServices": "int"
        },
        "maxPercentUnhealthyDeployedApplications": "int",
        "serviceTypeHealthPolicyMap": {
          "{customized property}": {
            "maxPercentUnhealthyServices": "int",
            "maxPercentUnhealthyPartitionsPerService": "int",
            "maxPercentUnhealthyReplicasPerPartition": "int",
            "maxPercentUnhealthyServices": "int"
          }
        }
      },
      "forceRestart": "bool",
      "instanceCloseDelayDuration": "int",
      "recreateApplication": "bool",
      "rollingUpgradeMonitoringPolicy": {
        "failureAction": "string",
        "healthCheckRetryTimeout": "string",
        "healthCheckStableDuration": "string",
        "healthCheckWaitDuration": "string",
        "upgradeDomainTimeout": "string",
        "upgradeTimeout": "string"
      },
      "upgradeMode": "string",
      "upgradeReplicaSetCheckTimeout": "int"
    },
    "version": "string"
  }
}

属性值

clusters/applications

名称 说明 Value
type 资源类型 “Microsoft.ServiceFabric/clusters/applications”
apiVersion 资源 API 版本 “2023-11-01-preview”
name 资源名称

了解如何在 JSON ARM 模板中设置子资源的名称和类型。
字符串 (必需)
location 它将在新 API 中弃用,资源位置取决于父资源。 字符串
标记 Azure 资源标记。 标记名称和值的字典。 请参阅 模板中的标记
标识 介绍 Azure 资源的托管标识。 ManagedIdentity
properties 应用程序资源属性。 ApplicationResourceProperties

ManagedIdentity

名称 说明 Value
type 资源的托管标识的类型。 “None”
“SystemAssigned”
“SystemAssigned, UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识字典键引用将是采用以下格式的 ARM 资源 ID:
“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。
UserAssignedIdentityMap
类型 资源的托管标识的类型。 “None”
“SystemAssigned”
“SystemAssigned, UserAssigned”
“UserAssigned”
userAssignedIdentities 与资源关联的用户标识列表。 用户标识字典键引用将是采用以下格式的 ARM 资源 ID:
“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。
UserAssignedIdentityMap

UserAssignedIdentityMap

名称 说明
{customized property} UserAssignedIdentity

UserAssignedIdentity

此对象不包含部署期间要设置的任何属性。 所有属性均为 ReadOnly。

ApplicationResourceProperties

名称 说明
managedIdentities 应用程序的用户分配标识列表,每个标识都映射到一个友好名称。 ApplicationUserAssignedIdentity[]
maximumNodes Service Fabric 为此应用程序保留的容量的最大节点数。 请注意,这并不表示此应用程序的服务放置在所有这些节点上。 默认情况下,此属性的值为零,这意味着可以将服务放置在任何节点上。 int

约束:
最小值 = 0
指标 应用程序容量指标说明的列表。 ApplicationMetricDescription[]
minimumNodes Service Fabric 为此应用程序保留的容量的最小节点数。 请注意,这并不表示此应用程序的服务放置在所有这些节点上。 如果此属性设置为零,则不会保留任何容量。 此属性的值不能大于 MaximumNodes 属性的值。 int

约束:
最小值 = 0
parameters 应用程序参数的列表,其中包含应用程序清单中指定的默认值中重写的值。 ApplicationParameterList
removeApplicationCapacity 删除当前应用程序容量设置。 bool
typeName 应用程序清单中定义的应用程序类型名称。 字符串
typeVersion 应用程序清单中定义的应用程序类型的版本。 字符串
upgradePolicy 描述受监视的应用程序升级的策略。 ApplicationUpgradePolicy
managedIdentities 应用程序的用户分配标识列表,每个标识都映射到一个友好名称。 ApplicationUserAssignedIdentity[]
parameters 应用程序参数的列表,其中包含应用程序清单中指定的默认值中重写的值。 ApplicationParameterList
upgradePolicy 描述受监视的应用程序升级的策略。 ApplicationUpgradePolicy
版本 应用程序清单中定义的应用程序类型的版本。
此名称必须是所引用应用程序类型版本的完整 Arm 资源 ID。
字符串

ApplicationUserAssignedIdentity

名称 说明
name 用户分配的标识的友好名称。 字符串 (必需)
principalId 用户分配标识的主体 ID。 字符串 (必需)
name 用户分配的标识的友好名称。 字符串 (必需)
principalId 用户分配标识的主体 ID。 字符串 (必需)

ApplicationMetricDescription

名称 说明
maximumCapacity Service Fabric 应用程序的最大节点容量。
这是单个节点上此应用程序实例的最大负载。 即使节点的容量大于此值,Service Fabric 也会将每个节点上应用程序内服务的总负载限制为此值。
如果设置为零,则每个节点上此指标的容量不受限制。
创建定义了应用程序容量的新应用程序时,MaximumNodes 和此值的乘积必须始终小于或等于 TotalApplicationCapacity。
使用应用程序容量更新现有应用程序时,MaximumNodes 和此值的乘积必须始终小于或等于 TotalApplicationCapacity。
int
name 指标的名称。 字符串
reservationCapacity Service Fabric 应用程序的节点预留容量。
这是在具有此应用程序实例的节点上保留的负载量。
如果指定了 MinimumNodes,则这些值的乘积将是群集中为应用程序保留的容量。
如果设置为零,则不为此指标保留任何容量。
设置应用程序容量或更新应用程序容量时;此值必须小于或等于每个指标的 MaximumCapacity。
int
totalApplicationCapacity Service Fabric 应用程序的总指标容量。
这是群集中此应用程序的总指标容量。 Service Fabric 将尝试将应用程序中的服务负载之和限制为此值。
创建定义了应用程序容量的新应用程序时,MaximumNodes 和 MaximumCapacity 的乘积必须始终小于或等于此值。
int

ApplicationParameterList

名称 说明
{customized property} 字符串

ApplicationUpgradePolicy

名称 说明
applicationHealthPolicy 定义用于评估应用程序或其子实体之一运行状况的运行状况策略。 ArmApplicationHealthPolicy
forceRestart 如果为 true,则在升级过程中强制重启进程,即使代码版本未更改 (升级仅更改配置或数据) 。 bool
recreateApplication 确定是否应在更新时重新创建应用程序。 如果 value=true,则不允许其他升级策略参数,这将导致可用性丢失。 bool
rollingUpgradeMonitoringPolicy 用于监视应用程序升级的策略 ArmRollingUpgradeMonitoringPolicy
upgradeMode 在滚动升级期间用于监视运行状况的模式。 值为 UnmonitoredAuto、UnmonitoredManual 和 Monitored。 “无效”
“Monitored”
“UnmonitoredAuto”
“UnmonitoredManual”
upgradeReplicaSetCheckTimeout 出现意外问题时,阻止处理升级域并防止可用性丢失的最大时长。 当此超时到期时,无论是否存在可用性丢失问题,都将继续处理升级域。 每个升级域启动时重置超时。 有效值介于 0 和 42949672925(含)之间。 (无符号 32 位整数) 。 字符串
applicationHealthPolicy 定义用于评估应用程序或其子实体之一运行状况的运行状况策略。 ApplicationHealthPolicy
forceRestart 如果为 true,则在升级过程中强制重启进程,即使代码版本未更改 (升级仅更改配置或数据) 。 bool
instanceCloseDelayDuration 持续时间(以秒为单位),用于在关闭无状态实例之前等待,以允许活动请求正常排出。 当实例在应用程序/群集升级期间关闭时,这才有效,仅适用于在服务说明中配置了非零延迟持续时间的实例。 int
recreateApplication 确定是否应在更新时重新创建应用程序。 如果 value=true,则不允许使用其余的升级策略参数。 bool
rollingUpgradeMonitoringPolicy 用于监视应用程序升级的策略 RollingUpgradeMonitoringPolicy
upgradeMode 在滚动升级期间用于监视运行状况的模式。 值为 Monitored 和 UnmonitoredAuto。 “Monitored”
“UnmonitoredAuto”
upgradeReplicaSetCheckTimeout 出现意外问题时,阻止处理升级域并防止可用性丢失的最大时长。 当此超时到期时,无论是否存在可用性丢失问题,都将继续处理升级域。 每个升级域启动时重置超时。 有效值介于 0 和 42949672925(含)之间。 (无符号 32 位整数) 。 int

ArmApplicationHealthPolicy

名称 说明
considerWarningAsError 指示是否将警告的严重性视为与错误相同。 bool
defaultServiceTypeHealthPolicy 默认情况下用于评估服务类型的运行状况的运行状况策略。 ArmServiceTypeHealthPolicy
maxPercentUnhealthyDeployedApplications 允许的已部署的不正常应用程序的最大百分比。 允许的值为 0 到 100 的字节值。
该百分比表示在将应用程序视为错误之前可处于不正常状态的已部署应用程序的最大允许百分比。
这是通过将不正常的已部署应用程序数除以群集中应用程序当前部署在上的节点数计算得出的。
计算结果调高为整数,以便容忍少量节点上出现一次失败。 默认百分比为零。
int
serviceTypeHealthPolicyMap 每个服务类型名称具有服务类型运行状况策略的映射。 映射默认为空。 ArmServiceTypeHealthPolicyMap

ArmServiceTypeHealthPolicy

名称 说明
maxPercentUnhealthyPartitionsPerService 在将应用程序视为错误之前,每个服务允许运行不正常的分区的最大百分比。 int

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyReplicasPerPartition 在将应用程序视为错误之前,每个分区允许运行不正常的副本的最大百分比。 int

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyServices 在将应用程序视为错误之前允许运行不正常的服务的最大百分比。 int

约束:
最小值 = 0
最大值 = 100

ArmServiceTypeHealthPolicyMap

名称 说明
{customized property} ArmServiceTypeHealthPolicy

ArmRollingUpgradeMonitoringPolicy

名称 说明
failureAction 服务包的激活模式 “手动”
“Rollback”
healthCheckRetryTimeout 执行 FailureAction 前,当应用程序或群集不正常时,重试运行状况评估所需的时间。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
healthCheckStableDuration 升级继续到下一升级域之前,应用程序或群集必须保持正常的时长。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
healthCheckWaitDuration 应用运行状况策略之前,完成升级域后等待的时间长度。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
upgradeDomainTimeout 执行 FailureAction 前,每个升级域需等待的时长。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
upgradeTimeout 执行 FailureAction 前,完成整个升级需等待的时长。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串

ApplicationHealthPolicy

名称 说明
defaultServiceTypeHealthPolicy 默认情况下用于评估服务类型的运行状况的运行状况策略。 ServiceTypeHealthPolicy
serviceTypeHealthPolicies 每个服务类型名称具有服务类型运行状况策略的映射。 映射默认为空。 ServiceTypeHealthPolicyMap
考虑WarningAsError 指示是否将警告的严重性视为与错误相同。 bool (必需)
defaultServiceTypeHealthPolicy 默认情况下用于评估服务类型的运行状况的运行状况策略。 ServiceTypeHealthPolicy
maxPercentUnhealthyDeployedApplications 允许的已部署的不正常应用程序的最大百分比。 允许的值为从 0 到 100 的字节值。
该百分比表示在将应用程序视为错误之前可能处于不正常状态的已部署应用程序的最大允许百分比。
这是通过将部署的不正常应用程序数除以群集中当前部署应用程序的节点数来计算的。
计算结果调高为整数,以便容忍少量节点上出现一次失败。 默认百分比为零。
int (必需)
serviceTypeHealthPolicyMap 每个服务类型名称具有服务类型运行状况策略的映射。 映射默认为空。 ServiceTypeHealthPolicyMap

ServiceTypeHealthPolicy

名称 说明
maxPercentUnhealthyServices 在将应用程序视为错误之前允许运行不正常的服务的最大百分比。 int

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyPartitionsPerService 每个服务允许的最大不正常分区百分比。

百分比表示在将服务视为错误之前,可能处于不正常状态的分区的最大允许百分比。
如果遵循百分比,但至少有一个不正常的分区,则运行状况评估为“警告”。
百分比的计算方法是将运行不正常的分区数除以服务中的分区总数。
计算向上舍入,以容忍少量分区上的一次故障。
int (必需)

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyReplicasPerPartition 每个分区允许的最大不正常副本百分比。

该百分比表示在将分区视为错误之前可能处于不正常状态的副本的最大允许百分比。
如果遵循百分比,但至少有一个不正常的副本 (replica) ,则运行状况评估为警告。
百分比的计算方法是将运行不正常的副本数除以分区中的副本总数。
计算向上舍入,以容忍少量副本上的一次故障。
int (必需)

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyServices 允许的最大不正常服务百分比。

百分比表示在将应用程序视为错误之前可能处于不正常状态的服务的最大允许百分比。
如果遵循百分比,但至少有一个不正常的服务,则运行状况评估为“警告”。
这是通过将特定服务类型的不正常服务数除以特定服务类型的服务总数来计算的。
计算向上舍入,以容忍少量服务上的一次故障。
int (必需)

约束:
最小值 = 0
最大值 = 100

ServiceTypeHealthPolicyMap

名称 说明
{customized property} ServiceTypeHealthPolicy

RollingUpgradeMonitoringPolicy

名称 说明
failureAction Monitored 升级遇到违反监视策略或运行状况策略的情况时需执行的补救操作。 无效表示失败操作无效。 回滚指定升级将自动开始回滚。 手动指示升级将切换到 UnmonitoredManual 升级模式。 “手动”
需要“回滚” ()
healthCheckRetryTimeout 执行 FailureAction 前,当应用程序或群集不正常时,重试运行状况评估所需的时间。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
healthCheckStableDuration 升级继续到下一升级域之前,应用程序或群集必须保持正常的时长。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
healthCheckWaitDuration 应用运行状况策略之前,完成升级域后等待的时间长度。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
upgradeDomainTimeout 执行 FailureAction 前,每个升级域需等待的时长。 不能超过 12 小时。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
upgradeTimeout 执行 FailureAction 前,完成整个升级需等待的时长。 不能超过 12 小时。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)

Terraform (AzAPI 提供程序) 资源定义

群集/应用程序资源类型可以通过针对以下操作进行部署:

  • 资源组

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ServiceFabric/clusters/applications 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ServiceFabric/clusters/applications@2023-11-01-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  identity {
    type = "string"
    identity_ids = []
    type = "string"
    identity_ids = []
  }
  body = jsonencode({
    properties = {
      managedIdentities = [
        {
          name = "string"
          principalId = "string"
          name = "string"
          principalId = "string"
        }
      ]
      maximumNodes = int
      metrics = [
        {
          maximumCapacity = int
          name = "string"
          reservationCapacity = int
          totalApplicationCapacity = int
        }
      ]
      minimumNodes = int
      parameters = {
        {customized property} = "string"
      }
      removeApplicationCapacity = bool
      typeName = "string"
      typeVersion = "string"
      upgradePolicy = {
        applicationHealthPolicy = {
          considerWarningAsError = bool
          defaultServiceTypeHealthPolicy = {
            maxPercentUnhealthyPartitionsPerService = int
            maxPercentUnhealthyReplicasPerPartition = int
            maxPercentUnhealthyServices = int
          }
          maxPercentUnhealthyDeployedApplications = int
          serviceTypeHealthPolicyMap = {
            {customized property} = {
              maxPercentUnhealthyPartitionsPerService = int
              maxPercentUnhealthyReplicasPerPartition = int
              maxPercentUnhealthyServices = int
            }
          }
        }
        forceRestart = bool
        recreateApplication = bool
        rollingUpgradeMonitoringPolicy = {
          failureAction = "string"
          healthCheckRetryTimeout = "string"
          healthCheckStableDuration = "string"
          healthCheckWaitDuration = "string"
          upgradeDomainTimeout = "string"
          upgradeTimeout = "string"
        }
        upgradeMode = "string"
        upgradeReplicaSetCheckTimeout = "string"
        applicationHealthPolicy = {
          defaultServiceTypeHealthPolicy = {
            maxPercentUnhealthyServices = int
            maxPercentUnhealthyPartitionsPerService = int
            maxPercentUnhealthyReplicasPerPartition = int
            maxPercentUnhealthyServices = int
          }
          serviceTypeHealthPolicies = {
            {customized property} = {
              maxPercentUnhealthyServices = int
              maxPercentUnhealthyPartitionsPerService = int
              maxPercentUnhealthyReplicasPerPartition = int
              maxPercentUnhealthyServices = int
            }
          }
          considerWarningAsError = bool
          defaultServiceTypeHealthPolicy = {
            maxPercentUnhealthyServices = int
            maxPercentUnhealthyPartitionsPerService = int
            maxPercentUnhealthyReplicasPerPartition = int
            maxPercentUnhealthyServices = int
          }
          maxPercentUnhealthyDeployedApplications = int
          serviceTypeHealthPolicyMap = {
            {customized property} = {
              maxPercentUnhealthyServices = int
              maxPercentUnhealthyPartitionsPerService = int
              maxPercentUnhealthyReplicasPerPartition = int
              maxPercentUnhealthyServices = int
            }
          }
        }
        forceRestart = bool
        instanceCloseDelayDuration = int
        recreateApplication = bool
        rollingUpgradeMonitoringPolicy = {
          failureAction = "string"
          healthCheckRetryTimeout = "string"
          healthCheckStableDuration = "string"
          healthCheckWaitDuration = "string"
          upgradeDomainTimeout = "string"
          upgradeTimeout = "string"
        }
        upgradeMode = "string"
        upgradeReplicaSetCheckTimeout = int
      }
      managedIdentities = [
        {
          name = "string"
          principalId = "string"
          name = "string"
          principalId = "string"
        }
      ]
      parameters = {
        {customized property} = "string"
      }
      upgradePolicy = {
        applicationHealthPolicy = {
          considerWarningAsError = bool
          defaultServiceTypeHealthPolicy = {
            maxPercentUnhealthyPartitionsPerService = int
            maxPercentUnhealthyReplicasPerPartition = int
            maxPercentUnhealthyServices = int
          }
          maxPercentUnhealthyDeployedApplications = int
          serviceTypeHealthPolicyMap = {
            {customized property} = {
              maxPercentUnhealthyPartitionsPerService = int
              maxPercentUnhealthyReplicasPerPartition = int
              maxPercentUnhealthyServices = int
            }
          }
        }
        forceRestart = bool
        recreateApplication = bool
        rollingUpgradeMonitoringPolicy = {
          failureAction = "string"
          healthCheckRetryTimeout = "string"
          healthCheckStableDuration = "string"
          healthCheckWaitDuration = "string"
          upgradeDomainTimeout = "string"
          upgradeTimeout = "string"
        }
        upgradeMode = "string"
        upgradeReplicaSetCheckTimeout = "string"
        applicationHealthPolicy = {
          defaultServiceTypeHealthPolicy = {
            maxPercentUnhealthyServices = int
            maxPercentUnhealthyPartitionsPerService = int
            maxPercentUnhealthyReplicasPerPartition = int
            maxPercentUnhealthyServices = int
          }
          serviceTypeHealthPolicies = {
            {customized property} = {
              maxPercentUnhealthyServices = int
              maxPercentUnhealthyPartitionsPerService = int
              maxPercentUnhealthyReplicasPerPartition = int
              maxPercentUnhealthyServices = int
            }
          }
          considerWarningAsError = bool
          defaultServiceTypeHealthPolicy = {
            maxPercentUnhealthyServices = int
            maxPercentUnhealthyPartitionsPerService = int
            maxPercentUnhealthyReplicasPerPartition = int
            maxPercentUnhealthyServices = int
          }
          maxPercentUnhealthyDeployedApplications = int
          serviceTypeHealthPolicyMap = {
            {customized property} = {
              maxPercentUnhealthyServices = int
              maxPercentUnhealthyPartitionsPerService = int
              maxPercentUnhealthyReplicasPerPartition = int
              maxPercentUnhealthyServices = int
            }
          }
        }
        forceRestart = bool
        instanceCloseDelayDuration = int
        recreateApplication = bool
        rollingUpgradeMonitoringPolicy = {
          failureAction = "string"
          healthCheckRetryTimeout = "string"
          healthCheckStableDuration = "string"
          healthCheckWaitDuration = "string"
          upgradeDomainTimeout = "string"
          upgradeTimeout = "string"
        }
        upgradeMode = "string"
        upgradeReplicaSetCheckTimeout = int
      }
      version = "string"
    }
  })
}

属性值

clusters/applications

名称 说明 Value
type 资源类型 “Microsoft.ServiceFabric/clusters/applications@2023-11-01-preview”
name 资源名称 字符串 (必需)
location 它将在新 API 中弃用,资源位置取决于父资源。 字符串
parent_id 此资源的父资源 ID。 类型为“群集”的资源的 ID
标记 Azure 资源标记。 标记名称和值的字典。
标识 介绍 Azure 资源的托管标识。 ManagedIdentity
properties 应用程序资源属性。 ApplicationResourceProperties

ManagedIdentity

名称 说明 Value
type 资源的托管标识类型。 “SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
identity_ids 与资源关联的用户标识列表。 用户标识字典键引用将是采用以下格式的 ARM 资源 ID:
“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。
用户标识 ID 的数组。
类型 资源的托管标识的类型。 "None"
“SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned”
identity_ids 与资源关联的用户标识列表。 用户标识字典键引用将是采用以下格式的 ARM 资源 ID:
“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。
用户标识 ID 的数组。

UserAssignedIdentityMap

名称 说明
{customized property} UserAssignedIdentity

UserAssignedIdentity

此对象不包含部署期间要设置的任何属性。 所有属性均为 ReadOnly。

ApplicationResourceProperties

名称 说明
managedIdentities 应用程序的用户分配标识列表,每个标识都映射到一个友好名称。 ApplicationUserAssignedIdentity[]
maximumNodes Service Fabric 为此应用程序保留的容量的最大节点数。 请注意,这并不表示此应用程序的服务放置在所有这些节点上。 默认情况下,此属性的值为零,这意味着可以将服务放置在任何节点上。 int

约束:
最小值 = 0
指标 应用程序容量指标说明的列表。 ApplicationMetricDescription[]
minimumNodes Service Fabric 为此应用程序保留的容量的最小节点数。 请注意,这并不表示此应用程序的服务放置在所有这些节点上。 如果此属性设置为零,则不会保留任何容量。 此属性的值不能大于 MaximumNodes 属性的值。 int

约束:
最小值 = 0
parameters 应用程序参数的列表,其中包含应用程序清单中指定的默认值中重写的值。 ApplicationParameterList
removeApplicationCapacity 删除当前应用程序容量设置。 bool
typeName 应用程序清单中定义的应用程序类型名称。 字符串
typeVersion 应用程序清单中定义的应用程序类型的版本。 字符串
upgradePolicy 描述受监视的应用程序升级的策略。 ApplicationUpgradePolicy
managedIdentities 应用程序的用户分配标识列表,每个标识都映射到一个友好名称。 ApplicationUserAssignedIdentity[]
parameters 应用程序参数的列表,其中包含应用程序清单中指定的默认值中重写的值。 ApplicationParameterList
upgradePolicy 描述受监视的应用程序升级的策略。 ApplicationUpgradePolicy
版本 应用程序清单中定义的应用程序类型的版本。
此名称必须是所引用应用程序类型版本的完整 Arm 资源 ID。
字符串

ApplicationUserAssignedIdentity

名称 说明
name 用户分配的标识的友好名称。 字符串 (必需)
principalId 用户分配标识的主体 ID。 字符串 (必需)
name 用户分配的标识的友好名称。 字符串 (必需)
principalId 用户分配标识的主体 ID。 字符串 (必需)

ApplicationMetricDescription

名称 说明
maximumCapacity Service Fabric 应用程序的最大节点容量。
这是单个节点上此应用程序实例的最大负载。 即使节点的容量大于此值,Service Fabric 也会将每个节点上应用程序内服务的总负载限制为此值。
如果设置为零,则此指标在每个节点上的容量不受限制。
创建定义了应用程序容量的新应用程序时,MaximumNodes 和此值的乘积必须始终小于或等于 TotalApplicationCapacity。
使用应用程序容量更新现有应用程序时,MaximumNodes 和此值的乘积必须始终小于或等于 TotalApplicationCapacity。
int
name 指标的名称。 字符串
reservationCapacity Service Fabric 应用程序的节点预留容量。
这是在具有此应用程序实例的节点上保留的负载量。
如果指定了 MinimumNodes,则这些值的乘积将是群集中为应用程序保留的容量。
如果设置为零,则不为此指标保留任何容量。
设置应用程序容量或更新应用程序容量时;对于每个指标,此值必须小于或等于 MaximumCapacity。
int
totalApplicationCapacity Service Fabric 应用程序的总指标容量。
这是群集中此应用程序的总指标容量。 Service Fabric 将尝试将应用程序中的服务负载之和限制为此值。
创建定义了应用程序容量的新应用程序时,MaximumNodes 和 MaximumCapacity 的乘积必须始终小于或等于此值。
int

ApplicationParameterList

名称 说明
{customized property} 字符串

ApplicationUpgradePolicy

名称 说明
applicationHealthPolicy 定义用于评估应用程序或其子实体之一的运行状况的运行状况策略。 ArmApplicationHealthPolicy
forceRestart 如果为 true,则在升级过程中强制重启进程,即使代码版本未更改, (升级仅更改配置或数据) 。 bool
recreateApplication 确定是否应在更新时重新创建应用程序。 如果 value=true,则不允许使用升级策略参数的其余参数,这将导致可用性丢失。 bool
rollingUpgradeMonitoringPolicy 用于监视应用程序升级的策略 ArmRollingUpgradeMonitoringPolicy
upgradeMode 在滚动升级期间用于监视运行状况的模式。 值为 UnmonitoredAuto、UnmonitoredManual 和 Monitored。 “无效”
“受监视”
“UnmonitoredAuto”
“UnmonitoredManual”
upgradeReplicaSetCheckTimeout 出现意外问题时,阻止处理升级域并防止可用性丢失的最大时长。 当此超时到期时,无论是否存在可用性丢失问题,都将继续处理升级域。 每个升级域启动时重置超时。 有效值介于 0 和 42949672925(含)之间。 (无符号 32 位整数) 。 字符串
applicationHealthPolicy 定义用于评估应用程序或其子实体之一的运行状况的运行状况策略。 ApplicationHealthPolicy
forceRestart 如果为 true,则在升级过程中强制重启进程,即使代码版本未更改, (升级仅更改配置或数据) 。 bool
instanceCloseDelayDuration 持续时间(秒),在无状态实例关闭之前等待,以允许活动请求正常排出。 当实例在应用程序/群集升级期间关闭时,这才有效,仅适用于在服务说明中配置了非零延迟持续时间的实例。 int
recreateApplication 确定是否应在更新时重新创建应用程序。 如果 value=true,则不允许使用升级策略参数的其余参数。 bool
rollingUpgradeMonitoringPolicy 用于监视应用程序升级的策略 RollingUpgradeMonitoringPolicy
upgradeMode 在滚动升级期间用于监视运行状况的模式。 值为 Monitored 和 UnmonitoredAuto。 “受监视”
“UnmonitoredAuto”
upgradeReplicaSetCheckTimeout 出现意外问题时,阻止处理升级域并防止可用性丢失的最大时长。 当此超时到期时,无论是否存在可用性丢失问题,都将继续处理升级域。 每个升级域启动时重置超时。 有效值介于 0 和 42949672925(含)之间。 (无符号 32 位整数) 。 int

ArmApplicationHealthPolicy

名称 说明
考虑WarningAsError 指示是否将警告的严重性视为与错误相同。 bool
defaultServiceTypeHealthPolicy 默认情况下用于评估服务类型的运行状况的运行状况策略。 ArmServiceTypeHealthPolicy
maxPercentUnhealthyDeployedApplications 允许的已部署的不正常应用程序的最大百分比。 允许的值为 0 到 100 的字节值。
该百分比表示在将应用程序视为错误之前可处于不正常状态的已部署应用程序的最大允许百分比。
这是通过将不正常的已部署应用程序数除以群集中应用程序当前部署在上的节点数计算得出的。
计算结果调高为整数,以便容忍少量节点上出现一次失败。 默认百分比为零。
int
serviceTypeHealthPolicyMap 每个服务类型名称具有服务类型运行状况策略的映射。 映射默认为空。 ArmServiceTypeHealthPolicyMap

ArmServiceTypeHealthPolicy

名称 说明
maxPercentUnhealthyPartitionsPerService 在将应用程序视为错误之前,每个服务允许运行不正常的分区的最大百分比。 int

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyReplicasPerPartition 在将应用程序视为错误之前,每个分区允许运行不正常的最大副本百分比。 int

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyServices 在应用程序被视为错误之前允许运行不正常的服务的最大百分比。 int

约束:
最小值 = 0
最大值 = 100

ArmServiceTypeHealthPolicyMap

名称 说明
{customized property} ArmServiceTypeHealthPolicy

ArmRollingUpgradeMonitoringPolicy

名称 说明
failureAction 服务包的激活模式 “手动”
“Rollback”
healthCheckRetryTimeout 执行 FailureAction 前,当应用程序或群集不正常时,重试运行状况评估所需的时间。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
healthCheckStableDuration 升级继续到下一升级域之前,应用程序或群集必须保持正常的时长。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
healthCheckWaitDuration 应用运行状况策略之前,完成升级域后等待的时间长度。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
upgradeDomainTimeout 执行 FailureAction 前,每个升级域需等待的时长。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串
upgradeTimeout 执行 FailureAction 前,完成整个升级需等待的时长。 首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。 如果那失败,则会将其解释为表示总毫秒数的一个数字。 字符串

ApplicationHealthPolicy

名称 说明
defaultServiceTypeHealthPolicy 默认情况下用于评估服务类型的运行状况的运行状况策略。 ServiceTypeHealthPolicy
serviceTypeHealthPolicies 每个服务类型名称具有服务类型运行状况策略的映射。 映射默认为空。 ServiceTypeHealthPolicyMap
considerWarningAsError 指示是否将警告的严重性视为与错误相同。 需要 bool ()
defaultServiceTypeHealthPolicy 默认情况下用于评估服务类型的运行状况的运行状况策略。 ServiceTypeHealthPolicy
maxPercentUnhealthyDeployedApplications 允许的已部署的不正常应用程序的最大百分比。 允许的值为 0 到 100 的字节值。
该百分比表示在将应用程序视为错误之前可处于不正常状态的已部署应用程序的最大允许百分比。
这是通过将不正常的已部署应用程序数除以群集中应用程序当前部署在上的节点数计算得出的。
计算结果调高为整数,以便容忍少量节点上出现一次失败。 默认百分比为零。
int (必需)
serviceTypeHealthPolicyMap 每个服务类型名称具有服务类型运行状况策略的映射。 映射默认为空。 ServiceTypeHealthPolicyMap

ServiceTypeHealthPolicy

名称 说明
maxPercentUnhealthyServices 在应用程序被视为错误之前允许运行不正常的服务的最大百分比。 int

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyPartitionsPerService 每个服务允许的最大不正常分区百分比。

该百分比表示在将服务视为错误之前,可以运行不正常的分区的最大容许百分比。
如果遵循百分比,但至少有一个不正常的分区,则运行状况评估为“警告”。
百分比的计算方法是将不正常的分区数除以服务中的分区总数。
计算向上舍入,以容忍少量分区出现一次故障。
int (必需)

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyReplicasPerPartition 每个分区允许的最大不正常副本百分比。

该百分比表示在将分区视为错误之前可运行不正常的副本的最大允许百分比。
如果遵循百分比,但至少有一个不正常的副本 (replica) ,则运行状况评估为“警告”。
百分比的计算方法是将不正常副本数除以分区中副本总数。
计算向上舍入,以容忍少量副本出现一次失败。
int (必需)

约束:
最小值 = 0
最大值 = 100
maxPercentUnhealthyServices 不正常服务允许的最大百分比。

该百分比表示在将应用程序视为错误之前可能处于不正常状态的服务的最大容许百分比。
如果遵循百分比,但至少有一个不正常的服务,则运行状况评估为“警告”。
这是通过将特定服务类型的不正常服务数除以特定服务类型的服务总数计算得出的。
计算向上舍入,以容忍少量服务出现一次故障。
int (必需)

约束:
最小值 = 0
最大值 = 100

ServiceTypeHealthPolicyMap

名称 说明
{customized property} ServiceTypeHealthPolicy

RollingUpgradeMonitoringPolicy

名称 说明
failureAction Monitored 升级遇到违反监视策略或运行状况策略的情况时需执行的补救操作。 无效表示失败操作无效。 Rollback 指定升级将开始自动回滚。 手动指示升级将切换到 UnmonitoredManual 升级模式。 “手动”
需要“回滚” ()
healthCheckRetryTimeout 执行 FailureAction 前,当应用程序或群集不正常时,重试运行状况评估所需的时间。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
healthCheckStableDuration 升级继续到下一升级域之前,应用程序或群集必须保持正常的时长。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
healthCheckWaitDuration 应用运行状况策略之前,完成升级域后等待的时间长度。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
upgradeDomainTimeout 执行 FailureAction 前,每个升级域需等待的时长。 不能大于 12 小时。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)
upgradeTimeout 执行 FailureAction 前,完成整个升级需等待的时长。 不能大于 12 小时。 它被解释为表示 ISO 8601 持续时间的字符串,格式为“hh:mm:ss.fff”。 字符串 (必需)