Microsoft.ServiceFabric 叢集/應用程式/服務

Bicep 資源定義

叢集/應用程式/服務資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.ServiceFabric/clusters/applications/services 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.ServiceFabric/clusters/applications/services@2023-11-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  parent: resourceSymbolicName
  properties: {
    correlationScheme: [
      {
        scheme: 'string'
        serviceName: 'string'
      }
    ]
    defaultMoveCost: 'string'
    partitionDescription: {
      partitionScheme: 'string'
      // For remaining properties, see PartitionSchemeDescription objects
    }
    placementConstraints: 'string'
    serviceDnsName: 'string'
    serviceLoadMetrics: [
      {
        defaultLoad: int
        name: 'string'
        primaryDefaultLoad: int
        secondaryDefaultLoad: int
        weight: 'string'
      }
    ]
    servicePackageActivationMode: 'string'
    servicePlacementPolicies: [
      {
      }
    ]
    serviceTypeName: 'string'
    correlationScheme: [
      {
        scheme: 'string'
        serviceName: 'string'
      }
    ]
    defaultMoveCost: 'string'
    partitionDescription: {
      partitionScheme: 'string'
      // For remaining properties, see Partition objects
    }
    placementConstraints: 'string'
    scalingPolicies: [
      {
        scalingMechanism: {
          kind: 'string'
          // For remaining properties, see ScalingMechanism objects
        }
        scalingTrigger: {
          kind: 'string'
          // For remaining properties, see ScalingTrigger objects
        }
      }
    ]
    serviceDnsName: 'string'
    serviceLoadMetrics: [
      {
        defaultLoad: int
        name: 'string'
        primaryDefaultLoad: int
        secondaryDefaultLoad: int
        weight: 'string'
      }
    ]
    servicePackageActivationMode: 'string'
    servicePlacementPolicies: [
      {
        type: 'string'
        // For remaining properties, see ServicePlacementPolicy objects
      }
    ]
    serviceTypeName: 'string'
    serviceKind: 'string'
    // For remaining properties, see ServiceResourceProperties objects
  }
}

ServiceResourceProperties 物件

設定 serviceKind 屬性以指定物件的類型。

針對 具狀態,請使用:

  serviceKind: 'Stateful'
  hasPersistedState: bool
  minReplicaSetSize: int
  quorumLossWaitDuration: 'string'
  replicaRestartWaitDuration: 'string'
  servicePlacementTimeLimit: 'string'
  standByReplicaKeepDuration: 'string'
  targetReplicaSetSize: int

針對 無狀態,請使用:

  serviceKind: 'Stateless'
  instanceCount: int
  minInstanceCount: int
  minInstancePercentage: int

PartitionSchemeDescription 物件

設定 partitionScheme 屬性以指定物件的類型。

針對 [具名],請使用:

  partitionScheme: 'Named'
  count: int
  names: [
    'string'
  ]

針對 Singleton,請使用:

  partitionScheme: 'Singleton'

針對 UniformInt64Range,請使用:

  partitionScheme: 'UniformInt64Range'
  count: int
  highKey: 'string'
  lowKey: 'string'

數據分割物件

設定 partitionScheme 屬性以指定物件的類型。

針對 [具名],請使用:

  partitionScheme: 'Named'
  names: [
    'string'
  ]

針對 Singleton,請使用:

  partitionScheme: 'Singleton'

針對 UniformInt64Range,請使用:

  partitionScheme: 'UniformInt64Range'
  count: int
  highKey: int
  lowKey: int

ScalingMechanism 物件

設定 kind 屬性以指定物件的類型。

針對 AddRemoveIncrementalNamedPartition,請使用:

  kind: 'AddRemoveIncrementalNamedPartition'
  maxPartitionCount: int
  minPartitionCount: int
  scaleIncrement: int

針對 ScalePartitionInstanceCount,請使用:

  kind: 'ScalePartitionInstanceCount'
  maxInstanceCount: int
  minInstanceCount: int
  scaleIncrement: int

縮放Trigger 物件

設定 kind 屬性以指定物件的類型。

針對 AveragePartitionLoadTrigger,請使用:

  kind: 'AveragePartitionLoadTrigger'
  lowerLoadThreshold: int
  metricName: 'string'
  scaleInterval: 'string'
  upperLoadThreshold: int

針對 AverageServiceLoadTrigger,請使用:

  kind: 'AverageServiceLoadTrigger'
  lowerLoadThreshold: int
  metricName: 'string'
  scaleInterval: 'string'
  upperLoadThreshold: int
  useOnlyPrimaryLoad: bool

ServicePlacementPolicy 物件

設定 type 屬性以指定物件的類型。

針對 InvalidDomain,請使用:

  type: 'InvalidDomain'
  domainName: 'string'

針對 NonPartiallyPlaceService,請使用:

  type: 'NonPartiallyPlaceService'

針對 PreferredPrimaryDomain,請使用:

  type: 'PreferredPrimaryDomain'
  domainName: 'string'

針對 RequiredDomain,請使用:

  type: 'RequiredDomain'
  domainName: 'string'

針對 RequiredDomainDistribution,請使用:

  type: 'RequiredDomainDistribution'
  domainName: 'string'

屬性值

clusters/applications/services

名稱 描述
NAME 資源名稱

瞭解如何在 Bicep 中設定子資源的名稱和類型。
字串 (必要)
location 它將會在新的 API 中淘汰,資源位置取決於父資源。 字串
tags Azure 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標記
父系 (parent) 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源之外宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱: 應用程式
properties 服務資源屬性。 ServiceResourceProperties

ServiceResourceProperties

