Class FieldRestrictions

java.lang.Object
com.azure.resourcemanager.policyinsights.models.FieldRestrictions

public final class FieldRestrictions extends Object
The restrictions that will be placed on a field in the resource by policy.
  • Constructor Details

    • FieldRestrictions

      public FieldRestrictions()
      Creates an instance of FieldRestrictions class.
  • Method Details

    • field

      public String field()
      Get the field property: The name of the field. This can be a top-level property like 'name' or 'type' or an Azure Policy field alias.
      Returns:
      the field value.
    • restrictions

      public List<FieldRestriction> restrictions()
      Get the restrictions property: The restrictions placed on that field by policy.
      Returns:
      the restrictions value.
    • withRestrictions

      public FieldRestrictions withRestrictions(List<FieldRestriction> restrictions)
      Set the restrictions property: The restrictions placed on that field by policy.
      Parameters:
      restrictions - the restrictions value to set.
      Returns:
      the FieldRestrictions object itself.
    • validate

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