Class ResourceSyncRuleProperties

java.lang.Object
com.azure.resourcemanager.extendedlocation.fluent.models.ResourceSyncRuleProperties

public final class ResourceSyncRuleProperties extends Object
Properties for a resource sync rule. For an unmapped custom resource, its labels will be used to find out matching resource sync rules using the selector property of the resource sync rule. If this resource sync rule has highest priority among all matching rules, then the unmapped custom resource will be projected to the target resource group associated with this resource sync rule.
  • Constructor Details

    • ResourceSyncRuleProperties

      public ResourceSyncRuleProperties()
  • Method Details

    • priority

      public Integer priority()
      Get the priority property: Priority represents a priority of the Resource Sync Rule.
      Returns:
      the priority value.
    • withPriority

      public ResourceSyncRuleProperties withPriority(Integer priority)
      Set the priority property: Priority represents a priority of the Resource Sync Rule.
      Parameters:
      priority - the priority value to set.
      Returns:
      the ResourceSyncRuleProperties object itself.
    • provisioningState

      public String 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 ResourceSyncRuleProperties object itself.
    • targetResourceGroup

      public String 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

      public ResourceSyncRuleProperties withTargetResourceGroup(String targetResourceGroup)
      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 ResourceSyncRuleProperties object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.