名稱 描述
correlationScheme 描述服務與其他服務相互關聯的清單。 ServiceCorrelationDescription[]
defaultMoveCost 指定服務的移動成本。 'High'
'Low'
'Medium'
'Zero'
partitionDescription 描述如何分割服務。 PartitionSchemeDescription
placementConstraints 以字串表示的放置限制式。 放置條件約束是節點屬性上的布林運算式,可允許根據服務需求將服務限制在特定節點。 例如,若要在 NodeType 為藍色的節點上放置服務,請指定下列專案:“NodeColor == blue) ”。 字串
serviceDnsName 用於服務的 Dns 名稱。 如果指定此名稱,則 DNS 名稱可用來傳回應用層通訊協定的服務端點 IP 位址 (,例如 HTTP) 。
更新 serviceDnsName 時,舊名稱可能會暫時解析。 不過,依賴新的名稱。
拿掉 serviceDnsName 時,移除的名稱可能會暫時解析。 請勿依賴無法解析的名稱。
字串
serviceLoadMetrics 服務負載計量會指定為 ServiceLoadMetricDescription 物件的陣列。 ServiceLoadMetricDescription[]
servicePackageActivationMode 服務封裝的啟用模式 'ExclusiveProcess'
'SharedProcess'
servicePlacementPolicies 描述服務與其他服務相互關聯的清單。 物件 (object)
serviceTypeName 服務類型的名稱 字串
correlationScheme 描述服務與其他服務相互關聯的清單。 ServiceCorrelation[]
defaultMoveCost 指定服務的移動成本。 'High'
'Low'
'Medium'
'Zero'
partitionDescription 描述如何分割服務。 需要分割區 ()
placementConstraints 以字串表示的放置限制式。 放置條件約束是節點屬性上的布林運算式,可允許根據服務需求將服務限制在特定節點。 例如,若要在 NodeType 為藍色的節點上放置服務,請指定下列專案:“NodeColor == blue) ”。 字串
scalingPolicies 調整此服務的原則。 ScalingPolicy[]
serviceDnsName 用於服務的 Dns 名稱。 如果指定這個值,則 DNS 名稱可用來傳回應用層通訊協定的服務端點 IP 位址 (,例如 HTTP) 。
更新 serviceDnsName 時,舊名稱可能暫時可解析。 不過,依賴新名稱。
拿掉 serviceDnsName 時,可能會暫時解析移除的名稱。 請勿依賴無法解析的名稱。
字串
serviceLoadMetrics 服務負載計量會指定為 ServiceLoadMetric 物件的陣列。 ServiceLoadMetric[]
servicePackageActivationMode 服務封裝的啟用模式 'ExclusiveProcess'
'SharedProcess'
servicePlacementPolicies 描述服務與其他服務相互關聯的清單。 ServicePlacementPolicy[]
serviceTypeName 服務類型的名稱 需要字串 ()
serviceKind 設定物件類型 「具狀態」
需要無狀態 ()

ServiceCorrelationDescription

名稱 描述
scheme ServiceCorrelationScheme,描述此服務與透過 ServiceName 指定的服務之間的關聯性。 'Affinity'
'AlignedAffinity'
'Invalid'
需要 'NonAlignedAffinity' ()
serviceName 建立相互關聯性的服務名稱。 需要字串 ()

PartitionSchemeDescription

名稱 描述
partitionScheme 設定物件類型
單一
UniformInt64Range (必要)

NamedPartitionSchemeDescription

名稱 描述
partitionScheme 指定如何分割服務。 'Named' (必要)
計數 分割數目。 需要 int ()
名稱 'count' 參數所指定之大小陣列,以取得資料分割的名稱。 string[] (必要)

SingletonPartitionSchemeDescription

名稱 描述
partitionScheme 指定如何分割服務。 需要 『Singleton』 ()

UniformInt64RangePartitionSchemeDescription

名稱 描述
partitionScheme 指定如何分割服務。 'UniformInt64Range' (必要)
計數 分割數目。 需要 int ()
highKey 字串,指出分割區索引鍵範圍的上限
應該在分割區 『count』 之間分割
需要字串 ()
lowKey 字串,指出分割區索引鍵範圍的下限
應該在分割區 『count』 之間分割
需要字串 ()

ServiceLoadMetricDescription

名稱 描述
defaultLoad 僅用於無狀態服務。 此服務為此計量建立的預設負載數量,以數位表示。 int
NAME 計量的名稱。 如果服務選擇在運行時間期間報告負載,載入計量名稱應該完全符合 Name 中指定的名稱。 請注意,度量名稱要區分大小寫。 需要字串 ()
primaryDefaultLoad 僅用於具狀態服務。 預設的負載量,表示為數字,代表做為主要複本時此服務為此度量所建立的負載量。 int
secondaryDefaultLoad 僅用於具狀態服務。 預設的負載量,表示為數字,代表做為次要複本時此服務為此度量所建立的負載量。 int
重量 服務負載度量相對權數,相較於為此服務設定的其他度量,表示為數字。 'High'
'Low'
'Medium'
'Zero'

ServiceCorrelation

名稱 描述
scheme ServiceCorrelationScheme,描述此服務與透過 ServiceName 指定的服務之間的關聯性。 'AlignedAffinity'
需要 'NonAlignedAffinity' ()
serviceName 建立相互關聯性之服務的 Arm 資源標識碼。 需要字串 ()

分割區

名稱 描述
partitionScheme 設定物件類型
單一
UniformInt64Range (必要)

NamedPartitionScheme

名稱 描述
partitionScheme 指定如何分割服務。 'Named' (必要)
名稱 數據分割名稱的陣列。 string[] (必要)

SingletonPartitionScheme

名稱 描述
partitionScheme 指定如何分割服務。 需要 『Singleton』 ()

UniformInt64RangePartitionScheme

名稱 描述
partitionScheme 指定如何分割服務。 'UniformInt64Range' (必要)
計數 分割數目。 需要 int ()
highKey 分割區索引鍵範圍的上限
應該在分割區 『Count』 之間分割
需要 int ()
lowKey 分割區索引鍵範圍的下限
應該在分割區 『Count』 之間分割
需要 int ()

ScalingPolicy

名稱 描述
scalingMechanism 指定與此調整原則相關聯的機制 需要縮放機制 ()
scalingTrigger 指定與此調整原則相關聯的觸發程式。 需要調整Trigger ()

ScalingMechanism

名稱 描述
kind 設定物件類型 AddRemoveIncrementalNamedPartition
ScalePartitionInstanceCount (必要)

AddRemoveIncrementalNamedPartitionScalingMechanism

名稱 描述
kind 指定與此調整原則相關聯的機制。 'AddRemoveIncrementalNamedPartition' (必要)
maxPartitionCount 服務的具名分割區數目上限。 需要 int ()
minPartitionCount 服務的具名分割區數目下限。 需要 int ()
scaleIncrement 調整作業期間要新增或移除的實例數目。 需要 int ()

PartitionInstanceCountScaleMechanism

名稱 描述
kind 指定與此調整原則相關聯的機制。 'ScalePartitionInstanceCount' (必要)
maxInstanceCount 分割區的實例數目上限。 需要 int ()
minInstanceCount 分割區的實例數目下限。 需要 int ()
scaleIncrement 調整作業期間要新增或移除的實例數目。 需要 int ()

ScalingTrigger

名稱 描述
kind 設定物件類型 AveragePartitionLoadTrigger
AverageServiceLoadTrigger (必要)

AveragePartitionLoadScalingTrigger

名稱 描述
kind 指定與此調整原則相關聯的觸發程式。 'AveragePartitionLoadTrigger' (必要)
lowerLoadThreshold 應執行相應縮小作業的負載下限。 需要 int ()
metricName 應追蹤使用量的計量名稱。 需要字串 ()
scaleInterval 決定是否要調整的秒數。 此屬性應為 ISO 8601 格式 「hh:mm:ss」。。 需要字串 ()
upperLoadThreshold 應執行相應放大作業的負載上限。 需要 int ()

AverageServiceLoadScalingTrigger

