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

The clusters/applications/services resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

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

resource symbolicname 'Microsoft.ServiceFabric/clusters/applications/services@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 objects

Set the serviceKind property to specify the type of object.

For Stateful, use:

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

For Stateless, use:

  serviceKind: 'Stateless'
  instanceCount: int

PartitionSchemeDescription objects

Set the partitionScheme property to specify the type of object.

For Named, use:

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

For Singleton, use:

  partitionScheme: 'Singleton'

For UniformInt64Range, use:

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

Property values

clusters/applications/services

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.ServiceFabric/clusters/applications/services'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2019-03-01'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
location It will be deprecated in New API, resource location depends on the parent resource. string
tags Azure resource tags. Dictionary of tag names and values. See Tags in templates
properties The service resource properties. ServiceResourceProperties

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
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. object
serviceTypeName The name of the service type string
serviceKind Set the object type Stateful
Stateless

ServiceCorrelationDescription

Name Description Value
scheme The service correlation scheme. 'Affinity'
'AlignedAffinity'
'Invalid'
'NonAlignedAffinity'
serviceName The full name of the service with 'fabric:' URI scheme. string (required)

PartitionSchemeDescription

Name Description Value
partitionScheme Set the object type Named
Singleton
UniformInt64Range

NamedPartitionSchemeDescription

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

SingletonPartitionSchemeDescription

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

UniformInt64RangePartitionSchemeDescription

Name Description Value
partitionScheme Specifies how the service is partitioned. 'UniformInt64Range'
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)

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 Determines the metric weight relative to the other metrics that are configured for this service. During runtime, if two metrics end up in conflict, the Cluster Resource Manager prefers the metric with the higher weight. 'High'
'Low'
'Medium'
'Zero'

StatefulServiceProperties

Name Description Value
serviceKind The kind of service (Stateless or Stateful). 'Stateful'
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
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
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

StatelessServiceProperties

Name Description Value
serviceKind The kind of service (Stateless or Stateful). 'Stateless'
instanceCount The instance count. int