IpSecurityRestriction Class

  • java.lang.Object
    • com.azure.resourcemanager.appservice.models.IpSecurityRestriction

Implements

public final class IpSecurityRestriction
implements JsonSerializable<IpSecurityRestriction>

IP security restriction on an app.

Constructor Summary

Constructor Description
IpSecurityRestriction()

Creates an instance of IpSecurityRestriction class.

Method Summary

Modifier and Type Method and Description
String action()

Get the action property: Allow or Deny access for this IP range.

String description()

Get the description property: IP restriction rule description.

static IpSecurityRestriction fromJson(JsonReader jsonReader)

Reads an instance of IpSecurityRestriction from the JsonReader.

Map<String,List<String>> headers()

Get the headers property: IP restriction rule headers.

String ipAddress()

Get the ipAddress property: IP address the security restriction is valid for.

String name()

Get the name property: IP restriction rule name.

Integer priority()

Get the priority property: Priority of IP restriction rule.

String subnetMask()

Get the subnetMask property: Subnet mask for the range of IP addresses the restriction is valid for.

Integer subnetTrafficTag()

Get the subnetTrafficTag property: (internal) Subnet traffic tag.

IpFilterTag tag()

Get the tag property: Defines what this IP filter will be used for.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String vnetSubnetResourceId()

Get the vnetSubnetResourceId property: Virtual network resource id.

Integer vnetTrafficTag()

Get the vnetTrafficTag property: (internal) Vnet traffic tag.

IpSecurityRestriction withAction(String action)

Set the action property: Allow or Deny access for this IP range.

IpSecurityRestriction withDescription(String description)

Set the description property: IP restriction rule description.

IpSecurityRestriction withHeaders(Map<String,List<String>> headers)

Set the headers property: IP restriction rule headers.

IpSecurityRestriction withIpAddress(String ipAddress)

Set the ipAddress property: IP address the security restriction is valid for.

IpSecurityRestriction withName(String name)

Set the name property: IP restriction rule name.

IpSecurityRestriction withPriority(Integer priority)

Set the priority property: Priority of IP restriction rule.

IpSecurityRestriction withSubnetMask(String subnetMask)

Set the subnetMask property: Subnet mask for the range of IP addresses the restriction is valid for.

IpSecurityRestriction withSubnetTrafficTag(Integer subnetTrafficTag)

Set the subnetTrafficTag property: (internal) Subnet traffic tag.

IpSecurityRestriction withTag(IpFilterTag tag)

Set the tag property: Defines what this IP filter will be used for.

IpSecurityRestriction withVnetSubnetResourceId(String vnetSubnetResourceId)

Set the vnetSubnetResourceId property: Virtual network resource id.

IpSecurityRestriction withVnetTrafficTag(Integer vnetTrafficTag)

Set the vnetTrafficTag property: (internal) Vnet traffic tag.

Methods inherited from java.lang.Object

Constructor Details

IpSecurityRestriction

public IpSecurityRestriction()

Creates an instance of IpSecurityRestriction class.

Method Details

action

public String action()

Get the action property: Allow or Deny access for this IP range.

Returns:

the action value.

description

public String description()

Get the description property: IP restriction rule description.

Returns:

the description value.

fromJson

public static IpSecurityRestriction fromJson(JsonReader jsonReader)

Reads an instance of IpSecurityRestriction from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of IpSecurityRestriction if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the IpSecurityRestriction.

headers

public Map> 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.

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.

name

public String name()

Get the name property: IP restriction rule name.

Returns:

the name value.

priority

public Integer priority()

Get the priority property: Priority of IP restriction rule.

Returns:

the priority value.

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.

subnetTrafficTag

public Integer subnetTrafficTag()

Get the subnetTrafficTag property: (internal) Subnet traffic tag.

Returns:

the subnetTrafficTag value.

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

vnetSubnetResourceId

public String vnetSubnetResourceId()

Get the vnetSubnetResourceId property: Virtual network resource id.

Returns:

the vnetSubnetResourceId value.

vnetTrafficTag

public Integer vnetTrafficTag()

Get the vnetTrafficTag property: (internal) Vnet traffic tag.

Returns:

the vnetTrafficTag 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.

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.

withHeaders

public IpSecurityRestriction withHeaders(Map> 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.

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.

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.

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.

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.

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.

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.

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.

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.

Applies to