名稱 描述
kind 指定與此調整原則相關聯的觸發程式。 需要 'AverageServiceLoadTrigger' ()
lowerLoadThreshold 應執行相應縮小作業的負載下限。 需要 int ()
metricName 應追蹤使用量的計量名稱。 需要字串 ()
scaleInterval 決定是否要調整的秒數。 此屬性應為 ISO 8601 格式 「hh:mm:ss」。。 需要字串 ()
upperLoadThreshold 應執行相應放大作業的負載上限。 需要 int ()
useOnlyPrimaryLoad 旗標會判斷是否應該只考慮主要複本的負載以進行調整。 如果設定為 true,則觸發程式只會考慮具狀態服務的主要復本負載。 如果設定為 false,觸發程式會考慮載入所有複本。 無狀態服務無法將此參數設定為 true。 bool (必要)

ServiceLoadMetric

名稱 描述
defaultLoad 僅用於無狀態服務。 此服務為此計量建立的預設負載數量,以數位表示。 int
NAME 計量的名稱。 如果服務選擇在運行時間期間報告負載,載入計量名稱應該完全符合 Name 中指定的名稱。 請注意,度量名稱要區分大小寫。 需要字串 ()
primaryDefaultLoad 僅用於具狀態服務。 預設的負載量,表示為數字,代表做為主要複本時此服務為此度量所建立的負載量。 int
secondaryDefaultLoad 僅用於具狀態服務。 預設的負載量,表示為數字,代表做為次要複本時此服務為此度量所建立的負載量。 int
重量 服務負載度量相對權數,相較於為此服務設定的其他度量,表示為數字。 'High'
'Low'
'Medium'
'Zero'

ServicePlacementPolicy

名稱 描述
類型 設定物件類型 InvalidDomain
NonPartiallyPlaceService
PreferredPrimaryDomain
RequiredDomain
RequiredDomainDistribution (必要)

ServicePlacementInvalidDomainPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 'InvalidDomain' (必要)
domainName 不應該用於放置的功能變數名稱。 需要字串 ()

ServicePlacementNonPartiallyPlaceServicePolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 'NonPartiallyPlaceService' (必要)

ServicePlacementPreferPrimaryDomainPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 'PreferredPrimaryDomain' (必要)
domainName 根據此原則,應該用於放置的功能變數名稱。 需要字串 ()

ServicePlacementRequiredDomainPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 'RequiredDomain' (必要)
domainName 根據此原則,應該用於放置的功能變數名稱。 需要字串 ()

ServicePlacementRequireDomainDistributionPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 'RequiredDomainDistribution' (必要)
domainName 根據此原則,應該用於放置的功能變數名稱。 需要字串 ()

StatefulServiceProperties

名稱 描述
serviceKind 無狀態或具狀態) 的服務 (類型。 必要) 「具狀態」 (
hasPersistedState 旗標,指出此是否為持續性服務,它會將狀態儲存在本機磁碟上。 如果是,則此屬性的值為 true,否則為 false。 bool
minReplicaSetSize 以數字表示的最小複本集大小。 int

約束:
最小值 = 1
quorumLossWaitDuration 允許分割區處於仲裁遺失狀態的最大持續時間,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
replicaRestartWaitDuration 當復本關閉和建立新復本時之間的持續時間,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
servicePlacementTimeLimit 復本在報告建置停滯之前可保留 InBuild 的持續時間,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
standByReplicaKeepDuration 在移除之前應維護 StandBy 複本的定義,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
targetReplicaSetSize 以數字表示的目標複本集大小。 int

約束:
最小值 = 1

StatelessServiceProperties

名稱 描述
serviceKind 無狀態或具狀態) 的服務 (類型。 必要) ('Stateless'
instanceCount 執行個體計數。 int (必要)
minInstanceCount MinInstanceCount 是必須在升級或停用節點等作業期間符合 EnsureAvailability 安全檢查的最小實例數目。 使用的實際數位為 max ( MinInstanceCount,ceil ( MinInstancePercentage/100.0 * InstanceCount) ) 。 請注意,如果 InstanceCount 設定為 -1,則 MinInstanceCount 計算 -1 期間會先轉換成允許根據服務放置條件約束放置實例的節點數目。 int
minInstancePercentage MinInstancePercentage 是 InstanceCount 的最小百分比,必須在升級或停用節點等作業期間符合 EnsureAvailability 安全檢查。 使用的實際數位為 max ( MinInstanceCount,ceil ( MinInstancePercentage/100.0 * InstanceCount) ) 。 請注意,如果 InstanceCount 設定為 -1,在 MinInstancePercentage 計算期間,-1 會先轉換成允許根據服務放置條件約束的實例數目。 int

ARM 範本資源定義

叢集/應用程式/服務資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.ServiceFabric/clusters/applications/services 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.ServiceFabric/clusters/applications/services",
  "apiVersion": "2023-11-01-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "correlationScheme": [
      {
        "scheme": "string",
        "serviceName": "string"
      }
    ],
    "defaultMoveCost": "string",
    "partitionDescription": {
      "partitionScheme": "string"
      // For remaining properties, see PartitionSchemeDescription objects
    },
    "placementConstraints": "string",
    "serviceDnsName": "string",
    "serviceLoadMetrics": [
      {
        "defaultLoad": "int",
        "name": "string",
        "primaryDefaultLoad": "int",
        "secondaryDefaultLoad": "int",
        "weight": "string"
      }
    ],
    "servicePackageActivationMode": "string",
    "servicePlacementPolicies": [
      {
      }
    ],
    "serviceTypeName": "string",
    "correlationScheme": [
      {
        "scheme": "string",
        "serviceName": "string"
      }
    ],
    "defaultMoveCost": "string",
    "partitionDescription": {
      "partitionScheme": "string"
      // For remaining properties, see Partition objects
    },
    "placementConstraints": "string",
    "scalingPolicies": [
      {
        "scalingMechanism": {
          "kind": "string"
          // For remaining properties, see ScalingMechanism objects
        },
        "scalingTrigger": {
          "kind": "string"
          // For remaining properties, see ScalingTrigger objects
        }
      }
    ],
    "serviceDnsName": "string",
    "serviceLoadMetrics": [
      {
        "defaultLoad": "int",
        "name": "string",
        "primaryDefaultLoad": "int",
        "secondaryDefaultLoad": "int",
        "weight": "string"
      }
    ],
    "servicePackageActivationMode": "string",
    "servicePlacementPolicies": [
      {
        "type": "string"
        // For remaining properties, see ServicePlacementPolicy objects
      }
    ],
    "serviceTypeName": "string",
    "serviceKind": "string"
    // For remaining properties, see ServiceResourceProperties objects
  }
}

ServiceResourceProperties 物件

設定 serviceKind 屬性以指定物件的類型。

針對 具狀態,請使用:

  "serviceKind": "Stateful",
  "hasPersistedState": "bool",
  "minReplicaSetSize": "int",
  "quorumLossWaitDuration": "string",
  "replicaRestartWaitDuration": "string",
  "servicePlacementTimeLimit": "string",
  "standByReplicaKeepDuration": "string",
  "targetReplicaSetSize": "int"

