The managedclusters/applications/services resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.ServiceFabric/managedclusters/applications/services resource, add the following JSON to your template.
{
"type": "Microsoft.ServiceFabric/managedclusters/applications/services",
"apiVersion": "2024-02-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 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
}
}
Set the serviceKind property to specify the type of object.
For Stateful, use:
"serviceKind": "Stateful",
"hasPersistedState": "bool",
"minReplicaSetSize": "int",
"quorumLossWaitDuration": "string",
"replicaRestartWaitDuration": "string",
"servicePlacementTimeLimit": "string",
"standByReplicaKeepDuration": "string",
"targetReplicaSetSize": "int"
For Stateless, use:
"serviceKind": "Stateless",
"instanceCount": "int",
"minInstanceCount": "int",
"minInstancePercentage": "int"
Set the partitionScheme property to specify the type of object.
For Named, use:
"partitionScheme": "Named",
"names": [ "string" ]
For Singleton, use:
"partitionScheme": "Singleton"
For UniformInt64Range, use:
"partitionScheme": "UniformInt64Range",
"count": "int",
"highKey": "int",
"lowKey": "int"
Set the kind property to specify the type of object.
For AddRemoveIncrementalNamedPartition, use:
"kind": "AddRemoveIncrementalNamedPartition",
"maxPartitionCount": "int",
"minPartitionCount": "int",
"scaleIncrement": "int"
For ScalePartitionInstanceCount, use:
"kind": "ScalePartitionInstanceCount",
"maxInstanceCount": "int",
"minInstanceCount": "int",
"scaleIncrement": "int"
Set the kind property to specify the type of object.
For AveragePartitionLoadTrigger, use:
"kind": "AveragePartitionLoadTrigger",
"lowerLoadThreshold": "int",
"metricName": "string",
"scaleInterval": "string",
"upperLoadThreshold": "int"
For AverageServiceLoadTrigger, use:
"kind": "AverageServiceLoadTrigger",
"lowerLoadThreshold": "int",
"metricName": "string",
"scaleInterval": "string",
"upperLoadThreshold": "int",
"useOnlyPrimaryLoad": "bool"
Set the type property to specify the type of object.
For InvalidDomain, use:
"type": "InvalidDomain",
"domainName": "string"
For NonPartiallyPlaceService, use:
"type": "NonPartiallyPlaceService"
For PreferredPrimaryDomain, use:
"type": "PreferredPrimaryDomain",
"domainName": "string"
For RequiredDomain, use:
"type": "RequiredDomain",
"domainName": "string"
For RequiredDomainDistribution, use:
"type": "RequiredDomainDistribution",
"domainName": "string"
Name | Description | Value |
---|---|---|
type | The resource type | 'Microsoft.ServiceFabric/managedclusters/applications/services' |
apiVersion | The resource api version | '2024-02-01-preview' |
name | The resource name See how to set names and types for child resources in JSON ARM templates. |
string (required) |
location | 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 |
Name | Description | Value |
---|---|---|
correlationScheme | A list that describes the correlation of the service with other services. | ServiceCorrelation[] |
defaultMoveCost | Specifies the move cost for the service. | 'High' 'Low' 'Medium' 'Zero' |
partitionDescription | Describes how the service is partitioned. | Partition (required) |
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 |
scalingPolicies | Scaling policies for this service. | ScalingPolicy[] |
serviceDnsName | Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. |
string |
serviceLoadMetrics | The service load metrics is given as an array of ServiceLoadMetric objects. | ServiceLoadMetric[] |
servicePackageActivationMode | The activation Mode of the service package | 'ExclusiveProcess' 'SharedProcess' |
servicePlacementPolicies | A list that describes the correlation of the service with other services. | ServicePlacementPolicy[] |
serviceTypeName | The name of the service type | string (required) |
serviceKind | Set the object type | Stateful Stateless (required) |
Name | Description | Value |
---|---|---|
scheme | The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName. | 'AlignedAffinity' 'NonAlignedAffinity' (required) |
serviceName | The Arm Resource ID of the service that the correlation relationship is established with. | string (required) |
Name | Description | Value |
---|---|---|
partitionScheme | Set the object type | Named Singleton UniformInt64Range (required) |
Name | Description | Value |
---|---|---|
partitionScheme | Specifies how the service is partitioned. | 'Named' (required) |
names | Array for the names of the partitions. | string[] (required) |
Name | Description | Value |
---|---|---|
partitionScheme | Specifies how the service is partitioned. | 'Singleton' (required) |
Name | Description | Value |
---|---|---|
partitionScheme | Specifies how the service is partitioned. | 'UniformInt64Range' (required) |
count | The number of partitions. | int (required) |
highKey | The upper bound of the partition key range that should be split between the partition âCountâ |
int (required) |
lowKey | The lower bound of the partition key range that should be split between the partition âCountâ |
int (required) |
Name | Description | Value |
---|---|---|
scalingMechanism | Specifies the mechanism associated with this scaling policy | ScalingMechanism (required) |
scalingTrigger | Specifies the trigger associated with this scaling policy. | ScalingTrigger (required) |
Name | Description | Value |
---|---|---|
kind | Set the object type | AddRemoveIncrementalNamedPartition ScalePartitionInstanceCount (required) |
Name | Description | Value |
---|---|---|
kind | Specifies the mechanism associated with this scaling policy. | 'AddRemoveIncrementalNamedPartition' (required) |
maxPartitionCount | Maximum number of named partitions of the service. | int (required) |
minPartitionCount | Minimum number of named partitions of the service. | int (required) |
scaleIncrement | The number of instances to add or remove during a scaling operation. | int (required) |
Name | Description | Value |
---|---|---|
kind | Specifies the mechanism associated with this scaling policy. | 'ScalePartitionInstanceCount' (required) |
maxInstanceCount | Maximum number of instances of the partition. | int (required) |
minInstanceCount | Minimum number of instances of the partition. | int (required) |
scaleIncrement | The number of instances to add or remove during a scaling operation. | int (required) |
Name | Description | Value |
---|---|---|
kind | Set the object type | AveragePartitionLoadTrigger AverageServiceLoadTrigger (required) |
Name | Description | Value |
---|---|---|
kind | Specifies the trigger associated with this scaling policy. | 'AveragePartitionLoadTrigger' (required) |
lowerLoadThreshold | The lower limit of the load below which a scale in operation should be performed. | int (required) |
metricName | The name of the metric for which usage should be tracked. | string (required) |
scaleInterval | The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format "hh:mm:ss". | string (required) |
upperLoadThreshold | The upper limit of the load beyond which a scale out operation should be performed. | int (required) |
Name | Description | Value |
---|---|---|
kind | Specifies the trigger associated with this scaling policy. | 'AverageServiceLoadTrigger' (required) |
lowerLoadThreshold | The lower limit of the load below which a scale in operation should be performed. | int (required) |
metricName | The name of the metric for which usage should be tracked. | string (required) |
scaleInterval | The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format "hh:mm:ss". | string (required) |
upperLoadThreshold | The upper limit of the load beyond which a scale out operation should be performed. | int (required) |
useOnlyPrimaryLoad | Flag determines whether only the load of primary replica should be considered for scaling. If set to true, then trigger will only consider the load of primary replicas of stateful service. If set to false, trigger will consider load of all replicas. This parameter cannot be set to true for stateless service. | bool (required) |
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' |
Name | Description | Value |
---|---|---|
type | Set the object type | InvalidDomain NonPartiallyPlaceService PreferredPrimaryDomain RequiredDomain RequiredDomainDistribution (required) |
Name | Description | Value |
---|---|---|
type | The type of placement policy for a service fabric service. Following are the possible values. | 'InvalidDomain' (required) |
domainName | The name of the domain that should not be used for placement. | string (required) |
Name | Description | Value |
---|---|---|
type | The type of placement policy for a service fabric service. Following are the possible values. | 'NonPartiallyPlaceService' (required) |
Name | Description | Value |
---|---|---|
type | The type of placement policy for a service fabric service. Following are the possible values. | 'PreferredPrimaryDomain' (required) |
domainName | The name of the domain that should used for placement as per this policy. | string (required) |
Name | Description | Value |
---|---|---|
type | The type of placement policy for a service fabric service. Following are the possible values. | 'RequiredDomain' (required) |
domainName | The name of the domain that should used for placement as per this policy. | string (required) |
Name | Description | Value |
---|---|---|
type | The type of placement policy for a service fabric service. Following are the possible values. | 'RequiredDomainDistribution' (required) |
domainName | The name of the domain that should used for placement as per this policy. | string (required) |
Name | Description | Value |
---|---|---|
serviceKind | The kind of service (Stateless or Stateful). | 'Stateful' (required) |
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". | 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". | string |
servicePlacementTimeLimit | The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". | string |
standByReplicaKeepDuration | The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". | string |
targetReplicaSetSize | The target replica set size as a number. | int Constraints: Min value = 1 |
Name | Description | Value |
---|---|---|
serviceKind | The kind of service (Stateless or Stateful). | 'Stateless' (required) |
instanceCount | The instance count. | int (required) |
minInstanceCount | MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. | int |
minInstancePercentage | MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. | int |