Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The customLocations/resourceSyncRules 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.ExtendedLocation/customLocations/resourceSyncRules resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.ExtendedLocation/customLocations/resourceSyncRules@2021-08-31-preview' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
priority: int
selector: {
matchExpressions: [
{
key: 'string'
operator: 'string'
values: [
'string'
]
}
]
matchLabels: {
{customized property}: 'string'
}
}
targetResourceGroup: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.ExtendedLocation/customLocations/resourceSyncRules
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 63 Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (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: customLocations |
| properties | The set of properties specific to a Resource Sync Rule | ResourceSyncRuleProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
MatchExpressionsProperties
| 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[] |
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 |
ResourceSyncRulePropertiesSelector
| 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'. | ResourceSyncRulePropertiesSelectorMatchLabels |
ResourceSyncRulePropertiesSelectorMatchLabels
| Name | Description | Value |
|---|
TrackedResourceTags
| Name | Description | Value |
|---|
ARM template resource definition
The customLocations/resourceSyncRules 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.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",
"properties": {
"priority": "int",
"selector": {
"matchExpressions": [
{
"key": "string",
"operator": "string",
"values": [ "string" ]
}
],
"matchLabels": {
"{customized property}": "string"
}
},
"targetResourceGroup": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.ExtendedLocation/customLocations/resourceSyncRules
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2021-08-31-preview' |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 63 Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (required) |
| properties | The set of properties specific to a Resource Sync Rule | ResourceSyncRuleProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.ExtendedLocation/customLocations/resourceSyncRules' |
MatchExpressionsProperties
| 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[] |
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 |
ResourceSyncRulePropertiesSelector
| 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'. | ResourceSyncRulePropertiesSelectorMatchLabels |
ResourceSyncRulePropertiesSelectorMatchLabels
| Name | Description | Value |
|---|
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform (AzAPI provider) resource definition
The customLocations/resourceSyncRules 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.ExtendedLocation/customLocations/resourceSyncRules resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.ExtendedLocation/customLocations/resourceSyncRules@2021-08-31-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
priority = int
selector = {
matchExpressions = [
{
key = "string"
operator = "string"
values = [
"string"
]
}
]
matchLabels = {
{customized property} = "string"
}
}
targetResourceGroup = "string"
}
}
}
Property Values
Microsoft.ExtendedLocation/customLocations/resourceSyncRules
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 1 Max length = 63 Pattern = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: customLocations |
| properties | The set of properties specific to a Resource Sync Rule | ResourceSyncRuleProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.ExtendedLocation/customLocations/resourceSyncRules@2021-08-31-preview" |
MatchExpressionsProperties
| 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[] |
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 |
ResourceSyncRulePropertiesSelector
| 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'. | ResourceSyncRulePropertiesSelectorMatchLabels |
ResourceSyncRulePropertiesSelectorMatchLabels
| Name | Description | Value |
|---|
TrackedResourceTags
| Name | Description | Value |
|---|