針對 無狀態,請使用:

  "serviceKind": "Stateless",
  "instanceCount": "int",
  "minInstanceCount": "int",
  "minInstancePercentage": "int"

PartitionSchemeDescription 物件

設定 partitionScheme 屬性以指定物件的類型。

針對 [具名],請使用:

  "partitionScheme": "Named",
  "count": "int",
  "names": [ "string" ]

針對 Singleton,請使用:

  "partitionScheme": "Singleton"

針對 UniformInt64Range,請使用:

  "partitionScheme": "UniformInt64Range",
  "count": "int",
  "highKey": "string",
  "lowKey": "string"

數據分割物件

設定 partitionScheme 屬性以指定物件的類型。

針對 [具名],請使用:

  "partitionScheme": "Named",
  "names": [ "string" ]

針對 Singleton,請使用:

  "partitionScheme": "Singleton"

針對 UniformInt64Range,請使用:

  "partitionScheme": "UniformInt64Range",
  "count": "int",
  "highKey": "int",
  "lowKey": "int"

ScalingMechanism 物件

設定 kind 屬性以指定物件的類型。

針對 AddRemoveIncrementalNamedPartition,請使用:

  "kind": "AddRemoveIncrementalNamedPartition",
  "maxPartitionCount": "int",
  "minPartitionCount": "int",
  "scaleIncrement": "int"

針對 ScalePartitionInstanceCount,請使用:

  "kind": "ScalePartitionInstanceCount",
  "maxInstanceCount": "int",
  "minInstanceCount": "int",
  "scaleIncrement": "int"

縮放Trigger 物件

設定 kind 屬性以指定物件的類型。

針對 AveragePartitionLoadTrigger,請使用:

  "kind": "AveragePartitionLoadTrigger",
  "lowerLoadThreshold": "int",
  "metricName": "string",
  "scaleInterval": "string",
  "upperLoadThreshold": "int"

針對 AverageServiceLoadTrigger,請使用:

  "kind": "AverageServiceLoadTrigger",
  "lowerLoadThreshold": "int",
  "metricName": "string",
  "scaleInterval": "string",
  "upperLoadThreshold": "int",
  "useOnlyPrimaryLoad": "bool"

ServicePlacementPolicy 物件

設定 type 屬性以指定物件的類型。

針對 InvalidDomain,請使用:

  "type": "InvalidDomain",
  "domainName": "string"

針對 NonPartiallyPlaceService,請使用:

  "type": "NonPartiallyPlaceService"

針對 PreferredPrimaryDomain,請使用:

  "type": "PreferredPrimaryDomain",
  "domainName": "string"

針對 RequiredDomain,請使用:

  "type": "RequiredDomain",
  "domainName": "string"

針對 RequiredDomainDistribution,請使用:

  "type": "RequiredDomainDistribution",
  "domainName": "string"

屬性值

clusters/applications/services

名稱 描述
類型 資源類型 'Microsoft.ServiceFabric/clusters/applications/services'
apiVersion 資源 API 版本 '2023-11-01-preview'
NAME 資源名稱

請參閱如何在 JSON ARM 樣本中設定子資源的名稱和類型。
字串 (必要)
location 它將會在新的 API 中被取代,資源位置取決於父資源。 字串
tags Azure 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標籤
properties 服務資源屬性。 ServiceResourceProperties

ServiceResourceProperties

名稱 描述
correlationScheme 描述服務與其他服務相互關聯的清單。 ServiceCorrelationDescription[]
defaultMoveCost 指定服務的移動成本。 'High'
'Low'
'Medium'
'Zero'
partitionDescription 描述如何分割服務。 PartitionSchemeDescription
placementConstraints 以字串表示的放置限制式。 放置條件約束是節點屬性上的布林運算式,可允許根據服務需求將服務限制在特定節點。 例如,若要在 NodeType 為藍色的節點上放置服務,請指定下列專案:“NodeColor == blue) ”。 字串
serviceDnsName 用於服務的 Dns 名稱。 如果指定這個值,則 DNS 名稱可用來傳回應用層通訊協定的服務端點 IP 位址 (,例如 HTTP) 。
更新 serviceDnsName 時,舊名稱可能暫時可解析。 不過,依賴新名稱。
拿掉 serviceDnsName 時,可能會暫時解析移除的名稱。 請勿依賴無法解析的名稱。
字串
serviceLoadMetrics 服務負載計量會指定為 ServiceLoadMetricDescription 物件的陣列。 ServiceLoadMetricDescription[]
servicePackageActivationMode 服務封裝的啟用模式 'ExclusiveProcess'
'SharedProcess'
servicePlacementPolicies 描述服務與其他服務相互關聯的清單。 物件 (object)
serviceTypeName 服務類型的名稱 字串
correlationScheme 描述服務與其他服務相互關聯的清單。 ServiceCorrelation[]
defaultMoveCost 指定服務的移動成本。 'High'
'Low'
'Medium'
'Zero'
partitionDescription 描述如何分割服務。 需要分割區 ()
placementConstraints 以字串表示的放置限制式。 放置條件約束是節點屬性上的布林運算式,可允許根據服務需求將服務限制在特定節點。 例如,若要在 NodeType 為藍色的節點上放置服務,請指定下列專案:“NodeColor == blue) ”。 字串
scalingPolicies 調整此服務的原則。 ScalingPolicy[]
serviceDnsName 用於服務的 Dns 名稱。 如果指定這個值,則 DNS 名稱可用來傳回應用層通訊協定的服務端點 IP 位址 (,例如 HTTP) 。
更新 serviceDnsName 時,舊名稱可能暫時可解析。 不過,依賴新名稱。
拿掉 serviceDnsName 時,可能會暫時解析移除的名稱。 請勿依賴無法解析的名稱。
字串
serviceLoadMetrics 服務負載計量會指定為 ServiceLoadMetric 物件的陣列。 ServiceLoadMetric[]
servicePackageActivationMode 服務封裝的啟用模式 'ExclusiveProcess'
'SharedProcess'
servicePlacementPolicies 描述服務與其他服務相互關聯的清單。 ServicePlacementPolicy[]
serviceTypeName 服務類型的名稱 需要字串 ()
serviceKind 設定物件類型 「具狀態」
需要無狀態 ()

ServiceCorrelationDescription

名稱 描述
scheme ServiceCorrelationScheme,描述此服務與透過 ServiceName 指定的服務之間的關聯性。 'Affinity'
'AlignedAffinity'
'Invalid'
需要 'NonAlignedAffinity' ()
serviceName 建立相互關聯性的服務名稱。 需要字串 ()

PartitionSchemeDescription

名稱 描述
partitionScheme 設定物件類型
單一
UniformInt64Range (必要)

NamedPartitionSchemeDescription

