ComputeBatchModelFactory.BatchPoolCreateContent Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of BatchPoolCreateContent.
public static Azure.Compute.Batch.BatchPoolCreateContent BatchPoolCreateContent (string id = default, string displayName = default, string vmSize = default, Azure.Compute.Batch.VirtualMachineConfiguration virtualMachineConfiguration = default, TimeSpan? resizeTimeout = default, System.Collections.Generic.IDictionary<string,string> resourceTags = default, int? targetDedicatedNodes = default, int? targetLowPriorityNodes = default, bool? enableAutoScale = default, string autoScaleFormula = default, TimeSpan? autoScaleEvaluationInterval = default, bool? enableInterNodeCommunication = default, Azure.Compute.Batch.NetworkConfiguration networkConfiguration = default, Azure.Compute.Batch.BatchStartTask startTask = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.BatchApplicationPackageReference> applicationPackageReferences = default, int? taskSlotsPerNode = default, Azure.Compute.Batch.BatchTaskSchedulingPolicy taskSchedulingPolicy = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.UserAccount> userAccounts = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.MetadataItem> metadata = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.MountConfiguration> mountConfiguration = default, Azure.Compute.Batch.BatchNodeCommunicationMode? targetNodeCommunicationMode = default, Azure.Compute.Batch.UpgradePolicy upgradePolicy = default);
static member BatchPoolCreateContent : string * string * string * Azure.Compute.Batch.VirtualMachineConfiguration * Nullable<TimeSpan> * System.Collections.Generic.IDictionary<string, string> * Nullable<int> * Nullable<int> * Nullable<bool> * string * Nullable<TimeSpan> * Nullable<bool> * Azure.Compute.Batch.NetworkConfiguration * Azure.Compute.Batch.BatchStartTask * seq<Azure.Compute.Batch.BatchApplicationPackageReference> * Nullable<int> * Azure.Compute.Batch.BatchTaskSchedulingPolicy * seq<Azure.Compute.Batch.UserAccount> * seq<Azure.Compute.Batch.MetadataItem> * seq<Azure.Compute.Batch.MountConfiguration> * Nullable<Azure.Compute.Batch.BatchNodeCommunicationMode> * Azure.Compute.Batch.UpgradePolicy -> Azure.Compute.Batch.BatchPoolCreateContent
Public Shared Function BatchPoolCreateContent (Optional id As String = Nothing, Optional displayName As String = Nothing, Optional vmSize As String = Nothing, Optional virtualMachineConfiguration As VirtualMachineConfiguration = Nothing, Optional resizeTimeout As Nullable(Of TimeSpan) = Nothing, Optional resourceTags As IDictionary(Of String, String) = Nothing, Optional targetDedicatedNodes As Nullable(Of Integer) = Nothing, Optional targetLowPriorityNodes As Nullable(Of Integer) = Nothing, Optional enableAutoScale As Nullable(Of Boolean) = Nothing, Optional autoScaleFormula As String = Nothing, Optional autoScaleEvaluationInterval As Nullable(Of TimeSpan) = Nothing, Optional enableInterNodeCommunication As Nullable(Of Boolean) = Nothing, Optional networkConfiguration As NetworkConfiguration = Nothing, Optional startTask As BatchStartTask = Nothing, Optional applicationPackageReferences As IEnumerable(Of BatchApplicationPackageReference) = Nothing, Optional taskSlotsPerNode As Nullable(Of Integer) = Nothing, Optional taskSchedulingPolicy As BatchTaskSchedulingPolicy = Nothing, Optional userAccounts As IEnumerable(Of UserAccount) = Nothing, Optional metadata As IEnumerable(Of MetadataItem) = Nothing, Optional mountConfiguration As IEnumerable(Of MountConfiguration) = Nothing, Optional targetNodeCommunicationMode As Nullable(Of BatchNodeCommunicationMode) = Nothing, Optional upgradePolicy As UpgradePolicy = Nothing) As BatchPoolCreateContent
Parameters
- id
- String
A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two Pool IDs within an Account that differ only by case).
- displayName
- String
The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
- vmSize
- String
The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration), see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
- virtualMachineConfiguration
- VirtualMachineConfiguration
The virtual machine configuration for the Pool. This property must be specified.
The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
- resourceTags
- IDictionary<String,String>
The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'.
The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false.
- autoScaleFormula
- String
A formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale Compute Nodes in an Azure Batch Pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/).
The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false.
- networkConfiguration
- NetworkConfiguration
The network configuration for the Pool.
- startTask
- BatchStartTask
A Task specified to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted.
- applicationPackageReferences
- IEnumerable<BatchApplicationPackageReference>
The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool.
The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256.
- taskSchedulingPolicy
- BatchTaskSchedulingPolicy
How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread.
- userAccounts
- IEnumerable<UserAccount>
The list of user Accounts to be created on each Compute Node in the Pool.
- metadata
- IEnumerable<MetadataItem>
A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
- mountConfiguration
- IEnumerable<MountConfiguration>
Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system.
- targetNodeCommunicationMode
- Nullable<BatchNodeCommunicationMode>
The desired node communication mode for the pool. If omitted, the default value is Default.
- upgradePolicy
- UpgradePolicy
The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling.
Returns
A new BatchPoolCreateContent instance for mocking.
Applies to
Azure SDK for .NET