The customLocations/resourceSyncRules resource type can be deployed to:
For a list of changed properties in each API version, see change log.
To create a Microsoft.ExtendedLocation/customLocations/resourceSyncRules resource, add the following JSON to your template.
{
"type": "Microsoft.ExtendedLocation/customLocations/resourceSyncRules",
"apiVersion": "2021-08-31-preview",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"properties": {
"priority": "int",
"selector": {
"matchExpressions": [
{
"key": "string",
"operator": "string",
"values": [ "string" ]
}
],
"matchLabels": {}
},
"targetResourceGroup": "string"
}
}
Name | Description | Value |
---|---|---|
type | The resource type | 'Microsoft.ExtendedLocation/customLocations/resourceSyncRules' |
apiVersion | The resource api version | '2021-08-31-preview' |
name | The resource name See how to set names and types for child resources in JSON ARM templates. |
string (required) |
location | The geo-location where the resource lives | string (required) |
tags | Resource tags. | Dictionary of tag names and values. See Tags in templates |
properties | The set of properties specific to a Resource Sync Rule | ResourceSyncRuleProperties |
Name | Description | Value |
---|---|---|
priority | Priority represents a priority of the Resource Sync Rule | int |
selector | A label selector is composed of two parts, matchLabels and matchExpressions. The first part, matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. The second part, matchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. The values set must be empty in the case of Exists and DoesNotExist. All of the requirements, from both matchLabels and matchExpressions must all be satisfied in order to match. | ResourceSyncRulePropertiesSelector |
targetResourceGroup | For an unmapped custom resource, its labels will be used to find matching resource sync rules. If this resource sync rule is one of the matching rules with highest priority, then the unmapped custom resource will be projected to the target resource group associated with this resource sync rule. The user creating this resource sync rule should have write permissions on the target resource group and this write permission will be validated when creating the resource sync rule. | string |
Name | Description | Value |
---|---|---|
matchExpressions | MatchExpressions is a list of resource selector requirements. Valid operators include In, NotIn, Exists, and DoesNotExist. The values set must be non-empty in the case of In and NotIn. The values set must be empty in the case of Exists and DoesNotExist. | MatchExpressionsProperties[] |
matchLabels | MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is 'key', the operator is 'In', and the values array contains only 'value'. | object |
Name | Description | Value |
---|---|---|
key | Key is the label key that the selector applies to. | string |
operator | The Operator field represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. | string |
values | The label value | string[] |