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

Bicep resource definition

The clusters/applications/services resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.ServiceFabric/clusters/applications/services resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.ServiceFabric/clusters/applications/services@2019-03-01' = {
  location: 'string'
  name: 'string'
  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: [
      {
        Type: 'string'
        // For remaining properties, see ServicePlacementPolicyDescription objects
      }
    ]
    serviceTypeName: 'string'
    serviceKind: 'string'
    // For remaining properties, see ServiceResourceProperties objects
  }
  tags: {
    {customized property}: 'string'
  }
}

PartitionSchemeDescription objects

Set the partitionScheme property to specify the type of object.

For Named, use:

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

For Singleton, use:

{
  partitionScheme: 'Singleton'
}

For UniformInt64Range, use:

{
  Count: int
  HighKey: 'string'
  LowKey: 'string'
  partitionScheme: 'UniformInt64Range'
}

ServiceResourceProperties objects

Set the serviceKind property to specify the type of object.

For Stateful, use:

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

For Stateless, use:

{
  instanceCount: int
  serviceKind: 'Stateless'
}

ServicePlacementPolicyDescription objects

Set the Type property to specify the type of object.

Property values

Microsoft.ServiceFabric/clusters/applications/services

Name Description Value
location It will be deprecated in New API, resource location depends on the parent resource. string
name The resource name string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: clusters/applications
properties The service resource properties. ServiceResourceProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates

NamedPartitionSchemeDescription

Name Description Value
Count The number of partitions. int (required)
Names Array of size specified by the ‘Count’ parameter, for the names of the partitions. string[] (required)
partitionScheme Specifies how the service is partitioned. 'Named' (required)

PartitionSchemeDescription

Name Description Value
partitionScheme Set to 'Named' for type NamedPartitionSchemeDescription. Set to 'Singleton' for type SingletonPartitionSchemeDescription. Set to 'UniformInt64Range' for type UniformInt64RangePartitionSchemeDescription. 'Named'
'Singleton'
'UniformInt64Range' (required)

ProxyResourceTags

Name Description Value

ServiceCorrelationDescription

Name Description Value
scheme The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName. 'Affinity'
'AlignedAffinity'
'Invalid'
'NonAlignedAffinity' (required)
serviceName The name of the service that the correlation relationship is established with. string (required)

ServiceLoadMetricDescription

Name Description Value
defaultLoad Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric. int
name The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive. string (required)
primaryDefaultLoad Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica. int
secondaryDefaultLoad Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica. int
weight The service load metric relative weight, compared to other metrics configured for this service, as a number. 'High'
'Low'
'Medium'
'Zero'

ServicePlacementPolicyDescription

Name Description Value
Type (required)

ServiceResourceProperties

Name Description Value
correlationScheme A list that describes the correlation of the service with other services. ServiceCorrelationDescription[]
defaultMoveCost Specifies the move cost for the service. 'High'
'Low'
'Medium'
'Zero'
partitionDescription Describes how the service is partitioned. PartitionSchemeDescription
placementConstraints The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". string
serviceKind Set to 'Stateful' for type StatefulServiceProperties. Set to 'Stateless' for type StatelessServiceProperties. 'Stateful'
'Stateless' (required)
serviceLoadMetrics The service load metrics is given as an array of ServiceLoadMetricDescription objects. ServiceLoadMetricDescription[]
servicePackageActivationMode The activation Mode of the service package 'ExclusiveProcess'
'SharedProcess'
servicePlacementPolicies A list that describes the correlation of the service with other services. ServicePlacementPolicyDescription[]
serviceTypeName The name of the service type string

SingletonPartitionSchemeDescription

Name Description Value
partitionScheme Specifies how the service is partitioned. 'Singleton' (required)

StatefulServiceProperties

Name Description Value
hasPersistedState A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. bool
minReplicaSetSize The minimum replica set size as a number. int

Constraints:
Min value = 1
quorumLossWaitDuration The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s). string
replicaRestartWaitDuration The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s). string
serviceKind The kind of service (Stateless or Stateful). 'Stateful' (required)
standByReplicaKeepDuration The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s). string
targetReplicaSetSize The target replica set size as a number. int

Constraints:
Min value = 1

StatelessServiceProperties

Name Description Value
instanceCount The instance count. int

Constraints:
Min value = -1
serviceKind The kind of service (Stateless or Stateful). 'Stateless' (required)

UniformInt64RangePartitionSchemeDescription

Name Description Value
Count The number of partitions. int (required)
HighKey String indicating the upper bound of the partition key range that
should be split between the partition ‘Count’
string (required)
LowKey String indicating the lower bound of the partition key range that
should be split between the partition ‘Count’
string (required)
partitionScheme Specifies how the service is partitioned. 'UniformInt64Range' (required)

