Class NetworkSecurityGroupRule
-
Constructor Summary
ConstructorDescriptionCreates an instance of NetworkSecurityGroupRule class. -
Method Summary
Modifier and TypeMethodDescriptionaccess()
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.Get the sourceAddressPrefix property: The source address prefix or tag to match for the rule.Get the sourcePortRanges property: The source port ranges to match for the rule.void
validate()
Validates the instance.Set the access property: The action that should be taken for a specified IP address, subnet range or tag.withPriority
(int priority) Set the priority property: The priority for this rule.withSourceAddressPrefix
(String sourceAddressPrefix) Set the sourceAddressPrefix property: The source address prefix or tag to match for the rule.withSourcePortRanges
(List<String> sourcePortRanges) Set the sourcePortRanges property: The source port ranges to match for the rule.
-
Constructor Details
-
NetworkSecurityGroupRule
public NetworkSecurityGroupRule()Creates an instance of NetworkSecurityGroupRule class.
-
-
Method Details
-
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:
- the priority value.
-
withPriority
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:
priority
- the priority value to set.- Returns:
- the NetworkSecurityGroupRule object itself.
-
access
Get the access property: The action that should be taken for a specified IP address, subnet range or tag.- Returns:
- the access value.
-
withAccess
Set the access property: The action that should be taken for a specified IP address, subnet range or tag.- Parameters:
access
- the access value to set.- Returns:
- the NetworkSecurityGroupRule object itself.
-
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:
- the sourceAddressPrefix value.
-
withSourceAddressPrefix
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:
sourceAddressPrefix
- the sourceAddressPrefix value to set.- Returns:
- the NetworkSecurityGroupRule object itself.
-
sourcePortRanges
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:
- the sourcePortRanges value.
-
withSourcePortRanges
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:
sourcePortRanges
- the sourcePortRanges value to set.- Returns:
- the NetworkSecurityGroupRule object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-