你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

NetworkSecurityGroupRule Constructor

Definition

Initializes a new instance of NetworkSecurityGroupRule.

public NetworkSecurityGroupRule (int priority, Azure.Compute.Batch.NetworkSecurityGroupRuleAccess access, string sourceAddressPrefix);
new Azure.Compute.Batch.NetworkSecurityGroupRule : int * Azure.Compute.Batch.NetworkSecurityGroupRuleAccess * string -> Azure.Compute.Batch.NetworkSecurityGroupRule
Public Sub New (priority As Integer, access As NetworkSecurityGroupRuleAccess, sourceAddressPrefix As String)

Parameters

priority
Int32

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.

access
NetworkSecurityGroupRuleAccess

The action that should be taken for a specified IP address, subnet range or tag.

sourceAddressPrefix
String

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.

Exceptions

sourceAddressPrefix is null.

Applies to