ArmBatchModelFactory.BatchNetworkSecurityGroupRule Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A network security group rule to apply to an inbound endpoint.
public static Azure.ResourceManager.Batch.Models.BatchNetworkSecurityGroupRule BatchNetworkSecurityGroupRule(int priority = 0, Azure.ResourceManager.Batch.Models.BatchNetworkSecurityGroupRuleAccess access = Azure.ResourceManager.Batch.Models.BatchNetworkSecurityGroupRuleAccess.Allow, string sourceAddressPrefix = default, System.Collections.Generic.IEnumerable<string> sourcePortRanges = default);
static member BatchNetworkSecurityGroupRule : int * Azure.ResourceManager.Batch.Models.BatchNetworkSecurityGroupRuleAccess * string * seq<string> -> Azure.ResourceManager.Batch.Models.BatchNetworkSecurityGroupRule
Public Shared Function BatchNetworkSecurityGroupRule (Optional priority As Integer = 0, Optional access As BatchNetworkSecurityGroupRuleAccess = Azure.ResourceManager.Batch.Models.BatchNetworkSecurityGroupRuleAccess.Allow, Optional sourceAddressPrefix As String = Nothing, Optional sourcePortRanges As IEnumerable(Of String) = Nothing) As BatchNetworkSecurityGroupRule
Parameters
- priority
- Int32
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.
The action that should be taken for a specified IP address, subnet range or tag.
- sourceAddressPrefix
- String
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.
- sourcePortRanges
- IEnumerable<String>
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
A new BatchNetworkSecurityGroupRule instance for mocking.