Share via


ArmNetworkModelFactory.SecurityRuleData Method

Definition

Initializes a new instance of SecurityRuleData.

public static Azure.ResourceManager.Network.SecurityRuleData SecurityRuleData (Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType? resourceType = default, Azure.ETag? etag = default, string description = default, Azure.ResourceManager.Network.Models.SecurityRuleProtocol? protocol = default, string sourcePortRange = default, string destinationPortRange = default, string sourceAddressPrefix = default, System.Collections.Generic.IEnumerable<string> sourceAddressPrefixes = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Network.ApplicationSecurityGroupData> sourceApplicationSecurityGroups = default, string destinationAddressPrefix = default, System.Collections.Generic.IEnumerable<string> destinationAddressPrefixes = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Network.ApplicationSecurityGroupData> destinationApplicationSecurityGroups = default, System.Collections.Generic.IEnumerable<string> sourcePortRanges = default, System.Collections.Generic.IEnumerable<string> destinationPortRanges = default, Azure.ResourceManager.Network.Models.SecurityRuleAccess? access = default, int? priority = default, Azure.ResourceManager.Network.Models.SecurityRuleDirection? direction = default, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default);
static member SecurityRuleData : Azure.Core.ResourceIdentifier * string * Nullable<Azure.Core.ResourceType> * Nullable<Azure.ETag> * string * Nullable<Azure.ResourceManager.Network.Models.SecurityRuleProtocol> * string * string * string * seq<string> * seq<Azure.ResourceManager.Network.ApplicationSecurityGroupData> * string * seq<string> * seq<Azure.ResourceManager.Network.ApplicationSecurityGroupData> * seq<string> * seq<string> * Nullable<Azure.ResourceManager.Network.Models.SecurityRuleAccess> * Nullable<int> * Nullable<Azure.ResourceManager.Network.Models.SecurityRuleDirection> * Nullable<Azure.ResourceManager.Network.Models.NetworkProvisioningState> -> Azure.ResourceManager.Network.SecurityRuleData
Public Shared Function SecurityRuleData (Optional id As ResourceIdentifier = Nothing, Optional name As String = Nothing, Optional resourceType As Nullable(Of ResourceType) = Nothing, Optional etag As Nullable(Of ETag) = Nothing, Optional description As String = Nothing, Optional protocol As Nullable(Of SecurityRuleProtocol) = Nothing, Optional sourcePortRange As String = Nothing, Optional destinationPortRange As String = Nothing, Optional sourceAddressPrefix As String = Nothing, Optional sourceAddressPrefixes As IEnumerable(Of String) = Nothing, Optional sourceApplicationSecurityGroups As IEnumerable(Of ApplicationSecurityGroupData) = Nothing, Optional destinationAddressPrefix As String = Nothing, Optional destinationAddressPrefixes As IEnumerable(Of String) = Nothing, Optional destinationApplicationSecurityGroups As IEnumerable(Of ApplicationSecurityGroupData) = Nothing, Optional sourcePortRanges As IEnumerable(Of String) = Nothing, Optional destinationPortRanges 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, Optional provisioningState As Nullable(Of NetworkProvisioningState) = Nothing) As SecurityRuleData

Parameters

id
ResourceIdentifier

Resource ID.

name
String

Resource name.

resourceType
Nullable<ResourceType>

Resource type.

etag
Nullable<ETag>

A unique read-only string that changes whenever the resource is updated.

description
String

A description for this rule. Restricted to 140 chars.

protocol
Nullable<SecurityRuleProtocol>

Network protocol this rule applies to.

sourcePortRange
String

The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

destinationPortRange
String

The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.

sourceAddressPrefix
String

The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.

sourceAddressPrefixes
IEnumerable<String>

The CIDR or source IP ranges.

sourceApplicationSecurityGroups
IEnumerable<ApplicationSecurityGroupData>

The application security group specified as source.

destinationAddressPrefix
String

The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.

destinationAddressPrefixes
IEnumerable<String>

The destination address prefixes. CIDR or destination IP ranges.

destinationApplicationSecurityGroups
IEnumerable<ApplicationSecurityGroupData>

The application security group specified as destination.

sourcePortRanges
IEnumerable<String>

The source port ranges.

destinationPortRanges
IEnumerable<String>

The destination port ranges.

access
Nullable<SecurityRuleAccess>

The network traffic is allowed or denied.

priority
Nullable<Int32>

The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

direction
Nullable<SecurityRuleDirection>

The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.

provisioningState
Nullable<NetworkProvisioningState>

The provisioning state of the security rule resource.

Returns

A new SecurityRuleData instance for mocking.

Applies to