ARM template resource definition

The clusters/applications/services resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

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

{
  "type": "Microsoft.ServiceFabric/clusters/applications/services",
  "apiVersion": "2019-03-01",
  "name": "string",
  "location": "string",
  "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": [ {
      "Type": "string"
      // For remaining properties, see ServicePlacementPolicyDescription objects
    } ],
    "serviceTypeName": "string",
    "serviceKind": "string"
    // For remaining properties, see ServiceResourceProperties objects
  },
  "tags": {
    "{customized property}": "string"
  }
}

PartitionSchemeDescription objects

Set the partitionScheme property to specify the type of object.

For Named, use:

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

For Singleton, use:

{
  "partitionScheme": "Singleton"
}

For UniformInt64Range, use:

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

ServiceResourceProperties objects

Set the serviceKind property to specify the type of object.

For Stateful, use:

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

For Stateless, use:

{
  "instanceCount": "int",
  "serviceKind": "Stateless"
}

ServicePlacementPolicyDescription objects

Set the Type property to specify the type of object.

Property values

Microsoft.ServiceFabric/clusters/applications/services

Name Description Value
apiVersion The api version '2019-03-01'
location It will be deprecated in New API, resource location depends on the parent resource. string
name The resource name string (required)
properties The service resource properties. ServiceResourceProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.ServiceFabric/clusters/applications/services'

NamedPartitionSchemeDescription

Name Description Value
Count The number of partitions. int (required)
Names Array of size specified by the ‘Count’ parameter, for the names of the partitions. string[] (required)
partitionScheme Specifies how the service is partitioned. 'Named' (required)

PartitionSchemeDescription

Name Description Value
partitionScheme Set to 'Named' for type NamedPartitionSchemeDescription. Set to 'Singleton' for type SingletonPartitionSchemeDescription. Set to 'UniformInt64Range' for type UniformInt64RangePartitionSchemeDescription. 'Named'
'Singleton'
'UniformInt64Range' (required)

ProxyResourceTags

Name Description Value

ServiceCorrelationDescription

Name Description Value
scheme The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName. 'Affinity'
'AlignedAffinity'
'Invalid'
'NonAlignedAffinity' (required)
serviceName The name of the service that the correlation relationship is established with. string (required)

ServiceLoadMetricDescription

Name Description Value
defaultLoad Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric. int
name The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive. string (required)
primaryDefaultLoad Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica. int
secondaryDefaultLoad Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica. int
weight The service load metric relative weight, compared to other metrics configured for this service, as a number. 'High'
'Low'
'Medium'
'Zero'

ServicePlacementPolicyDescription

Name Description Value
Type (required)

ServiceResourceProperties

Name Description Value
correlationScheme A list that describes the correlation of the service with other services. ServiceCorrelationDescription[]
defaultMoveCost Specifies the move cost for the service. 'High'
'Low'
'Medium'
'Zero'
partitionDescription Describes how the service is partitioned. PartitionSchemeDescription
placementConstraints The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". string
serviceKind Set to 'Stateful' for type StatefulServiceProperties. Set to 'Stateless' for type StatelessServiceProperties. 'Stateful'
'Stateless' (required)
serviceLoadMetrics The service load metrics is given as an array of ServiceLoadMetricDescription objects. ServiceLoadMetricDescription[]
servicePackageActivationMode The activation Mode of the service package 'ExclusiveProcess'
'SharedProcess'
servicePlacementPolicies A list that describes the correlation of the service with other services. ServicePlacementPolicyDescription[]
serviceTypeName The name of the service type string

SingletonPartitionSchemeDescription

Name Description Value
partitionScheme Specifies how the service is partitioned. 'Singleton' (required)

StatefulServiceProperties

Name Description Value
hasPersistedState A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. bool
minReplicaSetSize The minimum replica set size as a number. int

Constraints:
Min value = 1
quorumLossWaitDuration The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s). string
replicaRestartWaitDuration The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s). string
serviceKind The kind of service (Stateless or Stateful). 'Stateful' (required)
standByReplicaKeepDuration The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s). string
targetReplicaSetSize The target replica set size as a number. int

Constraints:
Min value = 1

StatelessServiceProperties

Name Description Value
instanceCount The instance count. int

Constraints:
Min value = -1
serviceKind The kind of service (Stateless or Stateful). 'Stateless' (required)

UniformInt64RangePartitionSchemeDescription

Name Description Value
Count The number of partitions. int (required)
HighKey String indicating the upper bound of the partition key range that
should be split between the partition ‘Count’
string (required)
LowKey String indicating the lower bound of the partition key range that
should be split between the partition ‘Count’
string (required)
partitionScheme Specifies how the service is partitioned. 'UniformInt64Range' (required)

