import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an Azure Batch pool. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "testaccbatch", * location: "West Europe", * }); * const exampleAccount = new azure.storage.Account("example", { * name: "testaccsa", * resourceGroupName: example.name, * location: example.location, * accountTier: "Standard", * accountReplicationType: "LRS", * }); * const exampleAccount2 = new azure.batch.Account("example", { * name: "testaccbatch", * resourceGroupName: example.name, * location: example.location, * poolAllocationMode: "BatchService", * storageAccountId: exampleAccount.id, * storageAccountAuthenticationMode: "StorageKeys", * tags: { * env: "test", * }, * }); * const examplePool = new azure.batch.Pool("example", { * name: "testaccpool", * resourceGroupName: example.name, * accountName: exampleAccount2.name, * displayName: "Test Acc Pool Auto", * vmSize: "STANDARD_A1_V2", * nodeAgentSkuId: "batch.node.ubuntu 20.04", * autoScale: { * evaluationInterval: "PT15M", * formula: ` startingNumberOfVMs = 1; * maxNumberofVMs = 25; * pendingTaskSamplePercent = PendingTasks.GetSamplePercent(180 * TimeInterval_Second); * pendingTaskSamples = pendingTaskSamplePercent < 70 ? startingNumberOfVMs : avg(PendingTasks.GetSample(180 * TimeInterval_Second)); * TargetDedicatedNodes=min(maxNumberofVMs, pendingTaskSamples); * `, * }, * storageImageReference: { * publisher: "microsoft-azure-batch", * offer: "ubuntu-server-container", * sku: "20-04-lts", * version: "latest", * }, * containerConfiguration: { * type: "DockerCompatible", * containerRegistries: [{ * registryServer: "docker.io", * userName: "login", * password: "apassword", * }], * }, * startTask: { * commandLine: "echo 'Hello World from $env'", * taskRetryMaximum: 1, * waitForSuccess: true, * commonEnvironmentProperties: { * env: "TEST", * }, * userIdentity: { * autoUser: { * elevationLevel: "NonAdmin", * scope: "Task", * }, * }, * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Batch` - 2024-07-01 * * ## Import * * Batch Pools can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:batch/pool:Pool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.Batch/batchAccounts/myBatchAccount1/pools/myBatchPool1 * ``` */ export declare class Pool extends pulumi.CustomResource { /** * Get an existing Pool resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: PoolState, opts?: pulumi.CustomResourceOptions): Pool; /** * Returns true if the given object is an instance of Pool. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Pool; /** * Specifies the name of the Batch account in which the pool will be created. Changing this forces a new resource to be created. */ readonly accountName: pulumi.Output; /** * A `autoScale` block that describes the scale settings when using auto scale as defined below. * * > **Note:** `fixedScale` and `autoScale` blocks cannot be used both at the same time. */ readonly autoScale: pulumi.Output; /** * @deprecated the `certificate` property has been deprecated and will be removed in v5.0 of the AzureRM provider. */ readonly certificates: pulumi.Output; /** * The container configuration used in the pool's VMs. One `containerConfiguration` block as defined below. */ readonly containerConfiguration: pulumi.Output; /** * A `dataDisks` block describes the data disk settings as defined below. */ readonly dataDisks: pulumi.Output; /** * A `diskEncryption` block, as defined below, describes the disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image. */ readonly diskEncryptions: pulumi.Output; /** * Specifies the display name of the Batch pool. Changing this forces a new resource to be created. */ readonly displayName: pulumi.Output; /** * An `extensions` block as defined below. */ readonly extensions: pulumi.Output; /** * A `fixedScale` block that describes the scale settings when using fixed scale as defined below. */ readonly fixedScale: pulumi.Output; /** * An `identity` block as defined below. */ readonly identity: pulumi.Output; /** * Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. Values allowed are `Disabled` and `Enabled`. Defaults to `Enabled`. */ readonly interNodeCommunication: pulumi.Output; /** * The type of on-premises license to be used when deploying the operating system. This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: "Windows_Server" - The on-premises license is for Windows Server. "Windows_Client" - The on-premises license is for Windows Client. */ readonly licenseType: pulumi.Output; /** * Specifies the maximum number of tasks that can run concurrently on a single compute node in the pool. Defaults to `1`. Changing this forces a new resource to be created. */ readonly maxTasksPerNode: pulumi.Output; /** * A map of custom batch pool metadata. */ readonly metadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A `mount` block defined as below. */ readonly mounts: pulumi.Output; /** * Specifies the name of the Batch pool. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * A `networkConfiguration` block that describes the network configurations for the Batch pool as defined below. Changing this forces a new resource to be created. */ readonly networkConfiguration: pulumi.Output; /** * Specifies the SKU of the node agents that will be created in the Batch pool. Changing this forces a new resource to be created. */ readonly nodeAgentSkuId: pulumi.Output; /** * A `nodePlacement` block that describes the placement policy for allocating nodes in the pool as defined below. */ readonly nodePlacements: pulumi.Output; /** * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose which location the operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at and Linux VMs at . The only possible value is `CacheDisk`. */ readonly osDiskPlacement: pulumi.Output; /** * The name of the resource group in which to create the Batch pool. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * A `securityProfile` block that describes the security settings for the Batch pool as defined below. Changing this forces a new resource to be created. */ readonly securityProfile: pulumi.Output; /** * A `startTask` block that describes the start task settings for the Batch pool as defined below. */ readonly startTask: pulumi.Output; /** * Whether to stop if there is a pending resize operation on this pool. */ readonly stopPendingResizeOperation: pulumi.Output; /** * A `storageImageReference` block for the virtual machines that will compose the Batch pool as defined below. Changing this forces a new resource to be created. */ readonly storageImageReference: pulumi.Output; /** * The desired node communication mode for the pool. Possible values are `Classic`, `Default` and `Simplified`. */ readonly targetNodeCommunicationMode: pulumi.Output; /** * A `taskSchedulingPolicy` block that describes how tasks are distributed across compute nodes in a pool as defined below. If not specified, the default is spread as defined below. */ readonly taskSchedulingPolicies: pulumi.Output; /** * A `userAccounts` block that describes the list of user accounts to be created on each node in the pool as defined below. */ readonly userAccounts: pulumi.Output; /** * Specifies the size of the VM created in the Batch pool. Changing this forces a new resource to be created. */ readonly vmSize: pulumi.Output; /** * A `windows` block that describes the Windows configuration in the pool as defined below. */ readonly windows: pulumi.Output; /** * Create a Pool resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PoolArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Pool resources. */ export interface PoolState { /** * Specifies the name of the Batch account in which the pool will be created. Changing this forces a new resource to be created. */ accountName?: pulumi.Input; /** * A `autoScale` block that describes the scale settings when using auto scale as defined below. * * > **Note:** `fixedScale` and `autoScale` blocks cannot be used both at the same time. */ autoScale?: pulumi.Input; /** * @deprecated the `certificate` property has been deprecated and will be removed in v5.0 of the AzureRM provider. */ certificates?: pulumi.Input[]>; /** * The container configuration used in the pool's VMs. One `containerConfiguration` block as defined below. */ containerConfiguration?: pulumi.Input; /** * A `dataDisks` block describes the data disk settings as defined below. */ dataDisks?: pulumi.Input[]>; /** * A `diskEncryption` block, as defined below, describes the disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image. */ diskEncryptions?: pulumi.Input[]>; /** * Specifies the display name of the Batch pool. Changing this forces a new resource to be created. */ displayName?: pulumi.Input; /** * An `extensions` block as defined below. */ extensions?: pulumi.Input[]>; /** * A `fixedScale` block that describes the scale settings when using fixed scale as defined below. */ fixedScale?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. Values allowed are `Disabled` and `Enabled`. Defaults to `Enabled`. */ interNodeCommunication?: pulumi.Input; /** * The type of on-premises license to be used when deploying the operating system. This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: "Windows_Server" - The on-premises license is for Windows Server. "Windows_Client" - The on-premises license is for Windows Client. */ licenseType?: pulumi.Input; /** * Specifies the maximum number of tasks that can run concurrently on a single compute node in the pool. Defaults to `1`. Changing this forces a new resource to be created. */ maxTasksPerNode?: pulumi.Input; /** * A map of custom batch pool metadata. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `mount` block defined as below. */ mounts?: pulumi.Input[]>; /** * Specifies the name of the Batch pool. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A `networkConfiguration` block that describes the network configurations for the Batch pool as defined below. Changing this forces a new resource to be created. */ networkConfiguration?: pulumi.Input; /** * Specifies the SKU of the node agents that will be created in the Batch pool. Changing this forces a new resource to be created. */ nodeAgentSkuId?: pulumi.Input; /** * A `nodePlacement` block that describes the placement policy for allocating nodes in the pool as defined below. */ nodePlacements?: pulumi.Input[]>; /** * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose which location the operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at and Linux VMs at . The only possible value is `CacheDisk`. */ osDiskPlacement?: pulumi.Input; /** * The name of the resource group in which to create the Batch pool. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * A `securityProfile` block that describes the security settings for the Batch pool as defined below. Changing this forces a new resource to be created. */ securityProfile?: pulumi.Input; /** * A `startTask` block that describes the start task settings for the Batch pool as defined below. */ startTask?: pulumi.Input; /** * Whether to stop if there is a pending resize operation on this pool. */ stopPendingResizeOperation?: pulumi.Input; /** * A `storageImageReference` block for the virtual machines that will compose the Batch pool as defined below. Changing this forces a new resource to be created. */ storageImageReference?: pulumi.Input; /** * The desired node communication mode for the pool. Possible values are `Classic`, `Default` and `Simplified`. */ targetNodeCommunicationMode?: pulumi.Input; /** * A `taskSchedulingPolicy` block that describes how tasks are distributed across compute nodes in a pool as defined below. If not specified, the default is spread as defined below. */ taskSchedulingPolicies?: pulumi.Input[]>; /** * A `userAccounts` block that describes the list of user accounts to be created on each node in the pool as defined below. */ userAccounts?: pulumi.Input[]>; /** * Specifies the size of the VM created in the Batch pool. Changing this forces a new resource to be created. */ vmSize?: pulumi.Input; /** * A `windows` block that describes the Windows configuration in the pool as defined below. */ windows?: pulumi.Input[]>; } /** * The set of arguments for constructing a Pool resource. */ export interface PoolArgs { /** * Specifies the name of the Batch account in which the pool will be created. Changing this forces a new resource to be created. */ accountName: pulumi.Input; /** * A `autoScale` block that describes the scale settings when using auto scale as defined below. * * > **Note:** `fixedScale` and `autoScale` blocks cannot be used both at the same time. */ autoScale?: pulumi.Input; /** * @deprecated the `certificate` property has been deprecated and will be removed in v5.0 of the AzureRM provider. */ certificates?: pulumi.Input[]>; /** * The container configuration used in the pool's VMs. One `containerConfiguration` block as defined below. */ containerConfiguration?: pulumi.Input; /** * A `dataDisks` block describes the data disk settings as defined below. */ dataDisks?: pulumi.Input[]>; /** * A `diskEncryption` block, as defined below, describes the disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image. */ diskEncryptions?: pulumi.Input[]>; /** * Specifies the display name of the Batch pool. Changing this forces a new resource to be created. */ displayName?: pulumi.Input; /** * An `extensions` block as defined below. */ extensions?: pulumi.Input[]>; /** * A `fixedScale` block that describes the scale settings when using fixed scale as defined below. */ fixedScale?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. Values allowed are `Disabled` and `Enabled`. Defaults to `Enabled`. */ interNodeCommunication?: pulumi.Input; /** * The type of on-premises license to be used when deploying the operating system. This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: "Windows_Server" - The on-premises license is for Windows Server. "Windows_Client" - The on-premises license is for Windows Client. */ licenseType?: pulumi.Input; /** * Specifies the maximum number of tasks that can run concurrently on a single compute node in the pool. Defaults to `1`. Changing this forces a new resource to be created. */ maxTasksPerNode?: pulumi.Input; /** * A map of custom batch pool metadata. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `mount` block defined as below. */ mounts?: pulumi.Input[]>; /** * Specifies the name of the Batch pool. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A `networkConfiguration` block that describes the network configurations for the Batch pool as defined below. Changing this forces a new resource to be created. */ networkConfiguration?: pulumi.Input; /** * Specifies the SKU of the node agents that will be created in the Batch pool. Changing this forces a new resource to be created. */ nodeAgentSkuId: pulumi.Input; /** * A `nodePlacement` block that describes the placement policy for allocating nodes in the pool as defined below. */ nodePlacements?: pulumi.Input[]>; /** * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose which location the operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at and Linux VMs at . The only possible value is `CacheDisk`. */ osDiskPlacement?: pulumi.Input; /** * The name of the resource group in which to create the Batch pool. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * A `securityProfile` block that describes the security settings for the Batch pool as defined below. Changing this forces a new resource to be created. */ securityProfile?: pulumi.Input; /** * A `startTask` block that describes the start task settings for the Batch pool as defined below. */ startTask?: pulumi.Input; /** * Whether to stop if there is a pending resize operation on this pool. */ stopPendingResizeOperation?: pulumi.Input; /** * A `storageImageReference` block for the virtual machines that will compose the Batch pool as defined below. Changing this forces a new resource to be created. */ storageImageReference: pulumi.Input; /** * The desired node communication mode for the pool. Possible values are `Classic`, `Default` and `Simplified`. */ targetNodeCommunicationMode?: pulumi.Input; /** * A `taskSchedulingPolicy` block that describes how tasks are distributed across compute nodes in a pool as defined below. If not specified, the default is spread as defined below. */ taskSchedulingPolicies?: pulumi.Input[]>; /** * A `userAccounts` block that describes the list of user accounts to be created on each node in the pool as defined below. */ userAccounts?: pulumi.Input[]>; /** * Specifies the size of the VM created in the Batch pool. Changing this forces a new resource to be created. */ vmSize: pulumi.Input; /** * A `windows` block that describes the Windows configuration in the pool as defined below. */ windows?: pulumi.Input[]>; }