Microsoft.ServiceFabric clusters/applications/services 2019-03-01

Bicep 資源定義

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

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

資源格式

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

resource symbolicname 'Microsoft.ServiceFabric/clusters/applications/services@2019-03-01' = {
  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'
    serviceLoadMetrics: [
      {
        defaultLoad: int
        name: 'string'
        primaryDefaultLoad: int
        secondaryDefaultLoad: int
        weight: 'string'
      }
    ]
    servicePackageActivationMode: 'string'
    servicePlacementPolicies: [
      {
      }
    ]
    serviceTypeName: 'string'
    serviceKind: 'string'
    // For remaining properties, see ServiceResourceProperties objects
  }
}

ServiceResourceProperties 物件

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

針對 具狀態,請使用:

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

針對 無狀態,請使用:

  serviceKind: 'Stateless'
  instanceCount: int

PartitionSchemeDescription 物件

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

針對 [具名],請使用:

  partitionScheme: 'Named'
  Count: int
  Names: [
    'string'
  ]

針對 Singleton,請使用:

  partitionScheme: 'Singleton'

針對 UniformInt64Range,請使用:

  partitionScheme: 'UniformInt64Range'
  Count: int
  HighKey: 'string'
  LowKey: '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) 」。 字串
serviceLoadMetrics 服務負載計量會指定為 ServiceLoadMetricDescription 物件的陣列。 ServiceLoadMetricDescription[]
servicePackageActivationMode 服務封裝的啟用模式 'ExclusiveProcess'
'SharedProcess'
servicePlacementPolicies 描述服務與其他服務相互關聯的清單。 object
serviceTypeName 服務類型的名稱 字串
serviceKind 設定物件類型 「具狀態」
需要無狀態 ()

ServiceCorrelationDescription

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

PartitionSchemeDescription

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

NamedPartitionSchemeDescription

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

SingletonPartitionSchemeDescription

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

UniformInt64RangePartitionSchemeDescription

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

ServiceLoadMetricDescription

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

StatefulServiceProperties

名稱 描述
serviceKind 服務類型 (無狀態或具狀態) 。 「具狀態」 (必要)
hasPersistedState 旗標,指出這是否為永續性服務,它會將狀態儲存在本機磁片上。 如果是 ,則此屬性的值為 true,否則為 false。 bool
minReplicaSetSize 以數字表示的最小複本集大小。 int
quorumLossWaitDuration 允許分割區處於仲裁遺失狀態的最大持續時間,以 ISO 8601 格式表示, (hh:mm:ss.ss.s) 。 字串
replicaRestartWaitDuration 複本關閉和建立新複本的持續時間,以 ISO 8601 格式表示, (hh:mm:ss.s) 。 字串
standByReplicaKeepDuration 在移除之前,應維護 StandBy 複本長度的定義,以 ISO 8601 格式表示, (hh:mm:ss.s) 。 字串
targetReplicaSetSize 以數字表示的目標複本集大小。 int

StatelessServiceProperties

名稱 描述
serviceKind 服務類型 (無狀態或具狀態) 。 必要) 「無狀態」 (
instanceCount 執行個體計數。 int

ARM 範本資源定義

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

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

資源格式

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

{
  "type": "Microsoft.ServiceFabric/clusters/applications/services",
  "apiVersion": "2019-03-01",
  "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",
    "serviceLoadMetrics": [
      {
        "defaultLoad": "int",
        "name": "string",
        "primaryDefaultLoad": "int",
        "secondaryDefaultLoad": "int",
        "weight": "string"
      }
    ],
    "servicePackageActivationMode": "string",
    "servicePlacementPolicies": [
      {
      }
    ],
    "serviceTypeName": "string",
    "serviceKind": "string"
    // For remaining properties, see ServiceResourceProperties objects
  }
}

ServiceResourceProperties 物件

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

針對 具狀態,請使用:

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

針對 無狀態,請使用:

  "serviceKind": "Stateless",
  "instanceCount": "int"

PartitionSchemeDescription 物件

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

針對 [具名],請使用:

  "partitionScheme": "Named",
  "Count": "int",
  "Names": [ "string" ]

針對 Singleton,請使用:

  "partitionScheme": "Singleton"

針對 UniformInt64Range,請使用:

  "partitionScheme": "UniformInt64Range",
  "Count": "int",
  "HighKey": "string",
  "LowKey": "string"

屬性值

clusters/applications/services

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

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

ServiceResourceProperties

名稱 描述
correlationScheme 描述服務與其他服務相互關聯的清單。 ServiceCorrelationDescription[]
defaultMoveCost 指定服務的移動成本。 'High'
'Low'
'Medium'
'Zero'
partitionDescription 描述如何分割服務。 PartitionSchemeDescription
placementConstraints 以字串表示的放置限制式。 放置條件約束是節點屬性上的布林運算式,可允許根據服務需求將服務限制在特定節點。 例如,若要在 NodeType 為藍色的節點上放置服務,請指定下列專案:「NodeColor == blue) 」。 字串
serviceLoadMetrics 服務負載計量會指定為 ServiceLoadMetricDescription 物件的陣列。 ServiceLoadMetricDescription[]
servicePackageActivationMode 服務封裝的啟用模式 'ExclusiveProcess'
'SharedProcess'
servicePlacementPolicies 描述服務與其他服務相互關聯的清單。 object
serviceTypeName 服務類型的名稱 字串
serviceKind 設定物件類型 「具狀態」
需要無狀態 ()

