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

Template format

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

{
  "name": "string",
  "type": "Microsoft.ServiceFabric/clusters/applications/services",
  "apiVersion": "2020-03-01",
  "location": "string",
  "tags": {},
  "properties": {
    "placementConstraints": "string",
    "correlationScheme": [
      {
        "scheme": "string",
        "serviceName": "string"
      }
    ],
    "serviceLoadMetrics": [
      {
        "name": "string",
        "weight": "string",
        "primaryDefaultLoad": "integer",
        "secondaryDefaultLoad": "integer",
        "defaultLoad": "integer"
      }
    ],
    "servicePlacementPolicies": [
      {
        "type": "string"
      }
    ],
    "defaultMoveCost": "string",
    "serviceTypeName": "string",
    "partitionDescription": {
      "partitionScheme": "string",
      "count": "integer",
      "names": [],
      "lowKey": "string",
      "highKey": "string"
    },
    "servicePackageActivationMode": "string",
    "serviceDnsName": "string",
    "serviceKind": "string",
    "instanceCount": "integer",
    "instanceCloseDelayDuration": "string",
    "hasPersistedState": "boolean",
    "targetReplicaSetSize": "integer",
    "minReplicaSetSize": "integer",
    "replicaRestartWaitDuration": "string",
    "quorumLossWaitDuration": "string",
    "standByReplicaKeepDuration": "string"
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.ServiceFabric/clusters/applications/services object

Name Type Required Value
name string Yes The name of the service resource in the format of {applicationName}~{serviceName}.
type enum Yes services
-or-
Microsoft.ServiceFabric/clusters/applications/services

See Set name and type for child resources.
apiVersion enum Yes 2020-03-01
location string No It will be deprecated in New API, resource location depends on the parent resource.
tags object No Azure resource tags.
properties object Yes The service resource properties. - ServiceResourceProperties object

ServiceResourceProperties object

Name Type Required Value
placementConstraints string No 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)".
correlationScheme array No A list that describes the correlation of the service with other services. - ServiceCorrelationDescription object
serviceLoadMetrics array No The service load metrics is given as an array of ServiceLoadMetricDescription objects. - ServiceLoadMetricDescription object
servicePlacementPolicies array No A list that describes the correlation of the service with other services. - ServicePlacementPolicyDescription object
defaultMoveCost enum No Specifies the move cost for the service. - Zero, Low, Medium, High
serviceTypeName string No The name of the service type
partitionDescription object No Describes how the service is partitioned. - PartitionSchemeDescription object
servicePackageActivationMode enum No The activation Mode of the service package. - SharedProcess or ExclusiveProcess
serviceDnsName string No Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead of service name.
serviceKind string Yes The kind of service (Stateless or Stateful). - Invalid, Stateless, Stateful
instanceCount integer No Applies to Stateless. The instance count.
instanceCloseDelayDuration string No Applies to Stateless. Delay duration for RequestDrain feature to ensures that the endpoint advertised by the stateless instance is removed before the delay starts prior to closing the instance. This delay enables existing requests to drain gracefully before the instance actually goes down (https://docs.microsoft.com/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.
hasPersistedState boolean No Applies to Stateful. 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.
targetReplicaSetSize integer No Applies to Stateful. The target replica set size as a number.
minReplicaSetSize integer No Applies to Stateful. The minimum replica set size as a number.
replicaRestartWaitDuration string No Applies to Stateful. The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format (hh:mm:ss.s).
quorumLossWaitDuration string No Applies to Stateful. 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).
standByReplicaKeepDuration string No Applies to Stateful. The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format (hh:mm:ss.s).

ServiceCorrelationDescription object

Name Type Required Value
scheme enum Yes The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName. - Invalid, Affinity, AlignedAffinity, NonAlignedAffinity
serviceName string Yes The name of the service that the correlation relationship is established with.

ServiceLoadMetricDescription object

Name Type Required Value
name string Yes 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.
weight enum No The service load metric relative weight, compared to other metrics configured for this service, as a number. - Zero, Low, Medium, High
primaryDefaultLoad integer No 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.
secondaryDefaultLoad integer No 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.
defaultLoad integer No Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.

ServicePlacementPolicyDescription object

Name Type Required Value
type string Yes The type of placement policy for a service fabric service. - Invalid, InvalidDomain, RequiredDomain, PreferredPrimaryDomain, RequiredDomainDistribution, NonPartiallyPlaceService

PartitionSchemeDescription object

Name Type Required Value
partitionScheme string Yes Enumerates the ways that a service can be partitioned. - Invalid, Singleton, UniformInt64Range, Named
count integer Yes Applies to Named. The number of partitions.
names array Yes Applies to Named and UniformInt64Range. Array of size specified by the 'count' parameter, for the names of the partitions.
lowKey string Yes Applies to UniformInt64Range. String indicating the lower bound of the partition key range that should be split between the partition 'count'
highKey string Yes Applies to UniformInt64Range. String indicating the upper bound of the partition key range that should be split between the partition 'count'