| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for license information. |
| | 3 | | // |
| | 4 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 5 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 6 | | // regenerated. |
| | 7 | |
|
| | 8 | | // |
| | 9 | | // This file was autogenerated by a tool. |
| | 10 | | // Do not modify it. |
| | 11 | | // |
| | 12 | |
|
| | 13 | | namespace Microsoft.Azure.Batch |
| | 14 | | { |
| | 15 | | using Models = Microsoft.Azure.Batch.Protocol.Models; |
| | 16 | | using System; |
| | 17 | | using System.Collections.Generic; |
| | 18 | | using System.Linq; |
| | 19 | |
|
| | 20 | | /// <summary> |
| | 21 | | /// The network configuration for a job. |
| | 22 | | /// </summary> |
| | 23 | | public partial class JobNetworkConfiguration : ITransportObjectProvider<Models.JobNetworkConfiguration>, IPropertyMe |
| | 24 | | { |
| | 25 | | #region Constructors |
| | 26 | | /// <summary> |
| | 27 | | /// Initializes a new instance of the <see cref="JobNetworkConfiguration"/> class. |
| | 28 | | /// </summary> |
| | 29 | | /// <param name='subnetId'>The ARM resource identifier of the virtual network subnet which nodes running tasks f |
| | 30 | | /// the duration of the task.</param> |
| 221 | 31 | | public JobNetworkConfiguration( |
| 221 | 32 | | string subnetId = default(string)) |
| | 33 | | { |
| 221 | 34 | | this.SubnetId = subnetId; |
| 221 | 35 | | } |
| | 36 | |
|
| 743 | 37 | | internal JobNetworkConfiguration(Models.JobNetworkConfiguration protocolObject) |
| | 38 | | { |
| 743 | 39 | | this.SubnetId = protocolObject.SubnetId; |
| 743 | 40 | | } |
| | 41 | |
|
| | 42 | | #endregion Constructors |
| | 43 | |
|
| | 44 | | #region JobNetworkConfiguration |
| | 45 | |
|
| | 46 | | /// <summary> |
| | 47 | | /// Gets the ARM resource identifier of the virtual network subnet which nodes running tasks from the job will j |
| | 48 | | /// for the duration of the task. |
| | 49 | | /// </summary> |
| | 50 | | /// <remarks> |
| | 51 | | /// <para>The specified subnet should have enough free IP addresses to accommodate the number of nodes which wil |
| | 52 | | /// run tasks from the job. This can be up to the number of nodes in the pool.</para><para>This will only work o |
| | 53 | | /// pools with the <see cref="CloudPool.VirtualMachineConfiguration" /> property.</para><para>This is of the for |
| | 54 | | /// /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/ |
| | 55 | | /// virtual network must be in the same region and subscription as the Azure Batch account. The 'MicrosoftAzureB |
| | 56 | | /// service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role |
| | 57 | | /// the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to |
| | 58 | | /// schedule tasks on the compute nodes. This can be verified by checking if the specified VNet has any associat |
| | 59 | | /// Network Security Groups (NSG). If communication to the compute nodes in the specified subnet is denied by an |
| | 60 | | /// NSG, then the Batch service will set the state of the compute nodes to unusable. Only ARM virtual networks ( |
| | 61 | | /// are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved s |
| | 62 | | /// ports must be enabled for inbound communication - ports 29876 and 29877, as well as port 22 for Linux and po |
| | 63 | | /// 3389 for Windows. Also enable outbound connections to Azure Storage on port 443. For more details see: https |
| | 64 | | /// </para> |
| | 65 | | /// </remarks> |
| 1184 | 66 | | public string SubnetId { get; } |
| | 67 | |
|
| | 68 | | #endregion // JobNetworkConfiguration |
| | 69 | |
|
| | 70 | | #region IPropertyMetadata |
| | 71 | |
|
| | 72 | | bool IModifiable.HasBeenModified |
| | 73 | | { |
| | 74 | | //This class is compile time readonly so it cannot have been modified |
| 0 | 75 | | get { return false; } |
| | 76 | | } |
| | 77 | |
|
| | 78 | | bool IReadOnly.IsReadOnly |
| | 79 | | { |
| 0 | 80 | | get { return true; } |
| | 81 | | set |
| | 82 | | { |
| | 83 | | // This class is compile time readonly already |
| 744 | 84 | | } |
| | 85 | | } |
| | 86 | |
|
| | 87 | | #endregion // IPropertyMetadata |
| | 88 | |
|
| | 89 | | #region Internal/private methods |
| | 90 | |
|
| | 91 | | /// <summary> |
| | 92 | | /// Return a protocol object of the requested type. |
| | 93 | | /// </summary> |
| | 94 | | /// <returns>The protocol object of the requested type.</returns> |
| | 95 | | Models.JobNetworkConfiguration ITransportObjectProvider<Models.JobNetworkConfiguration>.GetTransportObject() |
| | 96 | | { |
| 220 | 97 | | Models.JobNetworkConfiguration result = new Models.JobNetworkConfiguration() |
| 220 | 98 | | { |
| 220 | 99 | | SubnetId = this.SubnetId, |
| 220 | 100 | | }; |
| | 101 | |
|
| 220 | 102 | | return result; |
| | 103 | | } |
| | 104 | |
|
| | 105 | |
|
| | 106 | | #endregion // Internal/private methods |
| | 107 | | } |
| | 108 | | } |