名稱 描述
partitionScheme 指定如何分割服務。 'Named' (必要)
計數 分割數目。 需要 int ()
名稱 'count' 參數所指定之大小陣列,以取得資料分割的名稱。 string[] (必要)

SingletonPartitionSchemeDescription

名稱 描述
partitionScheme 指定如何分割服務。 需要 『Singleton』 ()

UniformInt64RangePartitionSchemeDescription

名稱 描述
partitionScheme 指定如何分割服務。 'UniformInt64Range' (必要)
計數 分割數目。 需要 int ()
highKey 字串,指出分割區索引鍵範圍的上限
應該在分割區 『count』 之間分割
需要字串 ()
lowKey 字串,指出分割區索引鍵範圍的下限
應該在分割區 『count』 之間分割
需要字串 ()

ServiceLoadMetricDescription

名稱 描述
defaultLoad 僅用於無狀態服務。 此服務為此計量建立的預設負載數量,以數位表示。 int
NAME 計量的名稱。 如果服務選擇在運行時間期間報告負載,載入計量名稱應該完全符合 Name 中指定的名稱。 請注意,度量名稱要區分大小寫。 需要字串 ()
primaryDefaultLoad 僅用於具狀態服務。 預設的負載量,表示為數字,代表做為主要複本時此服務為此度量所建立的負載量。 int
secondaryDefaultLoad 僅用於具狀態服務。 預設的負載量,表示為數字,代表做為次要複本時此服務為此度量所建立的負載量。 int
重量 服務負載度量相對權數,相較於為此服務設定的其他度量,表示為數字。 'High'
'Low'
'Medium'
'Zero'

ServiceCorrelation

名稱 描述
scheme ServiceCorrelationScheme,描述此服務與透過 ServiceName 指定的服務之間的關聯性。 'AlignedAffinity'
需要 'NonAlignedAffinity' ()
serviceName 建立相互關聯性之服務的 Arm 資源標識碼。 需要字串 ()

分割區

名稱 描述
partitionScheme 設定物件類型
單一
UniformInt64Range (必要)

NamedPartitionScheme

名稱 描述
partitionScheme 指定如何分割服務。 「具名」 (必要)
名稱 分割區名稱的陣列。 string[] (必要)

SingletonPartitionScheme

名稱 描述
partitionScheme 指定如何分割服務。 「單一」 (必要)

UniformInt64RangePartitionScheme

名稱 描述
partitionScheme 指定如何分割服務。 'UniformInt64Range' (必要)
計數 分割數目。 int (必要)
highKey 分割區索引鍵範圍的上限
應在分割區 『Count』 之間分割
int (必要)
lowKey 分割區索引鍵範圍的下限
應在分割區 『Count』 之間分割
int (必要)

ScalingPolicy

名稱 描述
scalingMechanism 指定與此調整原則相關聯的機制 需要縮放機制 ()
scalingTrigger 指定與此調整原則相關聯的觸發程式。 需要調整Trigger ()

ScalingMechanism

名稱 描述
kind 設定物件類型 AddRemoveIncrementalNamedPartition
ScalePartitionInstanceCount (必要)

AddRemoveIncrementalNamedPartitionScalingMechanism

名稱 描述
kind 指定與此調整原則相關聯的機制。 'AddRemoveIncrementalNamedPartition' (必要)
maxPartitionCount 服務的具名分割區數目上限。 int (必要)
minPartitionCount 服務的具名分割區數目下限。 int (必要)
scaleIncrement 調整作業期間要新增或移除的實例數目。 int (必要)

PartitionInstanceCountScaleMechanism

名稱 描述
kind 指定與此調整原則相關聯的機制。 'ScalePartitionInstanceCount' (必要)
maxInstanceCount 分割區的實例數目上限。 int (必要)
minInstanceCount 分割區的實例數目下限。 int (必要)
scaleIncrement 調整作業期間要新增或移除的實例數目。 int (必要)

ScalingTrigger

名稱 描述
kind 設定物件類型 AveragePartitionLoadTrigger
AverageServiceLoadTrigger (必要)

AveragePartitionLoadScalingTrigger

名稱 描述
kind 指定與此調整原則相關聯的觸發程式。 'AveragePartitionLoadTrigger' (必要)
lowerLoadThreshold 應執行相應縮小作業的負載下限。 int (必要)
metricName 應追蹤使用量的計量名稱。 字串 (必要)
scaleInterval 決定是否要調整的秒數。 此屬性應以 ISO 8601 格式為 「hh:mm:ss」。。 字串 (必要)
upperLoadThreshold 應該執行相應放大作業的負載上限。 int (必要)

AverageServiceLoadScalingTrigger

名稱 描述
kind 指定與此調整原則相關聯的觸發程式。 需要 'AverageServiceLoadTrigger' ()
lowerLoadThreshold 應執行相應縮小作業的負載下限。 int (必要)
metricName 應追蹤使用量的計量名稱。 字串 (必要)
scaleInterval 決定是否要調整的秒數。 此屬性應以 ISO 8601 格式為 「hh:mm:ss」。。 字串 (必要)
upperLoadThreshold 應該執行相應放大作業的負載上限。 int (必要)
useOnlyPrimaryLoad 旗標會決定是否只考慮主要複本的負載以進行調整。 如果設定為 true,則觸發程式只會考慮具狀態服務的主要復本負載。 如果設定為 false,觸發程式會考慮載入所有複本。 無狀態服務無法將此參數設定為 true。 bool (必要)

ServiceLoadMetric

名稱 描述
defaultLoad 僅適用於無狀態服務。 此服務為此計量所建立的預設負載數量,以數位表示。 int
NAME 計量的名稱。 如果服務選擇在運行時間報告負載,負載計量名稱應該與 Name 中指定的名稱完全相符。 請注意,度量名稱要區分大小寫。 字串 (必要)
primaryDefaultLoad 僅適用於具狀態服務。 預設的負載量,表示為數字,代表做為主要複本時此服務為此度量所建立的負載量。 int
secondaryDefaultLoad 僅適用於具狀態服務。 預設的負載量,表示為數字,代表做為次要複本時此服務為此度量所建立的負載量。 int
重量 服務負載度量相對權數,相較於為此服務設定的其他度量,表示為數字。 'High'
'Low'
'Medium'
'Zero'

ServicePlacementPolicy

名稱 描述
類型 設定物件類型 InvalidDomain
NonPartiallyPlaceService
PreferredPrimaryDomain
RequiredDomain
RequiredDomainDistribution (必要)

ServicePlacementInvalidDomainPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 必要) 'InvalidDomain' (
domainName 不應用於放置的功能變數名稱。 字串 (必要)

ServicePlacementNonPartiallyPlaceServicePolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 'NonPartiallyPlaceService' (必要)

ServicePlacementPreferPrimaryDomainPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 'PreferredPrimaryDomain' (必要)
domainName 根據此原則,應該用於放置的功能變數名稱。 需要字串 ()

ServicePlacementRequiredDomainPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 'RequiredDomain' (必要)
domainName 根據此原則,應該用於放置的功能變數名稱。 需要字串 ()

ServicePlacementRequireDomainDistributionPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 'RequiredDomainDistribution' (必要)
domainName 根據此原則,應該用於放置的功能變數名稱。 需要字串 ()

StatefulServiceProperties

名稱 描述
serviceKind 服務類型 (無狀態或具狀態) 。 「具狀態」 (必要)
hasPersistedState 旗標,指出這是否為永續性服務,它會將狀態儲存在本機磁碟上。 如果是 ,則此屬性的值為 true,否則為 false。 bool
minReplicaSetSize 以數字表示的最小複本集大小。 int

約束:
最小值 = 1
quorumLossWaitDuration 允許分割區處於仲裁遺失狀態的最大持續時間,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
replicaRestartWaitDuration 復本關閉和建立新復本之間的持續時間,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
servicePlacementTimeLimit 在報告組建停滯之前,複本可以保持 InBuild 的持續時間,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
standByReplicaKeepDuration 在移除之前,應維護 StandBy 複本長度的定義,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
targetReplicaSetSize 以數字表示的目標複本集大小。 int

約束:
最小值 = 1

StatelessServiceProperties

名稱 描述
serviceKind 服務類型 (無狀態或具狀態) 。 必要) 「無狀態」 (
instanceCount 執行個體計數。 需要 int ()
minInstanceCount MinInstanceCount 是在升級或停用節點等作業期間必須符合 EnsureAvailability 安全檢查的最小實例數目。 使用的實際數位為 max ( MinInstanceCount,ceil ( MinInstancePercentage/100.0 * InstanceCount) ) 。 請注意,如果 InstanceCount 設定為 -1,在 MinInstanceCount 計算期間 -1 會先轉換成允許根據服務放置條件約束放置實例的節點數目。 int
minInstancePercentage MinInstancePercentage 是 InstanceCount 的最小百分比,必須符合升級或停用節點等作業期間的 EnsureAvailability 安全檢查。 使用的實際數位為 max ( MinInstanceCount,ceil ( MinInstancePercentage/100.0 * InstanceCount) ) 。 請注意,如果 InstanceCount 設定為 -1,在 MinInstancePercentage 計算期間,-1 會先轉換成允許根據服務放置條件約束放置實例的節點數目。 int

Terraform (AzAPI 提供者) 資源定義

叢集/應用程式/服務資源類型可以使用目標作業來部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.ServiceFabric/clusters/applications/services 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ServiceFabric/clusters/applications/services@2023-11-01-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      correlationScheme = [
        {
          scheme = "string"
          serviceName = "string"
        }
      ]
      defaultMoveCost = "string"
      partitionDescription = {
        partitionScheme = "string"
        // For remaining properties, see PartitionSchemeDescription objects
      }
      placementConstraints = "string"
      serviceDnsName = "string"
      serviceLoadMetrics = [
        {
          defaultLoad = int
          name = "string"
          primaryDefaultLoad = int
          secondaryDefaultLoad = int
          weight = "string"
        }
      ]
      servicePackageActivationMode = "string"
      servicePlacementPolicies = [
        {
        }
      ]
      serviceTypeName = "string"
      correlationScheme = [
        {
          scheme = "string"
          serviceName = "string"
        }
      ]
      defaultMoveCost = "string"
      partitionDescription = {
        partitionScheme = "string"
        // For remaining properties, see Partition objects
      }
      placementConstraints = "string"
      scalingPolicies = [
        {
          scalingMechanism = {
            kind = "string"
            // For remaining properties, see ScalingMechanism objects
          }
          scalingTrigger = {
            kind = "string"
            // For remaining properties, see ScalingTrigger objects
          }
        }
      ]
      serviceDnsName = "string"
      serviceLoadMetrics = [
        {
          defaultLoad = int
          name = "string"
          primaryDefaultLoad = int
          secondaryDefaultLoad = int
          weight = "string"
        }
      ]
      servicePackageActivationMode = "string"
      servicePlacementPolicies = [
        {
          type = "string"
          // For remaining properties, see ServicePlacementPolicy objects
        }
      ]
      serviceTypeName = "string"
      serviceKind = "string"
      // For remaining properties, see ServiceResourceProperties objects
    }
  })
}

ServiceResourceProperties 物件

設定 serviceKind 屬性以指定物件的類型。

針對 具狀態,請使用:

  serviceKind = "Stateful"
  hasPersistedState = bool
  minReplicaSetSize = int
  quorumLossWaitDuration = "string"
  replicaRestartWaitDuration = "string"
  servicePlacementTimeLimit = "string"
  standByReplicaKeepDuration = "string"
  targetReplicaSetSize = int

針對 無狀態,請使用:

  serviceKind = "Stateless"
  instanceCount = int
  minInstanceCount = int
  minInstancePercentage = int

PartitionSchemeDescription 物件

設定 partitionScheme 屬性以指定物件的類型。

針對 [具名],請使用:

  partitionScheme = "Named"
  count = int
  names = [
    "string"
  ]

針對 Singleton,請使用:

  partitionScheme = "Singleton"

針對 UniformInt64Range,請使用:

  partitionScheme = "UniformInt64Range"
  count = int
  highKey = "string"
  lowKey = "string"

數據分割物件

設定 partitionScheme 屬性以指定物件的類型。

針對 [具名],請使用:

  partitionScheme = "Named"
  names = [
    "string"
  ]

針對 Singleton,請使用:

  partitionScheme = "Singleton"

針對 UniformInt64Range,請使用:

  partitionScheme = "UniformInt64Range"
  count = int
  highKey = int
  lowKey = int

ScalingMechanism 物件

設定 kind 屬性以指定物件的類型。

針對 AddRemoveIncrementalNamedPartition,請使用:

  kind = "AddRemoveIncrementalNamedPartition"
  maxPartitionCount = int
  minPartitionCount = int
  scaleIncrement = int

針對 ScalePartitionInstanceCount,請使用:

  kind = "ScalePartitionInstanceCount"
  maxInstanceCount = int
  minInstanceCount = int
  scaleIncrement = int

ScalingTrigger 物件

設定 kind 屬性以指定物件的類型。

針對 AveragePartitionLoadTrigger,請使用:

  kind = "AveragePartitionLoadTrigger"
  lowerLoadThreshold = int
  metricName = "string"
  scaleInterval = "string"
  upperLoadThreshold = int

針對 AverageServiceLoadTrigger,請使用:

  kind = "AverageServiceLoadTrigger"
  lowerLoadThreshold = int
  metricName = "string"
  scaleInterval = "string"
  upperLoadThreshold = int
  useOnlyPrimaryLoad = bool

ServicePlacementPolicy 物件

設定 type 屬性以指定物件的類型。

針對 InvalidDomain,請使用:

  type = "InvalidDomain"
  domainName = "string"

