Class IpSecurityRestrictionRule

java.lang.Object
com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule
All Implemented Interfaces:
com.azure.json.JsonSerializable<IpSecurityRestrictionRule>

public final class IpSecurityRestrictionRule extends Object implements com.azure.json.JsonSerializable<IpSecurityRestrictionRule>
Rule to restrict incoming IP address.
  • Constructor Details

    • IpSecurityRestrictionRule

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

    • name

      public String name()
      Get the name property: Name for the IP restriction rule.
      Returns:
      the name value.
    • withName

      public IpSecurityRestrictionRule withName(String name)
      Set the name property: Name for the IP restriction rule.
      Parameters:
      name - the name value to set.
      Returns:
      the IpSecurityRestrictionRule object itself.
    • description

      public String description()
      Get the description property: Describe the IP restriction rule that is being sent to the container-app. This is an optional field.
      Returns:
      the description value.
    • withDescription

      public IpSecurityRestrictionRule withDescription(String description)
      Set the description property: Describe the IP restriction rule that is being sent to the container-app. This is an optional field.
      Parameters:
      description - the description value to set.
      Returns:
      the IpSecurityRestrictionRule object itself.
    • ipAddressRange

      public String ipAddressRange()
      Get the ipAddressRange property: CIDR notation to match incoming IP address.
      Returns:
      the ipAddressRange value.
    • withIpAddressRange

      public IpSecurityRestrictionRule withIpAddressRange(String ipAddressRange)
      Set the ipAddressRange property: CIDR notation to match incoming IP address.
      Parameters:
      ipAddressRange - the ipAddressRange value to set.
      Returns:
      the IpSecurityRestrictionRule object itself.
    • action

      public Action action()
      Get the action property: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny.
      Returns:
      the action value.
    • withAction

      public IpSecurityRestrictionRule withAction(Action action)
      Set the action property: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny.
      Parameters:
      action - the action value to set.
      Returns:
      the IpSecurityRestrictionRule object itself.
    • validate

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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<IpSecurityRestrictionRule>
      Throws:
      IOException
    • fromJson

      public static IpSecurityRestrictionRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of IpSecurityRestrictionRule from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of IpSecurityRestrictionRule if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the IpSecurityRestrictionRule.