ArmNetworkModelFactory.NetworkRule 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.
Rule of type network.
public static Azure.ResourceManager.Network.Models.NetworkRule NetworkRule(string name, string description, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Network.Models.FirewallPolicyRuleNetworkProtocol> ipProtocols, System.Collections.Generic.IEnumerable<string> sourceAddresses, System.Collections.Generic.IEnumerable<string> destinationAddresses, System.Collections.Generic.IEnumerable<string> destinationPorts, System.Collections.Generic.IEnumerable<string> sourceIPGroups, System.Collections.Generic.IEnumerable<string> destinationIPGroups, System.Collections.Generic.IEnumerable<string> destinationFqdns, System.Collections.Generic.IEnumerable<string> sourceKubeSelectorGroups, System.Collections.Generic.IEnumerable<string> sourceGeoLocations, System.Collections.Generic.IEnumerable<string> destinationGeoLocations = default);
static member NetworkRule : string * string * seq<Azure.ResourceManager.Network.Models.FirewallPolicyRuleNetworkProtocol> * seq<string> * seq<string> * seq<string> * seq<string> * seq<string> * seq<string> * seq<string> * seq<string> * seq<string> -> Azure.ResourceManager.Network.Models.NetworkRule
Public Shared Function NetworkRule (name As String, description As String, ipProtocols As IEnumerable(Of FirewallPolicyRuleNetworkProtocol), sourceAddresses As IEnumerable(Of String), destinationAddresses As IEnumerable(Of String), destinationPorts As IEnumerable(Of String), sourceIPGroups As IEnumerable(Of String), destinationIPGroups As IEnumerable(Of String), destinationFqdns As IEnumerable(Of String), sourceKubeSelectorGroups As IEnumerable(Of String), sourceGeoLocations As IEnumerable(Of String), Optional destinationGeoLocations As IEnumerable(Of String) = Nothing) As NetworkRule
Parameters
- name
- String
Name of the rule.
- description
- String
Description of the rule.
- ipProtocols
- IEnumerable<FirewallPolicyRuleNetworkProtocol>
Array of FirewallPolicyRuleNetworkProtocols.
- sourceAddresses
- IEnumerable<String>
List of source IP addresses for this rule.
- destinationAddresses
- IEnumerable<String>
List of destination IP addresses or Service Tags.
- destinationPorts
- IEnumerable<String>
List of destination ports.
- sourceIPGroups
- IEnumerable<String>
List of source IpGroups for this rule.
- destinationIPGroups
- IEnumerable<String>
List of destination IpGroups for this rule.
- destinationFqdns
- IEnumerable<String>
List of destination FQDNs.
- sourceKubeSelectorGroups
- IEnumerable<String>
List of source Kubernetes Selector Groups for this rule.
- sourceGeoLocations
- IEnumerable<String>
List of source geographic location filters (ISO 3166-1 alpha-2 country codes, e.g. "US", "CA") for this rule.
- destinationGeoLocations
- IEnumerable<String>
List of destination geographic location filters (ISO 3166-1 alpha-2 country codes, e.g. "US", "CA") for this rule.
Returns
A new NetworkRule instance for mocking.