Class FieldRestrictions


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

      • FieldRestrictions

        public FieldRestrictions()
    • Method Detail

      • 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.