針對 NonPartiallyPlaceService,請使用:

  type = "NonPartiallyPlaceService"

針對 PreferredPrimaryDomain,請使用:

  type = "PreferredPrimaryDomain"
  domainName = "string"

針對 RequiredDomain,請使用:

  type = "RequiredDomain"
  domainName = "string"

針對 RequiredDomainDistribution,請使用:

  type = "RequiredDomainDistribution"
  domainName = "string"

屬性值

clusters/applications/services

名稱 描述
類型 資源類型 “Microsoft.ServiceFabric/clusters/applications/services@2023-11-01-preview”
NAME 資源名稱 需要字串 ()
location 它將會在新的 API 中被取代,資源位置取決於父資源。 字串
parent_id 此資源父系之資源的標識碼。 類型資源的標識碼: 應用程式
tags Azure 資源標籤。 標記名稱和值的字典。
properties 服務資源屬性。 ServiceResourceProperties

ServiceResourceProperties

名稱 描述
correlationScheme 描述服務與其他服務相互關聯的清單。 ServiceCorrelationDescription[]
defaultMoveCost 指定服務的移動成本。 "High"
"Low"
“Medium”
“零”
partitionDescription 描述如何分割服務。 PartitionSchemeDescription
placementConstraints 以字串表示的放置限制式。 放置條件約束是節點屬性上的布林運算式,可允許根據服務需求將服務限制在特定節點。 例如,若要在 NodeType 為藍色的節點上放置服務,請指定下列專案:“NodeColor == blue) ”。 字串
serviceDnsName 用於服務的 Dns 名稱。 如果指定這個值,則 DNS 名稱可用來傳回應用層通訊協定的服務端點 IP 位址 (,例如 HTTP) 。
更新 serviceDnsName 時,舊名稱可能暫時可解析。 不過,依賴新名稱。
拿掉 serviceDnsName 時,可能會暫時解析移除的名稱。 請勿依賴無法解析的名稱。
字串
serviceLoadMetrics 服務負載計量會指定為 ServiceLoadMetricDescription 物件的陣列。 ServiceLoadMetricDescription[]
servicePackageActivationMode 服務封裝的啟用模式 “ExclusiveProcess”
“SharedProcess”
servicePlacementPolicies 描述服務與其他服務相互關聯的清單。 物件 (object)
serviceTypeName 服務類型的名稱 字串
correlationScheme 描述服務與其他服務相互關聯的清單。 ServiceCorrelation[]
defaultMoveCost 指定服務的移動成本。 "High"
"Low"
“Medium”
“零”
partitionDescription 描述如何分割服務。 需要分割區 ()
placementConstraints 以字串表示的放置限制式。 放置條件約束是節點屬性上的布林運算式,可允許根據服務需求將服務限制在特定節點。 例如,若要在 NodeType 為藍色的節點上放置服務,請指定下列專案:“NodeColor == blue) ”。 字串
scalingPolicies 調整此服務的原則。 ScalingPolicy[]
serviceDnsName 用於服務的 Dns 名稱。 如果指定這個值,則 DNS 名稱可用來傳回應用層通訊協定的服務端點 IP 位址 (,例如 HTTP) 。
更新 serviceDnsName 時,舊名稱可能暫時可解析。 不過,依賴新名稱。
拿掉 serviceDnsName 時,可能會暫時解析移除的名稱。 請勿依賴無法解析的名稱。
字串
serviceLoadMetrics 服務負載計量會指定為 ServiceLoadMetric 物件的陣列。 ServiceLoadMetric[]
servicePackageActivationMode 服務封裝的啟用模式 “ExclusiveProcess”
“SharedProcess”
servicePlacementPolicies 描述服務與其他服務相互關聯的清單。 ServicePlacementPolicy[]
serviceTypeName 服務類型的名稱 需要字串 ()
serviceKind 設定物件類型 「具狀態」
需要無狀態 ()

ServiceCorrelationDescription

名稱 描述
scheme ServiceCorrelationScheme,描述此服務與透過 ServiceName 指定的服務之間的關聯性。 “Affinity”
“AlignedAffinity”
“Invalid”
“NonAlignedAffinity” (必要)
serviceName 建立相互關聯性的服務名稱。 需要字串 ()

PartitionSchemeDescription

名稱 描述
partitionScheme 設定物件類型
單一
UniformInt64Range (必要)

NamedPartitionSchemeDescription

名稱 描述
partitionScheme 指定如何分割服務。 「具名」 (必要)
計數 分割數目。 需要 int ()
名稱 'count' 參數所指定之大小陣列,以取得資料分割的名稱。 string[] (必要)

SingletonPartitionSchemeDescription

名稱 描述
partitionScheme 指定如何分割服務。 “Singleton” (必要)

UniformInt64RangePartitionSchemeDescription

名稱 描述
partitionScheme 指定如何分割服務。 “UniformInt64Range” (必要)
計數 分割數目。 需要 int ()
highKey 字串,指出分割區索引鍵範圍的上限
應該在分割區 『count』 之間分割
需要字串 ()
lowKey 字串,指出分割區索引鍵範圍的下限
應該在分割區 『count』 之間分割
需要字串 ()

ServiceLoadMetricDescription

名稱 描述
defaultLoad 僅用於無狀態服務。 此服務為此計量建立的預設負載數量,以數位表示。 int
NAME 計量的名稱。 如果服務選擇在運行時間期間報告負載,載入計量名稱應該完全符合 Name 中指定的名稱。 請注意,度量名稱要區分大小寫。 需要字串 ()
primaryDefaultLoad 僅用於具狀態服務。 預設的負載量,表示為數字,代表做為主要複本時此服務為此度量所建立的負載量。 int
secondaryDefaultLoad 僅用於具狀態服務。 預設的負載量,表示為數字,代表做為次要複本時此服務為此度量所建立的負載量。 int
重量 服務負載度量相對權數,相較於為此服務設定的其他度量,表示為數字。 "High"
"Low"
“Medium”
“零”

ServiceCorrelation

名稱 描述
scheme ServiceCorrelationScheme,描述此服務與透過 ServiceName 指定的服務之間的關聯性。 “AlignedAffinity”
“NonAlignedAffinity” (必要)
serviceName 建立相互關聯性之服務的 Arm 資源標識碼。 需要字串 ()

分割區

名稱 描述
partitionScheme 設定物件類型
單一
UniformInt64Range (必要)

NamedPartitionScheme

名稱 描述
partitionScheme 指定如何分割服務。 「具名」 (必要)
名稱 數據分割名稱的陣列。 string[] (必要)

SingletonPartitionScheme

名稱 描述
partitionScheme 指定如何分割服務。 “Singleton” (必要)

UniformInt64RangePartitionScheme

名稱 描述
partitionScheme 指定如何分割服務。 “UniformInt64Range” (必要)
計數 分割數目。 需要 int ()
highKey 分割區索引鍵範圍的上限
應該在分割區 『Count』 之間分割
需要 int ()
lowKey 分割區索引鍵範圍的下限
應該在分割區 『Count』 之間分割
需要 int ()

