-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
NetworkConfiguration.cs
141 lines (131 loc) · 6.91 KB
/
NetworkConfiguration.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace Microsoft.Azure.Batch.Protocol.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// The network configuration for a Pool.
/// </summary>
public partial class NetworkConfiguration
{
/// <summary>
/// Initializes a new instance of the NetworkConfiguration class.
/// </summary>
public NetworkConfiguration()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the NetworkConfiguration class.
/// </summary>
/// <param name="subnetId">The ARM resource identifier of the virtual
/// network subnet which the Compute Nodes of the Pool will join. This
/// is of the form
/// /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}.</param>
/// <param name="dynamicVNetAssignmentScope">The scope of dynamic vnet
/// assignment.</param>
/// <param name="endpointConfiguration">The configuration for endpoints
/// on Compute Nodes in the Batch Pool.</param>
/// <param name="publicIPAddressConfiguration">The Public IPAddress
/// configuration for Compute Nodes in the Batch Pool.</param>
/// <param name="enableAcceleratedNetworking">Whether this pool should
/// enable accelerated networking.</param>
public NetworkConfiguration(string subnetId = default(string), DynamicVNetAssignmentScope? dynamicVNetAssignmentScope = default(DynamicVNetAssignmentScope?), PoolEndpointConfiguration endpointConfiguration = default(PoolEndpointConfiguration), PublicIPAddressConfiguration publicIPAddressConfiguration = default(PublicIPAddressConfiguration), bool? enableAcceleratedNetworking = default(bool?))
{
SubnetId = subnetId;
DynamicVNetAssignmentScope = dynamicVNetAssignmentScope;
EndpointConfiguration = endpointConfiguration;
PublicIPAddressConfiguration = publicIPAddressConfiguration;
EnableAcceleratedNetworking = enableAcceleratedNetworking;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the ARM resource identifier of the virtual network
/// subnet which the Compute Nodes of the Pool will join. This is of
/// the form
/// /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}.
/// </summary>
/// <remarks>
/// The virtual network must be in the same region and subscription as
/// the Azure Batch Account. The specified subnet should have enough
/// free IP addresses to accommodate the number of Compute Nodes in the
/// Pool. If the subnet doesn't have enough free IP addresses, the Pool
/// will partially allocate Nodes and a resize error will occur. The
/// 'MicrosoftAzureBatch' service principal must have the 'Classic
/// Virtual Machine Contributor' Role-Based Access Control (RBAC) role
/// for the specified VNet. The specified subnet must allow
/// communication from the Azure Batch service to be able to schedule
/// Tasks on the Nodes. This can be verified by checking if the
/// specified VNet has any associated Network Security Groups (NSG). If
/// communication to the Nodes in the specified subnet is denied by an
/// NSG, then the Batch service will set the state of the Compute Nodes
/// to unusable. For Pools created with virtualMachineConfiguration
/// only ARM virtual networks ('Microsoft.Network/virtualNetworks') are
/// supported, but for Pools created with cloudServiceConfiguration
/// both ARM and classic virtual networks are supported. If the
/// specified VNet has any associated Network Security Groups (NSG),
/// then a few reserved system ports must be enabled for inbound
/// communication. For Pools created with a virtual machine
/// configuration, enable ports 29876 and 29877, as well as port 22 for
/// Linux and port 3389 for Windows. For Pools created with a cloud
/// service configuration, enable ports 10100, 20100, and 30100. Also
/// enable outbound connections to Azure Storage on port 443. For more
/// details see:
/// https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration
/// </remarks>
[JsonProperty(PropertyName = "subnetId")]
public string SubnetId { get; set; }
/// <summary>
/// Gets or sets the scope of dynamic vnet assignment.
/// </summary>
/// <remarks>
/// Possible values include: 'none', 'job'
/// </remarks>
[JsonProperty(PropertyName = "dynamicVNetAssignmentScope")]
public DynamicVNetAssignmentScope? DynamicVNetAssignmentScope { get; set; }
/// <summary>
/// Gets or sets the configuration for endpoints on Compute Nodes in
/// the Batch Pool.
/// </summary>
/// <remarks>
/// Pool endpoint configuration is only supported on Pools with the
/// virtualMachineConfiguration property.
/// </remarks>
[JsonProperty(PropertyName = "endpointConfiguration")]
public PoolEndpointConfiguration EndpointConfiguration { get; set; }
/// <summary>
/// Gets or sets the Public IPAddress configuration for Compute Nodes
/// in the Batch Pool.
/// </summary>
/// <remarks>
/// Public IP configuration property is only supported on Pools with
/// the virtualMachineConfiguration property.
/// </remarks>
[JsonProperty(PropertyName = "publicIPAddressConfiguration")]
public PublicIPAddressConfiguration PublicIPAddressConfiguration { get; set; }
/// <summary>
/// Gets or sets whether this pool should enable accelerated
/// networking.
/// </summary>
/// <remarks>
/// Accelerated networking enables single root I/O virtualization
/// (SR-IOV) to a VM, which may lead to improved networking
/// performance. For more details, see:
/// https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview.
/// </remarks>
[JsonProperty(PropertyName = "enableAcceleratedNetworking")]
public bool? EnableAcceleratedNetworking { get; set; }
}
}