ServiceCorrelationDescription

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

PartitionSchemeDescription

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

NamedPartitionSchemeDescription

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

SingletonPartitionSchemeDescription

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

UniformInt64RangePartitionSchemeDescription

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

ServiceLoadMetricDescription

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

StatefulServiceProperties

名稱 描述
serviceKind 服務類型 (無狀態或具狀態) 。 「具狀態」 (必要)
hasPersistedState 旗標,指出這是否為永續性服務,它會將狀態儲存在本機磁片上。 如果是 ,則此屬性的值為 true,否則為 false。 bool
minReplicaSetSize 以數字表示的最小複本集大小。 int
quorumLossWaitDuration 允許分割區處於仲裁遺失狀態的最大持續時間,以 ISO 8601 格式表示, (hh:mm:ss.ss.s) 。 字串
replicaRestartWaitDuration 複本關閉和建立新複本的持續時間,以 ISO 8601 格式表示, (hh:mm:ss.s) 。 字串
standByReplicaKeepDuration 在移除之前,應維護 StandBy 複本長度的定義,以 ISO 8601 格式表示, (hh:mm:ss.s) 。 字串
targetReplicaSetSize 以數字表示的目標複本集大小。 int

StatelessServiceProperties

名稱 描述
serviceKind 服務類型 (無狀態或具狀態) 。 必要) 「無狀態」 (
instanceCount 執行個體計數。 int

Terraform (AzAPI 提供者) 資源定義

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

  • 資源群組

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

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ServiceFabric/clusters/applications/services@2019-03-01"
  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"
      serviceLoadMetrics = [
        {
          defaultLoad = int
          name = "string"
          primaryDefaultLoad = int
          secondaryDefaultLoad = int
          weight = "string"
        }
      ]
      servicePackageActivationMode = "string"
      servicePlacementPolicies = [
        {
        }
      ]
      serviceTypeName = "string"
      serviceKind = "string"
      // For remaining properties, see ServiceResourceProperties objects
    }
  })
}

ServiceResourceProperties 物件

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

針對 具狀態,請使用:

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

針對 無狀態,請使用:

  serviceKind = "Stateless"
  instanceCount = int

PartitionSchemeDescription 物件

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

針對 [具名],請使用:

  partitionScheme = "Named"
  Count = int
  Names = [
    "string"
  ]

針對 Singleton,請使用:

  partitionScheme = "Singleton"

針對 UniformInt64Range,請使用:

  partitionScheme = "UniformInt64Range"
  Count = int
  HighKey = "string"
  LowKey = "string"

屬性值

clusters/applications/services

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

ServiceResourceProperties

名稱 描述
correlationScheme 描述服務與其他服務相互關聯的清單。 ServiceCorrelationDescription[]
defaultMoveCost 指定服務的移動成本。 "High"
"Low"
「Medium」
「零」
partitionDescription 描述如何分割服務。 PartitionSchemeDescription
placementConstraints 以字串表示的放置限制式。 放置條件約束是節點屬性上的布林運算式,可允許根據服務需求將服務限制在特定節點。 例如,若要在 NodeType 為藍色的節點上放置服務,請指定下列專案:「NodeColor == blue) 」。 字串
serviceLoadMetrics 服務負載計量會指定為 ServiceLoadMetricDescription 物件的陣列。 ServiceLoadMetricDescription[]
servicePackageActivationMode 服務封裝的啟用模式 「ExclusiveProcess」
「SharedProcess」
servicePlacementPolicies 描述服務與其他服務相互關聯的清單。 object
serviceTypeName 服務類型的名稱 字串
serviceKind 設定物件類型 「具狀態」
需要無狀態 ()

ServiceCorrelationDescription

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

PartitionSchemeDescription

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

NamedPartitionSchemeDescription

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

SingletonPartitionSchemeDescription

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

UniformInt64RangePartitionSchemeDescription

名稱 描述
partitionScheme 指定如何分割服務。 「UniformInt64Range」 (必要)
Count 分割數目。 需要 int ()
HighKey 字串,指出分割區索引鍵範圍的上限
應該在分割區 'Count' 之間分割
需要字串 ()
LowKey 字串,指出分割區索引鍵範圍的下限
應該在分割區 'Count' 之間分割
需要字串 ()

ServiceLoadMetricDescription

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

StatefulServiceProperties

名稱 描述
serviceKind 服務類型 (無狀態或具狀態) 。 「具狀態」 (必要)
hasPersistedState 旗標,指出這是否為永續性服務,它會將狀態儲存在本機磁片上。 如果是 ,則此屬性的值為 true,否則為 false。 bool
minReplicaSetSize 以數字表示的最小複本集大小。 int
quorumLossWaitDuration 允許分割區處於仲裁遺失狀態的最大持續時間,以 ISO 8601 格式表示, (hh:mm:ss.ss.s) 。 字串
replicaRestartWaitDuration 複本關閉和建立新複本的持續時間,以 ISO 8601 格式表示, (hh:mm:ss.s) 。 字串
standByReplicaKeepDuration 在移除之前,應維護 StandBy 複本長度的定義,以 ISO 8601 格式表示, (hh:mm:ss.s) 。 字串
targetReplicaSetSize 以數字表示的目標複本集大小。 int

StatelessServiceProperties

名稱 描述
serviceKind 無狀態或具狀態) 的服務 (類型。 「無狀態」 (必要)
instanceCount 執行個體計數。 int