Class IpSecurityRestriction


  • public final class IpSecurityRestriction
    extends Object
    IP security restriction on an app.
    • Constructor Detail

      • IpSecurityRestriction

        public IpSecurityRestriction()
    • Method Detail

      • ipAddress

        public String ipAddress()
        Get the ipAddress property: IP address the security restriction is valid for. It can be in form of pure ipv4 address (required SubnetMask property) or CIDR notation such as ipv4/mask (leading bit match). For CIDR, SubnetMask property must not be specified.
        Returns:
        the ipAddress value.
      • withIpAddress

        public IpSecurityRestriction withIpAddress​(String ipAddress)
        Set the ipAddress property: IP address the security restriction is valid for. It can be in form of pure ipv4 address (required SubnetMask property) or CIDR notation such as ipv4/mask (leading bit match). For CIDR, SubnetMask property must not be specified.
        Parameters:
        ipAddress - the ipAddress value to set.
        Returns:
        the IpSecurityRestriction object itself.
      • subnetMask

        public String subnetMask()
        Get the subnetMask property: Subnet mask for the range of IP addresses the restriction is valid for.
        Returns:
        the subnetMask value.
      • withSubnetMask

        public IpSecurityRestriction withSubnetMask​(String subnetMask)
        Set the subnetMask property: Subnet mask for the range of IP addresses the restriction is valid for.
        Parameters:
        subnetMask - the subnetMask value to set.
        Returns:
        the IpSecurityRestriction object itself.
      • vnetSubnetResourceId

        public String vnetSubnetResourceId()
        Get the vnetSubnetResourceId property: Virtual network resource id.
        Returns:
        the vnetSubnetResourceId value.
      • withVnetSubnetResourceId

        public IpSecurityRestriction withVnetSubnetResourceId​(String vnetSubnetResourceId)
        Set the vnetSubnetResourceId property: Virtual network resource id.
        Parameters:
        vnetSubnetResourceId - the vnetSubnetResourceId value to set.
        Returns:
        the IpSecurityRestriction object itself.
      • vnetTrafficTag

        public Integer vnetTrafficTag()
        Get the vnetTrafficTag property: (internal) Vnet traffic tag.
        Returns:
        the vnetTrafficTag value.
      • withVnetTrafficTag

        public IpSecurityRestriction withVnetTrafficTag​(Integer vnetTrafficTag)
        Set the vnetTrafficTag property: (internal) Vnet traffic tag.
        Parameters:
        vnetTrafficTag - the vnetTrafficTag value to set.
        Returns:
        the IpSecurityRestriction object itself.
      • subnetTrafficTag

        public Integer subnetTrafficTag()
        Get the subnetTrafficTag property: (internal) Subnet traffic tag.
        Returns:
        the subnetTrafficTag value.
      • withSubnetTrafficTag

        public IpSecurityRestriction withSubnetTrafficTag​(Integer subnetTrafficTag)
        Set the subnetTrafficTag property: (internal) Subnet traffic tag.
        Parameters:
        subnetTrafficTag - the subnetTrafficTag value to set.
        Returns:
        the IpSecurityRestriction object itself.
      • action

        public String action()
        Get the action property: Allow or Deny access for this IP range.
        Returns:
        the action value.
      • withAction

        public IpSecurityRestriction withAction​(String action)
        Set the action property: Allow or Deny access for this IP range.
        Parameters:
        action - the action value to set.
        Returns:
        the IpSecurityRestriction object itself.
      • tag

        public IpFilterTag tag()
        Get the tag property: Defines what this IP filter will be used for. This is to support IP filtering on proxies.
        Returns:
        the tag value.
      • withTag

        public IpSecurityRestriction withTag​(IpFilterTag tag)
        Set the tag property: Defines what this IP filter will be used for. This is to support IP filtering on proxies.
        Parameters:
        tag - the tag value to set.
        Returns:
        the IpSecurityRestriction object itself.
      • priority

        public Integer priority()
        Get the priority property: Priority of IP restriction rule.
        Returns:
        the priority value.
      • withPriority

        public IpSecurityRestriction withPriority​(Integer priority)
        Set the priority property: Priority of IP restriction rule.
        Parameters:
        priority - the priority value to set.
        Returns:
        the IpSecurityRestriction object itself.
      • name

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

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

        public String description()
        Get the description property: IP restriction rule description.
        Returns:
        the description value.
      • withDescription

        public IpSecurityRestriction withDescription​(String description)
        Set the description property: IP restriction rule description.
        Parameters:
        description - the description value to set.
        Returns:
        the IpSecurityRestriction object itself.
      • headers

        public Map<String,​List<String>> headers()
        Get the headers property: IP restriction rule headers. X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). The matching logic is .. - If the property is null or empty (default), all hosts(or lack of) are allowed. - A value is compared using ordinal-ignore-case (excluding port number). - Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com but not the root domain contoso.com or multi-level foo.bar.contoso.com - Unicode host names are allowed but are converted to Punycode for matching.

        X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). The matching logic is .. - If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed. - If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.

        X-Azure-FDID and X-FD-HealthProbe. The matching logic is exact match.

        Returns:
        the headers value.
      • withHeaders

        public IpSecurityRestriction withHeaders​(Map<String,​List<String>> headers)
        Set the headers property: IP restriction rule headers. X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). The matching logic is .. - If the property is null or empty (default), all hosts(or lack of) are allowed. - A value is compared using ordinal-ignore-case (excluding port number). - Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com but not the root domain contoso.com or multi-level foo.bar.contoso.com - Unicode host names are allowed but are converted to Punycode for matching.

        X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). The matching logic is .. - If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed. - If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.

        X-Azure-FDID and X-FD-HealthProbe. The matching logic is exact match.

        Parameters:
        headers - the headers value to set.
        Returns:
        the IpSecurityRestriction object itself.
      • validate

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