ScalingPolicy

名稱 描述
scalingMechanism 指定與此調整原則相關聯的機制 需要縮放機制 ()
scalingTrigger 指定與此調整原則相關聯的觸發程式。 需要調整Trigger ()

ScalingMechanism

名稱 描述
kind 設定物件類型 AddRemoveIncrementalNamedPartition
ScalePartitionInstanceCount (必要)

AddRemoveIncrementalNamedPartitionScalingMechanism

名稱 描述
kind 指定與此調整原則相關聯的機制。 “AddRemoveIncrementalNamedPartition” (必要)
maxPartitionCount 服務的具名分割區數目上限。 需要 int ()
minPartitionCount 服務的具名分割區數目下限。 int (必要)
scaleIncrement 調整作業期間要新增或移除的實例數目。 int (必要)

PartitionInstanceCountScaleMechanism

名稱 描述
kind 指定與此調整原則相關聯的機制。 “ScalePartitionInstanceCount” (必要)
maxInstanceCount 分割區的實例數目上限。 int (必要)
minInstanceCount 分割區的實例數目下限。 int (必要)
scaleIncrement 調整作業期間要新增或移除的實例數目。 int (必要)

ScalingTrigger

名稱 描述
kind 設定物件類型 AveragePartitionLoadTrigger
AverageServiceLoadTrigger (必要)

AveragePartitionLoadScalingTrigger

名稱 描述
kind 指定與此調整原則相關聯的觸發程式。 “AveragePartitionLoadTrigger” (必要)
lowerLoadThreshold 應執行相應縮小作業的負載下限。 int (必要)
metricName 應追蹤使用量的計量名稱。 字串 (必要)
scaleInterval 決定是否要調整的秒數。 此屬性應以 ISO 8601 格式為 「hh:mm:ss」。。 字串 (必要)
upperLoadThreshold 應該執行相應放大作業的負載上限。 int (必要)

AverageServiceLoadScalingTrigger

名稱 描述
kind 指定與此調整原則相關聯的觸發程式。 “AverageServiceLoadTrigger” (必要)
lowerLoadThreshold 應執行相應縮小作業的負載下限。 int (必要)
metricName 應追蹤使用量的計量名稱。 字串 (必要)
scaleInterval 決定是否要調整的秒數。 此屬性應以 ISO 8601 格式為 「hh:mm:ss」。。 字串 (必要)
upperLoadThreshold 應該執行相應放大作業的負載上限。 int (必要)
useOnlyPrimaryLoad 旗標會決定是否只考慮主要複本的負載以進行調整。 如果設定為 true,則觸發程式只會考慮具狀態服務的主要復本負載。 如果設定為 false,觸發程式會考慮載入所有複本。 無狀態服務無法將此參數設定為 true。 bool (必要)

ServiceLoadMetric

名稱 描述
defaultLoad 僅適用於無狀態服務。 此服務為此計量所建立的預設負載數量,以數位表示。 int
NAME 計量的名稱。 如果服務選擇在運行時間報告負載,負載計量名稱應該與 Name 中指定的名稱完全相符。 請注意,度量名稱要區分大小寫。 字串 (必要)
primaryDefaultLoad 僅適用於具狀態服務。 預設的負載量,表示為數字,代表做為主要複本時此服務為此度量所建立的負載量。 int
secondaryDefaultLoad 僅適用於具狀態服務。 預設的負載量,表示為數字,代表做為次要複本時此服務為此度量所建立的負載量。 int
重量 服務負載度量相對權數,相較於為此服務設定的其他度量,表示為數字。 "High"
"Low"
“Medium”
“零”

ServicePlacementPolicy

名稱 描述
類型 設定物件類型 InvalidDomain
NonPartiallyPlaceService
PreferredPrimaryDomain
RequiredDomain
RequiredDomainDistribution (必要)

ServicePlacementInvalidDomainPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 “InvalidDomain” (必要)
domainName 不應該用於放置的功能變數名稱。 需要字串 ()

ServicePlacementNonPartiallyPlaceServicePolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 “NonPartiallyPlaceService” (必要)

ServicePlacementPreferPrimaryDomainPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 “PreferredPrimaryDomain” (必要)
domainName 根據此原則,應該用於放置的功能變數名稱。 需要字串 ()

ServicePlacementRequiredDomainPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 “RequiredDomain” (必要)
domainName 根據此原則,應該用於放置的功能變數名稱。 需要字串 ()

ServicePlacementRequireDomainDistributionPolicy

名稱 描述
類型 Service Fabric 服務的放置原則類型。 以下是可能的值。 “RequiredDomainDistribution” (必要)
domainName 根據此原則,應該用於放置的功能變數名稱。 需要字串 ()

StatefulServiceProperties

名稱 描述
serviceKind 服務類型 (無狀態或具狀態) 。 「具狀態」 (必要)
hasPersistedState 旗標,指出這是否為永續性服務,它會將狀態儲存在本機磁碟上。 如果是 ,則此屬性的值為 true,否則為 false。 bool
minReplicaSetSize 以數字表示的最小複本集大小。 int

約束:
最小值 = 1
quorumLossWaitDuration 允許分割區處於仲裁遺失狀態的最大持續時間,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
replicaRestartWaitDuration 復本關閉和建立新復本之間的持續時間,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
servicePlacementTimeLimit 在報告組建停滯之前,複本可以保持 InBuild 的持續時間,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
standByReplicaKeepDuration 在移除之前,應維護 StandBy 複本長度的定義,以 ISO 8601 格式 「hh:mm:ss」 表示。 字串
targetReplicaSetSize 以數字表示的目標複本集大小。 int

約束:
最小值 = 1

StatelessServiceProperties

名稱 描述
serviceKind 無狀態或具狀態) 的服務 (類型。 「無狀態」 (必要)
instanceCount 執行個體計數。 int (必要)
minInstanceCount MinInstanceCount 是必須在升級或停用節點等作業期間符合 EnsureAvailability 安全檢查的最小實例數目。 使用的實際數位為 max ( MinInstanceCount,ceil ( MinInstancePercentage/100.0 * InstanceCount) ) 。 請注意,如果 InstanceCount 設定為 -1,則 MinInstanceCount 計算 -1 期間會先轉換成允許根據服務放置條件約束放置實例的節點數目。 int
minInstancePercentage MinInstancePercentage 是 InstanceCount 的最小百分比,必須在升級或停用節點等作業期間符合 EnsureAvailability 安全檢查。 使用的實際數位為 max ( MinInstanceCount,ceil ( MinInstancePercentage/100.0 * InstanceCount) ) 。 請注意,如果 InstanceCount 設定為 -1,在 MinInstancePercentage 計算期間,-1 會先轉換成允許根據服務放置條件約束的實例數目。 int