Microsoft.ServiceFabric clusters/applications/services 2021-06-01
Bicep resource definition
The clusters/applications/services resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
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@2021-06-01' = {
location: 'string'
name: 'string'
properties: {
correlationScheme: [
{
scheme: 'string'
serviceName: 'string'
}
]
defaultMoveCost: 'string'
partitionDescription: {
partitionScheme: 'string'
// For remaining properties, see PartitionSchemeDescription objects
}
placementConstraints: 'string'
serviceDnsName: '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'
}
}
ServicePlacementPolicyDescription objects
Set the type property to specify the type of object.
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:
{
instanceCloseDelayDuration: 'string'
instanceCount: int
serviceKind: 'Stateless'
}
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 |
serviceDnsName | Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead of service name. | 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 |
---|---|---|
instanceCloseDelayDuration | 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 (/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). It is represented in ISO 8601 format (hh:mm:ss.s). | string |
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:
- Resource groups - See resource group deployment commands
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": "2021-06-01",
"name": "string",
"location": "string",
"properties": {
"correlationScheme": [
{
"scheme": "string",
"serviceName": "string"
}
],
"defaultMoveCost": "string",
"partitionDescription": {
"partitionScheme": "string"
// For remaining properties, see PartitionSchemeDescription objects
},
"placementConstraints": "string",
"serviceDnsName": "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"
}
}
ServicePlacementPolicyDescription objects
Set the type property to specify the type of object.
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:
{
"instanceCloseDelayDuration": "string",
"instanceCount": "int",
"serviceKind": "Stateless"
}
Property values
Microsoft.ServiceFabric/clusters/applications/services
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2021-06-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 |
serviceDnsName | Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead of service name. | 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 |
---|---|---|
instanceCloseDelayDuration | 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 (/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). It is represented in ISO 8601 format (hh:mm:ss.s). | string |
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@2021-06-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"
serviceDnsName = "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"
}
}
ServicePlacementPolicyDescription objects
Set the type property to specify the type of object.
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:
{
instanceCloseDelayDuration = "string"
instanceCount = int
serviceKind = "Stateless"
}
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@2021-06-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 |
serviceDnsName | Dns name used for the service. If this is specified, then the service can be accessed via its DNS name instead of service name. | 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 |
---|---|---|
instanceCloseDelayDuration | 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 (/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). It is represented in ISO 8601 format (hh:mm:ss.s). | string |
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) |