NetworkSecurityGroupRule Class

  • java.lang.Object
    • com.microsoft.azure.management.batch.NetworkSecurityGroupRule

public class NetworkSecurityGroupRule

A network security group rule to apply to an inbound endpoint.

Constructor Summary

Constructor Description
NetworkSecurityGroupRule()

Method Summary

Modifier and Type Method and Description
NetworkSecurityGroupRuleAccess access()

Get possible values include: 'Allow', 'Deny'.

int priority()

Get priorities within a pool must be unique and are evaluated in order of priority.

java.lang.String sourceAddressPrefix()

Get valid values are a single IP address (i.e.

java.util.List<java.lang.String> sourcePortRanges()

Get valid values are '*' (for all ports 0 - 65535) or arrays of ports or port ranges (i.e.

NetworkSecurityGroupRule withAccess(NetworkSecurityGroupRuleAccess access)

Set possible values include: 'Allow', 'Deny'.

NetworkSecurityGroupRule withPriority(int priority)

Set priorities within a pool must be unique and are evaluated in order of priority.

NetworkSecurityGroupRule withSourceAddressPrefix(String sourceAddressPrefix)

Set valid values are a single IP address (i.e.

NetworkSecurityGroupRule withSourcePortRanges(List<String> sourcePortRanges)

Set valid values are '*' (for all ports 0 - 65535) or arrays of ports or port ranges (i.e.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

NetworkSecurityGroupRule

public NetworkSecurityGroupRule()

Method Details

access

public NetworkSecurityGroupRuleAccess access()

Get possible values include: 'Allow', 'Deny'.

Returns:

the access value

priority

public int priority()

Get priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400.

Returns:

the priority value

sourceAddressPrefix

public String sourceAddressPrefix()

Get valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400.

Returns:

the sourceAddressPrefix value

sourcePortRanges

public List sourcePortRanges()

Get valid values are '*' (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the port ranges or ports can't overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be *.

Returns:

the sourcePortRanges value

withAccess

public NetworkSecurityGroupRule withAccess(NetworkSecurityGroupRuleAccess access)

Set possible values include: 'Allow', 'Deny'.

Parameters:

access - the access value to set

Returns:

the NetworkSecurityGroupRule object itself.

withPriority

public NetworkSecurityGroupRule withPriority(int priority)

Set priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400.

Parameters:

priority - the priority value to set

Returns:

the NetworkSecurityGroupRule object itself.

withSourceAddressPrefix

public NetworkSecurityGroupRule withSourceAddressPrefix(String sourceAddressPrefix)

Set valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400.

Parameters:

sourceAddressPrefix - the sourceAddressPrefix value to set

Returns:

the NetworkSecurityGroupRule object itself.

withSourcePortRanges

public NetworkSecurityGroupRule withSourcePortRanges(List sourcePortRanges)

Set valid values are '*' (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the port ranges or ports can't overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be *.

Parameters:

sourcePortRanges - the sourcePortRanges value to set

Returns:

the NetworkSecurityGroupRule object itself.

Applies to