Class PatchableResourceSyncRule
java.lang.Object
com.azure.resourcemanager.extendedlocation.models.PatchableResourceSyncRule
The Resource Sync Rules patchable resource definition.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionpriority()
Get the priority property: Priority represents a priority of the Resource Sync Rule.Get the provisioningState property: Provisioning State for the Resource Sync Rule.selector()
Get the selector property: A label selector is composed of two parts, matchLabels and matchExpressions.tags()
Get the tags property: Resource tags.Get the targetResourceGroup property: For an unmapped custom resource, its labels will be used to find matching resource sync rules.void
validate()
Validates the instance.withPriority
(Integer priority) Set the priority property: Priority represents a priority of the Resource Sync Rule.Set the selector property: A label selector is composed of two parts, matchLabels and matchExpressions.Set the tags property: Resource tags.withTargetResourceGroup
(String targetResourceGroup) Set the targetResourceGroup property: For an unmapped custom resource, its labels will be used to find matching resource sync rules.
-
Constructor Details
-
PatchableResourceSyncRule
public PatchableResourceSyncRule()
-
-
Method Details
-
tags
Get the tags property: Resource tags.- Returns:
- the tags value.
-
withTags
Set the tags property: Resource tags.- Parameters:
tags
- the tags value to set.- Returns:
- the PatchableResourceSyncRule object itself.
-
priority
Get the priority property: Priority represents a priority of the Resource Sync Rule.- Returns:
- the priority value.
-
withPriority
Set the priority property: Priority represents a priority of the Resource Sync Rule.- Parameters:
priority
- the priority value to set.- Returns:
- the PatchableResourceSyncRule object itself.
-
provisioningState
Get the provisioningState property: Provisioning State for the Resource Sync Rule.- Returns:
- the provisioningState value.
-
selector
Get the selector property: 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.- Returns:
- the selector value.
-
withSelector
Set the selector property: 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.- Parameters:
selector
- the selector value to set.- Returns:
- the PatchableResourceSyncRule object itself.
-
targetResourceGroup
Get the targetResourceGroup property: 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.- Returns:
- the targetResourceGroup value.
-
withTargetResourceGroup
Set the targetResourceGroup property: 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.- Parameters:
targetResourceGroup
- the targetResourceGroup value to set.- Returns:
- the PatchableResourceSyncRule object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-