-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
NsgSecurityRule.cs
114 lines (109 loc) · 5.82 KB
/
NsgSecurityRule.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
namespace Azure.ResourceManager.Migrate.Models
{
/// <summary> Security Rule data model for Network Security Groups. </summary>
public partial class NsgSecurityRule
{
/// <summary> Initializes a new instance of NsgSecurityRule. </summary>
public NsgSecurityRule()
{
}
/// <summary> Initializes a new instance of NsgSecurityRule. </summary>
/// <param name="name"> Gets or sets the Security rule name. </param>
/// <param name="access">
/// Gets or sets whether network traffic is allowed or denied.
/// Possible values are “Allow” and “Deny”.
/// </param>
/// <param name="description"> Gets or sets a description for this rule. Restricted to 140 chars. </param>
/// <param name="destinationAddressPrefix">
/// Gets or sets destination address prefix. CIDR or source IP range.
/// A “*” can also be used to match all source IPs. Default tags such
/// as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used.
/// </param>
/// <param name="destinationPortRange">
/// Gets or sets Destination Port or Range. Integer or range between
/// 0 and 65535. A “*” can also be used to match all ports.
/// </param>
/// <param name="direction">
/// Gets or sets the direction of the rule.InBound or Outbound. The
/// direction specifies if rule will be evaluated on incoming or outgoing traffic.
/// </param>
/// <param name="priority">
/// Gets or sets 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.
/// </param>
/// <param name="protocol"> Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*). </param>
/// <param name="sourceAddressPrefix">
/// Gets or sets source address prefix. CIDR or source IP range. A
/// “*” 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.
/// </param>
/// <param name="sourcePortRange">
/// Gets or sets Source Port or Range. Integer or range between 0 and
/// 65535. A “*” can also be used to match all ports.
/// </param>
internal NsgSecurityRule(string name, string access, string description, string destinationAddressPrefix, string destinationPortRange, string direction, int? priority, string protocol, string sourceAddressPrefix, string sourcePortRange)
{
Name = name;
Access = access;
Description = description;
DestinationAddressPrefix = destinationAddressPrefix;
DestinationPortRange = destinationPortRange;
Direction = direction;
Priority = priority;
Protocol = protocol;
SourceAddressPrefix = sourceAddressPrefix;
SourcePortRange = sourcePortRange;
}
/// <summary> Gets or sets the Security rule name. </summary>
public string Name { get; set; }
/// <summary>
/// Gets or sets whether network traffic is allowed or denied.
/// Possible values are “Allow” and “Deny”.
/// </summary>
public string Access { get; set; }
/// <summary> Gets or sets a description for this rule. Restricted to 140 chars. </summary>
public string Description { get; set; }
/// <summary>
/// Gets or sets destination address prefix. CIDR or source IP range.
/// A “*” can also be used to match all source IPs. Default tags such
/// as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used.
/// </summary>
public string DestinationAddressPrefix { get; set; }
/// <summary>
/// Gets or sets Destination Port or Range. Integer or range between
/// 0 and 65535. A “*” can also be used to match all ports.
/// </summary>
public string DestinationPortRange { get; set; }
/// <summary>
/// Gets or sets the direction of the rule.InBound or Outbound. The
/// direction specifies if rule will be evaluated on incoming or outgoing traffic.
/// </summary>
public string Direction { get; set; }
/// <summary>
/// Gets or sets 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.
/// </summary>
public int? Priority { get; set; }
/// <summary> Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*). </summary>
public string Protocol { get; set; }
/// <summary>
/// Gets or sets source address prefix. CIDR or source IP range. A
/// “*” 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.
/// </summary>
public string SourceAddressPrefix { get; set; }
/// <summary>
/// Gets or sets Source Port or Range. Integer or range between 0 and
/// 65535. A “*” can also be used to match all ports.
/// </summary>
public string SourcePortRange { get; set; }
}
}