NetworkSecurityGroupRule Class
- java.
lang. Object - com.
azure. resourcemanager. batch. models. NetworkSecurityGroupRule
- com.
public final class NetworkSecurityGroupRule
A network security group rule to apply to an inbound endpoint.
Constructor Summary
Constructor | Description |
---|---|
NetworkSecurityGroupRule() |
Creates an instance of Network |
Method Summary
Modifier and Type | Method and Description |
---|---|
Network |
access()
Get the access property: The action that should be taken for a specified IP address, subnet range or tag. |
int |
priority()
Get the priority property: The priority for this rule. |
String |
sourceAddressPrefix()
Get the source |
List<String> |
sourcePortRanges()
Get the source |
void |
validate()
Validates the instance. |
Network |
withAccess(NetworkSecurityGroupRuleAccess access)
Set the access property: The action that should be taken for a specified IP address, subnet range or tag. |
Network |
withPriority(int priority)
Set the priority property: The priority for this rule. |
Network |
withSourceAddressPrefix(String sourceAddressPrefix)
Set the source |
Network |
withSourcePortRanges(List<String> sourcePortRanges)
Set the source |
Methods inherited from java.lang.Object
Constructor Details
NetworkSecurityGroupRule
public NetworkSecurityGroupRule()
Creates an instance of NetworkSecurityGroupRule class.
Method Details
access
public NetworkSecurityGroupRuleAccess access()
Get the access property: The action that should be taken for a specified IP address, subnet range or tag.
Returns:
priority
public int priority()
Get the priority property: The priority for this rule. 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:
sourceAddressPrefix
public String sourceAddressPrefix()
Get the sourceAddressPrefix property: The source address prefix or tag to match for the rule. 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:
sourcePortRanges
public List
Get the sourcePortRanges property: The source port ranges to match for the rule. 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:
validate
public void validate()
Validates the instance.
withAccess
public NetworkSecurityGroupRule withAccess(NetworkSecurityGroupRuleAccess access)
Set the access property: The action that should be taken for a specified IP address, subnet range or tag.
Parameters:
Returns:
withPriority
public NetworkSecurityGroupRule withPriority(int priority)
Set the priority property: The priority for this rule. 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:
Returns:
withSourceAddressPrefix
public NetworkSecurityGroupRule withSourceAddressPrefix(String sourceAddressPrefix)
Set the sourceAddressPrefix property: The source address prefix or tag to match for the rule. 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:
Returns:
withSourcePortRanges
public NetworkSecurityGroupRule withSourcePortRanges(List
Set the sourcePortRanges property: The source port ranges to match for the rule. 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:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for