Udostępnij za pośrednictwem


ArmNetworkModelFactory.EffectiveNetworkSecurityRule Method

Definition

Initializes a new instance of EffectiveNetworkSecurityRule.

public static Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityRule EffectiveNetworkSecurityRule (string name = default, Azure.ResourceManager.Network.Models.EffectiveSecurityRuleProtocol? protocol = default, string sourcePortRange = default, string destinationPortRange = default, System.Collections.Generic.IEnumerable<string> sourcePortRanges = default, System.Collections.Generic.IEnumerable<string> destinationPortRanges = default, string sourceAddressPrefix = default, string destinationAddressPrefix = default, System.Collections.Generic.IEnumerable<string> sourceAddressPrefixes = default, System.Collections.Generic.IEnumerable<string> destinationAddressPrefixes = default, System.Collections.Generic.IEnumerable<string> expandedSourceAddressPrefix = default, System.Collections.Generic.IEnumerable<string> expandedDestinationAddressPrefix = default, Azure.ResourceManager.Network.Models.SecurityRuleAccess? access = default, int? priority = default, Azure.ResourceManager.Network.Models.SecurityRuleDirection? direction = default);
static member EffectiveNetworkSecurityRule : string * Nullable<Azure.ResourceManager.Network.Models.EffectiveSecurityRuleProtocol> * string * string * seq<string> * seq<string> * string * string * seq<string> * seq<string> * seq<string> * seq<string> * Nullable<Azure.ResourceManager.Network.Models.SecurityRuleAccess> * Nullable<int> * Nullable<Azure.ResourceManager.Network.Models.SecurityRuleDirection> -> Azure.ResourceManager.Network.Models.EffectiveNetworkSecurityRule
Public Shared Function EffectiveNetworkSecurityRule (Optional name As String = Nothing, Optional protocol As Nullable(Of EffectiveSecurityRuleProtocol) = Nothing, Optional sourcePortRange As String = Nothing, Optional destinationPortRange As String = Nothing, Optional sourcePortRanges As IEnumerable(Of String) = Nothing, Optional destinationPortRanges As IEnumerable(Of String) = Nothing, Optional sourceAddressPrefix As String = Nothing, Optional destinationAddressPrefix As String = Nothing, Optional sourceAddressPrefixes As IEnumerable(Of String) = Nothing, Optional destinationAddressPrefixes As IEnumerable(Of String) = Nothing, Optional expandedSourceAddressPrefix As IEnumerable(Of String) = Nothing, Optional expandedDestinationAddressPrefix As IEnumerable(Of String) = Nothing, Optional access As Nullable(Of SecurityRuleAccess) = Nothing, Optional priority As Nullable(Of Integer) = Nothing, Optional direction As Nullable(Of SecurityRuleDirection) = Nothing) As EffectiveNetworkSecurityRule

Parameters

name
String

The name of the security rule specified by the user (if created by the user).

protocol
Nullable<EffectiveSecurityRuleProtocol>

The network protocol this rule applies to.

sourcePortRange
String

The source port or range.

destinationPortRange
String

The destination port or range.

sourcePortRanges
IEnumerable<String>

The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*).

destinationPortRanges
IEnumerable<String>

The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*).

sourceAddressPrefix
String

The source address prefix.

destinationAddressPrefix
String

The destination address prefix.

sourceAddressPrefixes
IEnumerable<String>

The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).

destinationAddressPrefixes
IEnumerable<String>

The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).

expandedSourceAddressPrefix
IEnumerable<String>

The expanded source address prefix.

expandedDestinationAddressPrefix
IEnumerable<String>

Expanded destination address prefix.

access
Nullable<SecurityRuleAccess>

Whether network traffic is allowed or denied.

priority
Nullable<Int32>

The priority of the rule.

direction
Nullable<SecurityRuleDirection>

The direction of the rule.

Returns

A new EffectiveNetworkSecurityRule instance for mocking.

Applies to