Terraform (AzAPI provider) resource definition

The clusters/applications/services resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.ServiceFabric/clusters/applications/services resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ServiceFabric/clusters/applications/services@2019-03-01"
  name = "string"
  location = "string"
  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 = [
        {
          Type = "string"
          // For remaining properties, see ServicePlacementPolicyDescription objects
        }
      ]
      serviceTypeName = "string"
      serviceKind = "string"
      // For remaining properties, see ServiceResourceProperties objects
    }
  })
  tags = {
    {customized property} = "string"
  }
}

PartitionSchemeDescription objects

Set the partitionScheme property to specify the type of object.

For Named, use:

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

For Singleton, use:

{
  partitionScheme = "Singleton"
}

For UniformInt64Range, use:

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

ServiceResourceProperties objects

Set the serviceKind property to specify the type of object.

For Stateful, use:

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

For Stateless, use:

{
  instanceCount = int
  serviceKind = "Stateless"
}

ServicePlacementPolicyDescription objects

Set the Type property to specify the type of object.

Property values

Microsoft.ServiceFabric/clusters/applications/services

Name Description Value
location It will be deprecated in New API, resource location depends on the parent resource. string
name The resource name string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: clusters/applications
properties The service resource properties. ServiceResourceProperties
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.ServiceFabric/clusters/applications/services@2019-03-01"

NamedPartitionSchemeDescription

Name Description Value
Count The number of partitions. int (required)
Names Array of size specified by the ‘Count’ parameter, for the names of the partitions. string[] (required)
partitionScheme Specifies how the service is partitioned. 'Named' (required)

PartitionSchemeDescription

Name Description Value
partitionScheme Set to 'Named' for type NamedPartitionSchemeDescription. Set to 'Singleton' for type SingletonPartitionSchemeDescription. Set to 'UniformInt64Range' for type UniformInt64RangePartitionSchemeDescription. 'Named'
'Singleton'
'UniformInt64Range' (required)

ProxyResourceTags

Name Description Value

ServiceCorrelationDescription

Name Description Value
scheme The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName. 'Affinity'
'AlignedAffinity'
'Invalid'
'NonAlignedAffinity' (required)
serviceName The name of the service that the correlation relationship is established with. string (required)

ServiceLoadMetricDescription

Name Description Value
defaultLoad Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric. int
name The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive. string (required)
primaryDefaultLoad Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica. int
secondaryDefaultLoad Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica. int
weight The service load metric relative weight, compared to other metrics configured for this service, as a number. 'High'
'Low'
'Medium'
'Zero'

ServicePlacementPolicyDescription

Name Description Value
Type (required)

ServiceResourceProperties

Name Description Value
correlationScheme A list that describes the correlation of the service with other services. ServiceCorrelationDescription[]
defaultMoveCost Specifies the move cost for the service. 'High'
'Low'
'Medium'
'Zero'
partitionDescription Describes how the service is partitioned. PartitionSchemeDescription
placementConstraints The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". string
serviceKind Set to 'Stateful' for type StatefulServiceProperties. Set to 'Stateless' for type StatelessServiceProperties. 'Stateful'
'Stateless' (required)
serviceLoadMetrics The service load metrics is given as an array of ServiceLoadMetricDescription objects. ServiceLoadMetricDescription[]
servicePackageActivationMode The activation Mode of the service package 'ExclusiveProcess'
'SharedProcess'
servicePlacementPolicies A list that describes the correlation of the service with other services. ServicePlacementPolicyDescription[]
serviceTypeName The name of the service type string

SingletonPartitionSchemeDescription

Name Description Value
partitionScheme Specifies how the service is partitioned. 'Singleton' (required)

StatefulServiceProperties

Name Description Value
hasPersistedState A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. bool
minReplicaSetSize The minimum replica set size as a number. int

Constraints:
Min value = 1
quorumLossWaitDuration The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format (hh:mm:ss.s). string
replicaRestartWaitDuration The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s). string
serviceKind The kind of service (Stateless or Stateful). 'Stateful' (required)
standByReplicaKeepDuration The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s). string
targetReplicaSetSize The target replica set size as a number. int

Constraints:
Min value = 1

StatelessServiceProperties

Name Description Value
instanceCount The instance count. int

Constraints:
Min value = -1
serviceKind The kind of service (Stateless or Stateful). 'Stateless' (required)

UniformInt64RangePartitionSchemeDescription

Name Description Value
Count The number of partitions. int (required)
HighKey String indicating the upper bound of the partition key range that
should be split between the partition ‘Count’
string (required)
LowKey String indicating the lower bound of the partition key range that
should be split between the partition ‘Count’
string (required)
partitionScheme Specifies how the service is partitioned. 'UniformInt64Range' (required)