-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
BatchNetworkSecurityGroupRule.cs
54 lines (47 loc) · 4.83 KB
/
BatchNetworkSecurityGroupRule.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
namespace Azure.ResourceManager.Batch.Models
{
/// <summary> A network security group rule to apply to an inbound endpoint. </summary>
public partial class BatchNetworkSecurityGroupRule
{
/// <summary> Initializes a new instance of <see cref="BatchNetworkSecurityGroupRule"/>. </summary>
/// <param name="priority"> 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. </param>
/// <param name="access"> The action that should be taken for a specified IP address, subnet range or tag. </param>
/// <param name="sourceAddressPrefix"> 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. </param>
/// <exception cref="ArgumentNullException"> <paramref name="sourceAddressPrefix"/> is null. </exception>
public BatchNetworkSecurityGroupRule(int priority, BatchNetworkSecurityGroupRuleAccess access, string sourceAddressPrefix)
{
Argument.AssertNotNull(sourceAddressPrefix, nameof(sourceAddressPrefix));
Priority = priority;
Access = access;
SourceAddressPrefix = sourceAddressPrefix;
SourcePortRanges = new ChangeTrackingList<string>();
}
/// <summary> Initializes a new instance of <see cref="BatchNetworkSecurityGroupRule"/>. </summary>
/// <param name="priority"> 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. </param>
/// <param name="access"> The action that should be taken for a specified IP address, subnet range or tag. </param>
/// <param name="sourceAddressPrefix"> 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. </param>
/// <param name="sourcePortRanges"> Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the port ranges or ports can't overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be *. </param>
internal BatchNetworkSecurityGroupRule(int priority, BatchNetworkSecurityGroupRuleAccess access, string sourceAddressPrefix, IList<string> sourcePortRanges)
{
Priority = priority;
Access = access;
SourceAddressPrefix = sourceAddressPrefix;
SourcePortRanges = sourcePortRanges;
}
/// <summary> 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. </summary>
public int Priority { get; set; }
/// <summary> The action that should be taken for a specified IP address, subnet range or tag. </summary>
public BatchNetworkSecurityGroupRuleAccess Access { get; set; }
/// <summary> 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. </summary>
public string SourceAddressPrefix { get; set; }
/// <summary> Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the port ranges or ports can't overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be *. </summary>
public IList<string> SourcePortRanges { get; }
}
}