| | | 1 | | // <auto-generated> |
| | | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | | 4 | | // license information. |
| | | 5 | | // |
| | | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | | 8 | | // regenerated. |
| | | 9 | | // </auto-generated> |
| | | 10 | | |
| | | 11 | | namespace Microsoft.Azure.Batch.Protocol.Models |
| | | 12 | | { |
| | | 13 | | using Newtonsoft.Json; |
| | | 14 | | using System.Collections; |
| | | 15 | | using System.Collections.Generic; |
| | | 16 | | using System.Linq; |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Specification for creating a new Pool. |
| | | 20 | | /// </summary> |
| | | 21 | | public partial class PoolSpecification |
| | | 22 | | { |
| | | 23 | | /// <summary> |
| | | 24 | | /// Initializes a new instance of the PoolSpecification class. |
| | | 25 | | /// </summary> |
| | 402 | 26 | | public PoolSpecification() |
| | | 27 | | { |
| | | 28 | | CustomInit(); |
| | 402 | 29 | | } |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// Initializes a new instance of the PoolSpecification class. |
| | | 33 | | /// </summary> |
| | | 34 | | /// <param name="vmSize">The size of the virtual machines in the Pool. |
| | | 35 | | /// All virtual machines in a Pool are the same size.</param> |
| | | 36 | | /// <param name="displayName">The display name for the Pool.</param> |
| | | 37 | | /// <param name="cloudServiceConfiguration">The cloud service |
| | | 38 | | /// configuration for the Pool.</param> |
| | | 39 | | /// <param name="virtualMachineConfiguration">The virtual machine |
| | | 40 | | /// configuration for the Pool.</param> |
| | | 41 | | /// <param name="maxTasksPerNode">The maximum number of Tasks that can |
| | | 42 | | /// run concurrently on a single Compute Node in the Pool.</param> |
| | | 43 | | /// <param name="taskSchedulingPolicy">How Tasks are distributed across |
| | | 44 | | /// Compute Nodes in a Pool.</param> |
| | | 45 | | /// <param name="resizeTimeout">The timeout for allocation of Compute |
| | | 46 | | /// Nodes to the Pool.</param> |
| | | 47 | | /// <param name="targetDedicatedNodes">The desired number of dedicated |
| | | 48 | | /// Compute Nodes in the Pool.</param> |
| | | 49 | | /// <param name="targetLowPriorityNodes">The desired number of |
| | | 50 | | /// low-priority Compute Nodes in the Pool.</param> |
| | | 51 | | /// <param name="enableAutoScale">Whether the Pool size should |
| | | 52 | | /// automatically adjust over time.</param> |
| | | 53 | | /// <param name="autoScaleFormula">The formula for the desired number |
| | | 54 | | /// of Compute Nodes in the Pool.</param> |
| | | 55 | | /// <param name="autoScaleEvaluationInterval">The time interval at |
| | | 56 | | /// which to automatically adjust the Pool size according to the |
| | | 57 | | /// autoscale formula.</param> |
| | | 58 | | /// <param name="enableInterNodeCommunication">Whether the Pool permits |
| | | 59 | | /// direct communication between Compute Nodes.</param> |
| | | 60 | | /// <param name="networkConfiguration">The network configuration for |
| | | 61 | | /// the Pool.</param> |
| | | 62 | | /// <param name="startTask">A Task to run on each Compute Node as it |
| | | 63 | | /// joins the Pool. The Task runs when the Compute Node is added to the |
| | | 64 | | /// Pool or when the Compute Node is restarted.</param> |
| | | 65 | | /// <param name="certificateReferences">A list of Certificates to be |
| | | 66 | | /// installed on each Compute Node in the Pool.</param> |
| | | 67 | | /// <param name="applicationPackageReferences">The list of Packages to |
| | | 68 | | /// be installed on each Compute Node in the Pool.</param> |
| | | 69 | | /// <param name="applicationLicenses">The list of application licenses |
| | | 70 | | /// the Batch service will make available on each Compute Node in the |
| | | 71 | | /// Pool.</param> |
| | | 72 | | /// <param name="userAccounts">The list of user Accounts to be created |
| | | 73 | | /// on each Compute Node in the Pool.</param> |
| | | 74 | | /// <param name="metadata">A list of name-value pairs associated with |
| | | 75 | | /// the Pool as metadata.</param> |
| | | 76 | | /// <param name="mountConfiguration">A list of file systems to mount on |
| | | 77 | | /// each node in the pool.</param> |
| | 2 | 78 | | public PoolSpecification(string vmSize, string displayName = default(string), CloudServiceConfiguration cloudSer |
| | | 79 | | { |
| | 2 | 80 | | DisplayName = displayName; |
| | 2 | 81 | | VmSize = vmSize; |
| | 2 | 82 | | CloudServiceConfiguration = cloudServiceConfiguration; |
| | 2 | 83 | | VirtualMachineConfiguration = virtualMachineConfiguration; |
| | 2 | 84 | | MaxTasksPerNode = maxTasksPerNode; |
| | 2 | 85 | | TaskSchedulingPolicy = taskSchedulingPolicy; |
| | 2 | 86 | | ResizeTimeout = resizeTimeout; |
| | 2 | 87 | | TargetDedicatedNodes = targetDedicatedNodes; |
| | 2 | 88 | | TargetLowPriorityNodes = targetLowPriorityNodes; |
| | 2 | 89 | | EnableAutoScale = enableAutoScale; |
| | 2 | 90 | | AutoScaleFormula = autoScaleFormula; |
| | 2 | 91 | | AutoScaleEvaluationInterval = autoScaleEvaluationInterval; |
| | 2 | 92 | | EnableInterNodeCommunication = enableInterNodeCommunication; |
| | 2 | 93 | | NetworkConfiguration = networkConfiguration; |
| | 2 | 94 | | StartTask = startTask; |
| | 2 | 95 | | CertificateReferences = certificateReferences; |
| | 2 | 96 | | ApplicationPackageReferences = applicationPackageReferences; |
| | 2 | 97 | | ApplicationLicenses = applicationLicenses; |
| | 2 | 98 | | UserAccounts = userAccounts; |
| | 2 | 99 | | Metadata = metadata; |
| | 2 | 100 | | MountConfiguration = mountConfiguration; |
| | | 101 | | CustomInit(); |
| | 2 | 102 | | } |
| | | 103 | | |
| | | 104 | | /// <summary> |
| | | 105 | | /// An initialization method that performs custom operations like setting defaults |
| | | 106 | | /// </summary> |
| | | 107 | | partial void CustomInit(); |
| | | 108 | | |
| | | 109 | | /// <summary> |
| | | 110 | | /// Gets or sets the display name for the Pool. |
| | | 111 | | /// </summary> |
| | | 112 | | /// <remarks> |
| | | 113 | | /// The display name need not be unique and can contain any Unicode |
| | | 114 | | /// characters up to a maximum length of 1024. |
| | | 115 | | /// </remarks> |
| | | 116 | | [JsonProperty(PropertyName = "displayName")] |
| | 889 | 117 | | public string DisplayName { get; set; } |
| | | 118 | | |
| | | 119 | | /// <summary> |
| | | 120 | | /// Gets or sets the size of the virtual machines in the Pool. All |
| | | 121 | | /// virtual machines in a Pool are the same size. |
| | | 122 | | /// </summary> |
| | | 123 | | /// <remarks> |
| | | 124 | | /// For information about available sizes of virtual machines in Pools, |
| | | 125 | | /// see Choose a VM size for Compute Nodes in an Azure Batch Pool |
| | | 126 | | /// (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). |
| | | 127 | | /// </remarks> |
| | | 128 | | [JsonProperty(PropertyName = "vmSize")] |
| | 889 | 129 | | public string VmSize { get; set; } |
| | | 130 | | |
| | | 131 | | /// <summary> |
| | | 132 | | /// Gets or sets the cloud service configuration for the Pool. |
| | | 133 | | /// </summary> |
| | | 134 | | /// <remarks> |
| | | 135 | | /// This property must be specified if the Pool needs to be created |
| | | 136 | | /// with Azure PaaS VMs. This property and virtualMachineConfiguration |
| | | 137 | | /// are mutually exclusive and one of the properties must be specified. |
| | | 138 | | /// If neither is specified then the Batch service returns an error; if |
| | | 139 | | /// you are calling the REST API directly, the HTTP status code is 400 |
| | | 140 | | /// (Bad Request). This property cannot be specified if the Batch |
| | | 141 | | /// Account was created with its poolAllocationMode property set to |
| | | 142 | | /// 'UserSubscription'. |
| | | 143 | | /// </remarks> |
| | | 144 | | [JsonProperty(PropertyName = "cloudServiceConfiguration")] |
| | 903 | 145 | | public CloudServiceConfiguration CloudServiceConfiguration { get; set; } |
| | | 146 | | |
| | | 147 | | /// <summary> |
| | | 148 | | /// Gets or sets the virtual machine configuration for the Pool. |
| | | 149 | | /// </summary> |
| | | 150 | | /// <remarks> |
| | | 151 | | /// This property must be specified if the Pool needs to be created |
| | | 152 | | /// with Azure IaaS VMs. This property and cloudServiceConfiguration |
| | | 153 | | /// are mutually exclusive and one of the properties must be specified. |
| | | 154 | | /// If neither is specified then the Batch service returns an error; if |
| | | 155 | | /// you are calling the REST API directly, the HTTP status code is 400 |
| | | 156 | | /// (Bad Request). |
| | | 157 | | /// </remarks> |
| | | 158 | | [JsonProperty(PropertyName = "virtualMachineConfiguration")] |
| | 896 | 159 | | public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } |
| | | 160 | | |
| | | 161 | | /// <summary> |
| | | 162 | | /// Gets or sets the maximum number of Tasks that can run concurrently |
| | | 163 | | /// on a single Compute Node in the Pool. |
| | | 164 | | /// </summary> |
| | | 165 | | /// <remarks> |
| | | 166 | | /// The default value is 1. The maximum value is the smaller of 4 times |
| | | 167 | | /// the number of cores of the vmSize of the Pool or 256. |
| | | 168 | | /// </remarks> |
| | | 169 | | [JsonProperty(PropertyName = "maxTasksPerNode")] |
| | 889 | 170 | | public int? MaxTasksPerNode { get; set; } |
| | | 171 | | |
| | | 172 | | /// <summary> |
| | | 173 | | /// Gets or sets how Tasks are distributed across Compute Nodes in a |
| | | 174 | | /// Pool. |
| | | 175 | | /// </summary> |
| | | 176 | | /// <remarks> |
| | | 177 | | /// If not specified, the default is spread. |
| | | 178 | | /// </remarks> |
| | | 179 | | [JsonProperty(PropertyName = "taskSchedulingPolicy")] |
| | 891 | 180 | | public TaskSchedulingPolicy TaskSchedulingPolicy { get; set; } |
| | | 181 | | |
| | | 182 | | /// <summary> |
| | | 183 | | /// Gets or sets the timeout for allocation of Compute Nodes to the |
| | | 184 | | /// Pool. |
| | | 185 | | /// </summary> |
| | | 186 | | /// <remarks> |
| | | 187 | | /// This timeout applies only to manual scaling; it has no effect when |
| | | 188 | | /// enableAutoScale is set to true. The default value is 15 minutes. |
| | | 189 | | /// The minimum value is 5 minutes. If you specify a value less than 5 |
| | | 190 | | /// minutes, the Batch service rejects the request with an error; if |
| | | 191 | | /// you are calling the REST API directly, the HTTP status code is 400 |
| | | 192 | | /// (Bad Request). |
| | | 193 | | /// </remarks> |
| | | 194 | | [JsonProperty(PropertyName = "resizeTimeout")] |
| | 890 | 195 | | public System.TimeSpan? ResizeTimeout { get; set; } |
| | | 196 | | |
| | | 197 | | /// <summary> |
| | | 198 | | /// Gets or sets the desired number of dedicated Compute Nodes in the |
| | | 199 | | /// Pool. |
| | | 200 | | /// </summary> |
| | | 201 | | /// <remarks> |
| | | 202 | | /// This property must not be specified if enableAutoScale is set to |
| | | 203 | | /// true. If enableAutoScale is set to false, then you must set either |
| | | 204 | | /// targetDedicatedNodes, targetLowPriorityNodes, or both. |
| | | 205 | | /// </remarks> |
| | | 206 | | [JsonProperty(PropertyName = "targetDedicatedNodes")] |
| | 890 | 207 | | public int? TargetDedicatedNodes { get; set; } |
| | | 208 | | |
| | | 209 | | /// <summary> |
| | | 210 | | /// Gets or sets the desired number of low-priority Compute Nodes in |
| | | 211 | | /// the Pool. |
| | | 212 | | /// </summary> |
| | | 213 | | /// <remarks> |
| | | 214 | | /// This property must not be specified if enableAutoScale is set to |
| | | 215 | | /// true. If enableAutoScale is set to false, then you must set either |
| | | 216 | | /// targetDedicatedNodes, targetLowPriorityNodes, or both. |
| | | 217 | | /// </remarks> |
| | | 218 | | [JsonProperty(PropertyName = "targetLowPriorityNodes")] |
| | 899 | 219 | | public int? TargetLowPriorityNodes { get; set; } |
| | | 220 | | |
| | | 221 | | /// <summary> |
| | | 222 | | /// Gets or sets whether the Pool size should automatically adjust over |
| | | 223 | | /// time. |
| | | 224 | | /// </summary> |
| | | 225 | | /// <remarks> |
| | | 226 | | /// If false, at least one of targetDedicateNodes and |
| | | 227 | | /// targetLowPriorityNodes must be specified. If true, the |
| | | 228 | | /// autoScaleFormula element is required. The Pool automatically |
| | | 229 | | /// resizes according to the formula. The default value is false. |
| | | 230 | | /// </remarks> |
| | | 231 | | [JsonProperty(PropertyName = "enableAutoScale")] |
| | 884 | 232 | | public bool? EnableAutoScale { get; set; } |
| | | 233 | | |
| | | 234 | | /// <summary> |
| | | 235 | | /// Gets or sets the formula for the desired number of Compute Nodes in |
| | | 236 | | /// the Pool. |
| | | 237 | | /// </summary> |
| | | 238 | | /// <remarks> |
| | | 239 | | /// This property must not be specified if enableAutoScale is set to |
| | | 240 | | /// false. It is required if enableAutoScale is set to true. The |
| | | 241 | | /// formula is checked for validity before the Pool is created. If the |
| | | 242 | | /// formula is not valid, the Batch service rejects the request with |
| | | 243 | | /// detailed error information. |
| | | 244 | | /// </remarks> |
| | | 245 | | [JsonProperty(PropertyName = "autoScaleFormula")] |
| | 895 | 246 | | public string AutoScaleFormula { get; set; } |
| | | 247 | | |
| | | 248 | | /// <summary> |
| | | 249 | | /// Gets or sets the time interval at which to automatically adjust the |
| | | 250 | | /// Pool size according to the autoscale formula. |
| | | 251 | | /// </summary> |
| | | 252 | | /// <remarks> |
| | | 253 | | /// The default value is 15 minutes. The minimum and maximum value are |
| | | 254 | | /// 5 minutes and 168 hours respectively. If you specify a value less |
| | | 255 | | /// than 5 minutes or greater than 168 hours, the Batch service rejects |
| | | 256 | | /// the request with an invalid property value error; if you are |
| | | 257 | | /// calling the REST API directly, the HTTP status code is 400 (Bad |
| | | 258 | | /// Request). |
| | | 259 | | /// </remarks> |
| | | 260 | | [JsonProperty(PropertyName = "autoScaleEvaluationInterval")] |
| | 886 | 261 | | public System.TimeSpan? AutoScaleEvaluationInterval { get; set; } |
| | | 262 | | |
| | | 263 | | /// <summary> |
| | | 264 | | /// Gets or sets whether the Pool permits direct communication between |
| | | 265 | | /// Compute Nodes. |
| | | 266 | | /// </summary> |
| | | 267 | | /// <remarks> |
| | | 268 | | /// Enabling inter-node communication limits the maximum size of the |
| | | 269 | | /// Pool due to deployment restrictions on the Compute Nodes of the |
| | | 270 | | /// Pool. This may result in the Pool not reaching its desired size. |
| | | 271 | | /// The default value is false. |
| | | 272 | | /// </remarks> |
| | | 273 | | [JsonProperty(PropertyName = "enableInterNodeCommunication")] |
| | 890 | 274 | | public bool? EnableInterNodeCommunication { get; set; } |
| | | 275 | | |
| | | 276 | | /// <summary> |
| | | 277 | | /// Gets or sets the network configuration for the Pool. |
| | | 278 | | /// </summary> |
| | | 279 | | [JsonProperty(PropertyName = "networkConfiguration")] |
| | 885 | 280 | | public NetworkConfiguration NetworkConfiguration { get; set; } |
| | | 281 | | |
| | | 282 | | /// <summary> |
| | | 283 | | /// Gets or sets a Task to run on each Compute Node as it joins the |
| | | 284 | | /// Pool. The Task runs when the Compute Node is added to the Pool or |
| | | 285 | | /// when the Compute Node is restarted. |
| | | 286 | | /// </summary> |
| | | 287 | | [JsonProperty(PropertyName = "startTask")] |
| | 897 | 288 | | public StartTask StartTask { get; set; } |
| | | 289 | | |
| | | 290 | | /// <summary> |
| | | 291 | | /// Gets or sets a list of Certificates to be installed on each Compute |
| | | 292 | | /// Node in the Pool. |
| | | 293 | | /// </summary> |
| | | 294 | | /// <remarks> |
| | | 295 | | /// For Windows Nodes, the Batch service installs the Certificates to |
| | | 296 | | /// the specified Certificate store and location. For Linux Compute |
| | | 297 | | /// Nodes, the Certificates are stored in a directory inside the Task |
| | | 298 | | /// working directory and an environment variable |
| | | 299 | | /// AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this |
| | | 300 | | /// location. For Certificates with visibility of 'remoteUser', a |
| | | 301 | | /// 'certs' directory is created in the user's home directory (e.g., |
| | | 302 | | /// /home/{user-name}/certs) and Certificates are placed in that |
| | | 303 | | /// directory. |
| | | 304 | | /// </remarks> |
| | | 305 | | [JsonProperty(PropertyName = "certificateReferences")] |
| | 892 | 306 | | public IList<CertificateReference> CertificateReferences { get; set; } |
| | | 307 | | |
| | | 308 | | /// <summary> |
| | | 309 | | /// Gets or sets the list of Packages to be installed on each Compute |
| | | 310 | | /// Node in the Pool. |
| | | 311 | | /// </summary> |
| | | 312 | | /// <remarks> |
| | | 313 | | /// Changes to Package references affect all new Nodes joining the |
| | | 314 | | /// Pool, but do not affect Compute Nodes that are already in the Pool |
| | | 315 | | /// until they are rebooted or reimaged. There is a maximum of 10 |
| | | 316 | | /// Package references on any given Pool. |
| | | 317 | | /// </remarks> |
| | | 318 | | [JsonProperty(PropertyName = "applicationPackageReferences")] |
| | 896 | 319 | | public IList<ApplicationPackageReference> ApplicationPackageReferences { get; set; } |
| | | 320 | | |
| | | 321 | | /// <summary> |
| | | 322 | | /// Gets or sets the list of application licenses the Batch service |
| | | 323 | | /// will make available on each Compute Node in the Pool. |
| | | 324 | | /// </summary> |
| | | 325 | | /// <remarks> |
| | | 326 | | /// The list of application licenses must be a subset of available |
| | | 327 | | /// Batch service application licenses. If a license is requested which |
| | | 328 | | /// is not supported, Pool creation will fail. The permitted licenses |
| | | 329 | | /// available on the Pool are 'maya', 'vray', '3dsmax', 'arnold'. An |
| | | 330 | | /// additional charge applies for each application license added to the |
| | | 331 | | /// Pool. |
| | | 332 | | /// </remarks> |
| | | 333 | | [JsonProperty(PropertyName = "applicationLicenses")] |
| | 883 | 334 | | public IList<string> ApplicationLicenses { get; set; } |
| | | 335 | | |
| | | 336 | | /// <summary> |
| | | 337 | | /// Gets or sets the list of user Accounts to be created on each |
| | | 338 | | /// Compute Node in the Pool. |
| | | 339 | | /// </summary> |
| | | 340 | | [JsonProperty(PropertyName = "userAccounts")] |
| | 897 | 341 | | public IList<UserAccount> UserAccounts { get; set; } |
| | | 342 | | |
| | | 343 | | /// <summary> |
| | | 344 | | /// Gets or sets a list of name-value pairs associated with the Pool as |
| | | 345 | | /// metadata. |
| | | 346 | | /// </summary> |
| | | 347 | | /// <remarks> |
| | | 348 | | /// The Batch service does not assign any meaning to metadata; it is |
| | | 349 | | /// solely for the use of user code. |
| | | 350 | | /// </remarks> |
| | | 351 | | [JsonProperty(PropertyName = "metadata")] |
| | 895 | 352 | | public IList<MetadataItem> Metadata { get; set; } |
| | | 353 | | |
| | | 354 | | /// <summary> |
| | | 355 | | /// Gets or sets a list of file systems to mount on each node in the |
| | | 356 | | /// pool. |
| | | 357 | | /// </summary> |
| | | 358 | | /// <remarks> |
| | | 359 | | /// This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. |
| | | 360 | | /// </remarks> |
| | | 361 | | [JsonProperty(PropertyName = "mountConfiguration")] |
| | 895 | 362 | | public IList<MountConfiguration> MountConfiguration { get; set; } |
| | | 363 | | |
| | | 364 | | } |
| | | 365 | | } |