com.pulumi.azurenative.batch.Pool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.batch;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.batch.PoolArgs;
import com.pulumi.azurenative.batch.outputs.ApplicationPackageReferenceResponse;
import com.pulumi.azurenative.batch.outputs.AutoScaleRunResponse;
import com.pulumi.azurenative.batch.outputs.BatchPoolIdentityResponse;
import com.pulumi.azurenative.batch.outputs.CertificateReferenceResponse;
import com.pulumi.azurenative.batch.outputs.DeploymentConfigurationResponse;
import com.pulumi.azurenative.batch.outputs.MetadataItemResponse;
import com.pulumi.azurenative.batch.outputs.MountConfigurationResponse;
import com.pulumi.azurenative.batch.outputs.NetworkConfigurationResponse;
import com.pulumi.azurenative.batch.outputs.ResizeOperationStatusResponse;
import com.pulumi.azurenative.batch.outputs.ScaleSettingsResponse;
import com.pulumi.azurenative.batch.outputs.StartTaskResponse;
import com.pulumi.azurenative.batch.outputs.TaskSchedulingPolicyResponse;
import com.pulumi.azurenative.batch.outputs.UserAccountResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Contains information about a pool.
* Azure REST API version: 2023-05-01. Prior API version in Azure Native 1.x: 2021-01-01.
*
* Other available API versions: 2020-05-01, 2023-11-01, 2024-02-01, 2024-07-01.
*
* ## Example Usage
* ### CreatePool - Custom Image
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.batch.Pool;
* import com.pulumi.azurenative.batch.PoolArgs;
* import com.pulumi.azurenative.batch.inputs.DeploymentConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.VirtualMachineConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ImageReferenceArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var pool = new Pool("pool", PoolArgs.builder()
* .accountName("sampleacct")
* .deploymentConfiguration(DeploymentConfigurationArgs.builder()
* .virtualMachineConfiguration(VirtualMachineConfigurationArgs.builder()
* .imageReference(ImageReferenceArgs.builder()
* .id("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1")
* .build())
* .nodeAgentSkuId("batch.node.ubuntu 18.04")
* .build())
* .build())
* .poolName("testpool")
* .resourceGroupName("default-azurebatch-japaneast")
* .vmSize("STANDARD_D4")
* .build());
*
* }
* }
*
* }
*
* ### CreatePool - Full CloudServiceConfiguration
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.batch.Pool;
* import com.pulumi.azurenative.batch.PoolArgs;
* import com.pulumi.azurenative.batch.inputs.ApplicationPackageReferenceArgs;
* import com.pulumi.azurenative.batch.inputs.CertificateReferenceArgs;
* import com.pulumi.azurenative.batch.inputs.DeploymentConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.CloudServiceConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.MetadataItemArgs;
* import com.pulumi.azurenative.batch.inputs.NetworkConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.PublicIPAddressConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ScaleSettingsArgs;
* import com.pulumi.azurenative.batch.inputs.FixedScaleSettingsArgs;
* import com.pulumi.azurenative.batch.inputs.StartTaskArgs;
* import com.pulumi.azurenative.batch.inputs.UserIdentityArgs;
* import com.pulumi.azurenative.batch.inputs.AutoUserSpecificationArgs;
* import com.pulumi.azurenative.batch.inputs.TaskSchedulingPolicyArgs;
* import com.pulumi.azurenative.batch.inputs.UserAccountArgs;
* import com.pulumi.azurenative.batch.inputs.LinuxUserConfigurationArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var pool = new Pool("pool", PoolArgs.builder()
* .accountName("sampleacct")
* .applicationLicenses(
* "app-license0",
* "app-license1")
* .applicationPackages(ApplicationPackageReferenceArgs.builder()
* .id("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234")
* .version("asdf")
* .build())
* .certificates(CertificateReferenceArgs.builder()
* .id("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567")
* .storeLocation("LocalMachine")
* .storeName("MY")
* .visibility("RemoteUser")
* .build())
* .deploymentConfiguration(DeploymentConfigurationArgs.builder()
* .cloudServiceConfiguration(CloudServiceConfigurationArgs.builder()
* .osFamily("4")
* .osVersion("WA-GUEST-OS-4.45_201708-01")
* .build())
* .build())
* .displayName("my-pool-name")
* .interNodeCommunication("Enabled")
* .metadata(
* MetadataItemArgs.builder()
* .name("metadata-1")
* .value("value-1")
* .build(),
* MetadataItemArgs.builder()
* .name("metadata-2")
* .value("value-2")
* .build())
* .networkConfiguration(NetworkConfigurationArgs.builder()
* .publicIPAddressConfiguration(PublicIPAddressConfigurationArgs.builder()
* .ipAddressIds(
* "/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135",
* "/subscriptions/subid2/resourceGroups/rg24/providers/Microsoft.Network/publicIPAddresses/ip268")
* .provision("UserManaged")
* .build())
* .subnetId("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123")
* .build())
* .poolName("testpool")
* .resourceGroupName("default-azurebatch-japaneast")
* .scaleSettings(ScaleSettingsArgs.builder()
* .fixedScale(FixedScaleSettingsArgs.builder()
* .nodeDeallocationOption("TaskCompletion")
* .resizeTimeout("PT8M")
* .targetDedicatedNodes(6)
* .targetLowPriorityNodes(28)
* .build())
* .build())
* .startTask(StartTaskArgs.builder()
* .commandLine("cmd /c SET")
* .environmentSettings(EnvironmentSettingArgs.builder()
* .name("MYSET")
* .value("1234")
* .build())
* .maxTaskRetryCount(6)
* .resourceFiles(ResourceFileArgs.builder()
* .fileMode("777")
* .filePath("c:\\temp\\gohere")
* .httpUrl("https://testaccount.blob.core.windows.net/example-blob-file")
* .build())
* .userIdentity(UserIdentityArgs.builder()
* .autoUser(AutoUserSpecificationArgs.builder()
* .elevationLevel("Admin")
* .scope("Pool")
* .build())
* .build())
* .waitForSuccess(true)
* .build())
* .taskSchedulingPolicy(TaskSchedulingPolicyArgs.builder()
* .nodeFillType("Pack")
* .build())
* .taskSlotsPerNode(13)
* .userAccounts(UserAccountArgs.builder()
* .elevationLevel("Admin")
* .linuxUserConfiguration(LinuxUserConfigurationArgs.builder()
* .gid(4567)
* .sshPrivateKey("sshprivatekeyvalue")
* .uid(1234)
* .build())
* .name("username1")
* .password("")
* .build())
* .vmSize("STANDARD_D4")
* .build());
*
* }
* }
*
* }
*
* ### CreatePool - Full VirtualMachineConfiguration
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.batch.Pool;
* import com.pulumi.azurenative.batch.PoolArgs;
* import com.pulumi.azurenative.batch.inputs.DeploymentConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.VirtualMachineConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.DiskEncryptionConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ImageReferenceArgs;
* import com.pulumi.azurenative.batch.inputs.NodePlacementConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.OSDiskArgs;
* import com.pulumi.azurenative.batch.inputs.DiffDiskSettingsArgs;
* import com.pulumi.azurenative.batch.inputs.WindowsConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.NetworkConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.PoolEndpointConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ScaleSettingsArgs;
* import com.pulumi.azurenative.batch.inputs.AutoScaleSettingsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var pool = new Pool("pool", PoolArgs.builder()
* .accountName("sampleacct")
* .deploymentConfiguration(DeploymentConfigurationArgs.builder()
* .virtualMachineConfiguration(VirtualMachineConfigurationArgs.builder()
* .dataDisks(
* DataDiskArgs.builder()
* .caching("ReadWrite")
* .diskSizeGB(30)
* .lun(0)
* .storageAccountType("Premium_LRS")
* .build(),
* DataDiskArgs.builder()
* .caching("None")
* .diskSizeGB(200)
* .lun(1)
* .storageAccountType("Standard_LRS")
* .build())
* .diskEncryptionConfiguration(DiskEncryptionConfigurationArgs.builder()
* .targets(
* "OsDisk",
* "TemporaryDisk")
* .build())
* .imageReference(ImageReferenceArgs.builder()
* .offer("WindowsServer")
* .publisher("MicrosoftWindowsServer")
* .sku("2016-Datacenter-SmallDisk")
* .version("latest")
* .build())
* .licenseType("Windows_Server")
* .nodeAgentSkuId("batch.node.windows amd64")
* .nodePlacementConfiguration(NodePlacementConfigurationArgs.builder()
* .policy("Zonal")
* .build())
* .osDisk(OSDiskArgs.builder()
* .ephemeralOSDiskSettings(DiffDiskSettingsArgs.builder()
* .placement("CacheDisk")
* .build())
* .build())
* .windowsConfiguration(WindowsConfigurationArgs.builder()
* .enableAutomaticUpdates(false)
* .build())
* .build())
* .build())
* .networkConfiguration(NetworkConfigurationArgs.builder()
* .endpointConfiguration(PoolEndpointConfigurationArgs.builder()
* .inboundNatPools(InboundNatPoolArgs.builder()
* .backendPort(12001)
* .frontendPortRangeEnd(15100)
* .frontendPortRangeStart(15000)
* .name("testnat")
* .networkSecurityGroupRules(
* NetworkSecurityGroupRuleArgs.builder()
* .access("Allow")
* .priority(150)
* .sourceAddressPrefix("192.100.12.45")
* .sourcePortRanges(
* "1",
* "2")
* .build(),
* NetworkSecurityGroupRuleArgs.builder()
* .access("Deny")
* .priority(3500)
* .sourceAddressPrefix("*")
* .sourcePortRanges("*")
* .build())
* .protocol("TCP")
* .build())
* .build())
* .build())
* .poolName("testpool")
* .resourceGroupName("default-azurebatch-japaneast")
* .scaleSettings(ScaleSettingsArgs.builder()
* .autoScale(AutoScaleSettingsArgs.builder()
* .evaluationInterval("PT5M")
* .formula("$TargetDedicatedNodes=1")
* .build())
* .build())
* .vmSize("STANDARD_D4")
* .build());
*
* }
* }
*
* }
*
* ### CreatePool - Minimal CloudServiceConfiguration
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.batch.Pool;
* import com.pulumi.azurenative.batch.PoolArgs;
* import com.pulumi.azurenative.batch.inputs.DeploymentConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.CloudServiceConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ScaleSettingsArgs;
* import com.pulumi.azurenative.batch.inputs.FixedScaleSettingsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var pool = new Pool("pool", PoolArgs.builder()
* .accountName("sampleacct")
* .deploymentConfiguration(DeploymentConfigurationArgs.builder()
* .cloudServiceConfiguration(CloudServiceConfigurationArgs.builder()
* .osFamily("5")
* .build())
* .build())
* .poolName("testpool")
* .resourceGroupName("default-azurebatch-japaneast")
* .scaleSettings(ScaleSettingsArgs.builder()
* .fixedScale(FixedScaleSettingsArgs.builder()
* .targetDedicatedNodes(3)
* .build())
* .build())
* .vmSize("STANDARD_D4")
* .build());
*
* }
* }
*
* }
*
* ### CreatePool - Minimal VirtualMachineConfiguration
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.batch.Pool;
* import com.pulumi.azurenative.batch.PoolArgs;
* import com.pulumi.azurenative.batch.inputs.DeploymentConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.VirtualMachineConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ImageReferenceArgs;
* import com.pulumi.azurenative.batch.inputs.ScaleSettingsArgs;
* import com.pulumi.azurenative.batch.inputs.AutoScaleSettingsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var pool = new Pool("pool", PoolArgs.builder()
* .accountName("sampleacct")
* .deploymentConfiguration(DeploymentConfigurationArgs.builder()
* .virtualMachineConfiguration(VirtualMachineConfigurationArgs.builder()
* .imageReference(ImageReferenceArgs.builder()
* .offer("UbuntuServer")
* .publisher("Canonical")
* .sku("18.04-LTS")
* .version("latest")
* .build())
* .nodeAgentSkuId("batch.node.ubuntu 18.04")
* .build())
* .build())
* .poolName("testpool")
* .resourceGroupName("default-azurebatch-japaneast")
* .scaleSettings(ScaleSettingsArgs.builder()
* .autoScale(AutoScaleSettingsArgs.builder()
* .evaluationInterval("PT5M")
* .formula("$TargetDedicatedNodes=1")
* .build())
* .build())
* .vmSize("STANDARD_D4")
* .build());
*
* }
* }
*
* }
*
* ### CreatePool - No public IP
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.batch.Pool;
* import com.pulumi.azurenative.batch.PoolArgs;
* import com.pulumi.azurenative.batch.inputs.DeploymentConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.VirtualMachineConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ImageReferenceArgs;
* import com.pulumi.azurenative.batch.inputs.NetworkConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.PublicIPAddressConfigurationArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var pool = new Pool("pool", PoolArgs.builder()
* .accountName("sampleacct")
* .deploymentConfiguration(DeploymentConfigurationArgs.builder()
* .virtualMachineConfiguration(VirtualMachineConfigurationArgs.builder()
* .imageReference(ImageReferenceArgs.builder()
* .id("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1")
* .build())
* .nodeAgentSkuId("batch.node.ubuntu 18.04")
* .build())
* .build())
* .networkConfiguration(NetworkConfigurationArgs.builder()
* .publicIPAddressConfiguration(PublicIPAddressConfigurationArgs.builder()
* .provision("NoPublicIPAddresses")
* .build())
* .subnetId("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123")
* .build())
* .poolName("testpool")
* .resourceGroupName("default-azurebatch-japaneast")
* .vmSize("STANDARD_D4")
* .build());
*
* }
* }
*
* }
*
* ### CreatePool - Public IPs
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.batch.Pool;
* import com.pulumi.azurenative.batch.PoolArgs;
* import com.pulumi.azurenative.batch.inputs.DeploymentConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.VirtualMachineConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ImageReferenceArgs;
* import com.pulumi.azurenative.batch.inputs.NetworkConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.PublicIPAddressConfigurationArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var pool = new Pool("pool", PoolArgs.builder()
* .accountName("sampleacct")
* .deploymentConfiguration(DeploymentConfigurationArgs.builder()
* .virtualMachineConfiguration(VirtualMachineConfigurationArgs.builder()
* .imageReference(ImageReferenceArgs.builder()
* .id("/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1")
* .build())
* .nodeAgentSkuId("batch.node.ubuntu 18.04")
* .build())
* .build())
* .networkConfiguration(NetworkConfigurationArgs.builder()
* .publicIPAddressConfiguration(PublicIPAddressConfigurationArgs.builder()
* .ipAddressIds("/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135")
* .provision("UserManaged")
* .build())
* .subnetId("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123")
* .build())
* .poolName("testpool")
* .resourceGroupName("default-azurebatch-japaneast")
* .vmSize("STANDARD_D4")
* .build());
*
* }
* }
*
* }
*
* ### CreatePool - VirtualMachineConfiguration Extensions
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.batch.Pool;
* import com.pulumi.azurenative.batch.PoolArgs;
* import com.pulumi.azurenative.batch.inputs.DeploymentConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.VirtualMachineConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ImageReferenceArgs;
* import com.pulumi.azurenative.batch.inputs.ScaleSettingsArgs;
* import com.pulumi.azurenative.batch.inputs.AutoScaleSettingsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var pool = new Pool("pool", PoolArgs.builder()
* .accountName("sampleacct")
* .deploymentConfiguration(DeploymentConfigurationArgs.builder()
* .virtualMachineConfiguration(VirtualMachineConfigurationArgs.builder()
* .extensions(VMExtensionArgs.builder()
* .autoUpgradeMinorVersion(true)
* .enableAutomaticUpgrade(true)
* .name("batchextension1")
* .publisher("Microsoft.Azure.KeyVault")
* .settings(Map.ofEntries(
* Map.entry("authenticationSettingsKey", "authenticationSettingsValue"),
* Map.entry("secretsManagementSettingsKey", "secretsManagementSettingsValue")
* ))
* .type("KeyVaultForLinux")
* .typeHandlerVersion("2.0")
* .build())
* .imageReference(ImageReferenceArgs.builder()
* .offer("0001-com-ubuntu-server-focal")
* .publisher("Canonical")
* .sku("20_04-lts")
* .build())
* .nodeAgentSkuId("batch.node.ubuntu 20.04")
* .build())
* .build())
* .poolName("testpool")
* .resourceGroupName("default-azurebatch-japaneast")
* .scaleSettings(ScaleSettingsArgs.builder()
* .autoScale(AutoScaleSettingsArgs.builder()
* .evaluationInterval("PT5M")
* .formula("$TargetDedicatedNodes=1")
* .build())
* .build())
* .targetNodeCommunicationMode("Default")
* .vmSize("STANDARD_D4")
* .build());
*
* }
* }
*
* }
*
* ### CreatePool - accelerated networking
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.batch.Pool;
* import com.pulumi.azurenative.batch.PoolArgs;
* import com.pulumi.azurenative.batch.inputs.DeploymentConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.VirtualMachineConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ImageReferenceArgs;
* import com.pulumi.azurenative.batch.inputs.NetworkConfigurationArgs;
* import com.pulumi.azurenative.batch.inputs.ScaleSettingsArgs;
* import com.pulumi.azurenative.batch.inputs.FixedScaleSettingsArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var pool = new Pool("pool", PoolArgs.builder()
* .accountName("sampleacct")
* .deploymentConfiguration(DeploymentConfigurationArgs.builder()
* .virtualMachineConfiguration(VirtualMachineConfigurationArgs.builder()
* .imageReference(ImageReferenceArgs.builder()
* .offer("WindowsServer")
* .publisher("MicrosoftWindowsServer")
* .sku("2016-datacenter-smalldisk")
* .version("latest")
* .build())
* .nodeAgentSkuId("batch.node.windows amd64")
* .build())
* .build())
* .networkConfiguration(NetworkConfigurationArgs.builder()
* .enableAcceleratedNetworking(true)
* .subnetId("/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123")
* .build())
* .poolName("testpool")
* .resourceGroupName("default-azurebatch-japaneast")
* .scaleSettings(ScaleSettingsArgs.builder()
* .fixedScale(FixedScaleSettingsArgs.builder()
* .targetDedicatedNodes(1)
* .targetLowPriorityNodes(0)
* .build())
* .build())
* .vmSize("STANDARD_D1_V2")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:batch:Pool testpool /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}
* ```
*
*/
@ResourceType(type="azure-native:batch:Pool")
public class Pool extends com.pulumi.resources.CustomResource {
@Export(name="allocationState", refs={String.class}, tree="[0]")
private Output allocationState;
public Output allocationState() {
return this.allocationState;
}
@Export(name="allocationStateTransitionTime", refs={String.class}, tree="[0]")
private Output allocationStateTransitionTime;
public Output allocationStateTransitionTime() {
return this.allocationStateTransitionTime;
}
/**
* The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail.
*
*/
@Export(name="applicationLicenses", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> applicationLicenses;
/**
* @return The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail.
*
*/
public Output>> applicationLicenses() {
return Codegen.optional(this.applicationLicenses);
}
/**
* Changes to application package references affect all new compute 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 application package references on any given pool.
*
*/
@Export(name="applicationPackages", refs={List.class,ApplicationPackageReferenceResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> applicationPackages;
/**
* @return Changes to application package references affect all new compute 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 application package references on any given pool.
*
*/
public Output>> applicationPackages() {
return Codegen.optional(this.applicationPackages);
}
/**
* This property is set only if the pool automatically scales, i.e. autoScaleSettings are used.
*
*/
@Export(name="autoScaleRun", refs={AutoScaleRunResponse.class}, tree="[0]")
private Output autoScaleRun;
/**
* @return This property is set only if the pool automatically scales, i.e. autoScaleSettings are used.
*
*/
public Output autoScaleRun() {
return this.autoScaleRun;
}
/**
* For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory.
*
* Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
*
*/
@Export(name="certificates", refs={List.class,CertificateReferenceResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> certificates;
/**
* @return For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory.
*
* Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.
*
*/
public Output>> certificates() {
return Codegen.optional(this.certificates);
}
@Export(name="creationTime", refs={String.class}, tree="[0]")
private Output creationTime;
public Output creationTime() {
return this.creationTime;
}
@Export(name="currentDedicatedNodes", refs={Integer.class}, tree="[0]")
private Output currentDedicatedNodes;
public Output currentDedicatedNodes() {
return this.currentDedicatedNodes;
}
@Export(name="currentLowPriorityNodes", refs={Integer.class}, tree="[0]")
private Output currentLowPriorityNodes;
public Output currentLowPriorityNodes() {
return this.currentLowPriorityNodes;
}
@Export(name="currentNodeCommunicationMode", refs={String.class}, tree="[0]")
private Output currentNodeCommunicationMode;
public Output currentNodeCommunicationMode() {
return this.currentNodeCommunicationMode;
}
/**
* Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS).
*
*/
@Export(name="deploymentConfiguration", refs={DeploymentConfigurationResponse.class}, tree="[0]")
private Output* @Nullable */ DeploymentConfigurationResponse> deploymentConfiguration;
/**
* @return Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS).
*
*/
public Output> deploymentConfiguration() {
return Codegen.optional(this.deploymentConfiguration);
}
/**
* The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
*
*/
@Export(name="displayName", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> displayName;
/**
* @return The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
*
*/
public Output> displayName() {
return Codegen.optional(this.displayName);
}
/**
* The ETag of the resource, used for concurrency statements.
*
*/
@Export(name="etag", refs={String.class}, tree="[0]")
private Output etag;
/**
* @return The ETag of the resource, used for concurrency statements.
*
*/
public Output etag() {
return this.etag;
}
/**
* The type of identity used for the Batch Pool.
*
*/
@Export(name="identity", refs={BatchPoolIdentityResponse.class}, tree="[0]")
private Output* @Nullable */ BatchPoolIdentityResponse> identity;
/**
* @return The type of identity used for the Batch Pool.
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* 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. If not specified, this value defaults to 'Disabled'.
*
*/
@Export(name="interNodeCommunication", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> interNodeCommunication;
/**
* @return 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. If not specified, this value defaults to 'Disabled'.
*
*/
public Output> interNodeCommunication() {
return Codegen.optional(this.interNodeCommunication);
}
/**
* This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes such as a compute node changing state.
*
*/
@Export(name="lastModified", refs={String.class}, tree="[0]")
private Output lastModified;
/**
* @return This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes such as a compute node changing state.
*
*/
public Output lastModified() {
return this.lastModified;
}
/**
* The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
*
*/
@Export(name="metadata", refs={List.class,MetadataItemResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> metadata;
/**
* @return The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
*
*/
public Output>> metadata() {
return Codegen.optional(this.metadata);
}
/**
* This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.
*
*/
@Export(name="mountConfiguration", refs={List.class,MountConfigurationResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> mountConfiguration;
/**
* @return This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.
*
*/
public Output>> mountConfiguration() {
return Codegen.optional(this.mountConfiguration);
}
/**
* The name of the resource.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource.
*
*/
public Output name() {
return this.name;
}
/**
* The network configuration for a pool.
*
*/
@Export(name="networkConfiguration", refs={NetworkConfigurationResponse.class}, tree="[0]")
private Output* @Nullable */ NetworkConfigurationResponse> networkConfiguration;
/**
* @return The network configuration for a pool.
*
*/
public Output> networkConfiguration() {
return Codegen.optional(this.networkConfiguration);
}
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
public Output provisioningState() {
return this.provisioningState;
}
@Export(name="provisioningStateTransitionTime", refs={String.class}, tree="[0]")
private Output provisioningStateTransitionTime;
public Output provisioningStateTransitionTime() {
return this.provisioningStateTransitionTime;
}
/**
* Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed operation (if the AllocationState is Steady).
*
*/
@Export(name="resizeOperationStatus", refs={ResizeOperationStatusResponse.class}, tree="[0]")
private Output resizeOperationStatus;
/**
* @return Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed operation (if the AllocationState is Steady).
*
*/
public Output resizeOperationStatus() {
return this.resizeOperationStatus;
}
/**
* Defines the desired size of the pool. This can either be 'fixedScale' where the requested targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically reevaluated. If this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes.
*
*/
@Export(name="scaleSettings", refs={ScaleSettingsResponse.class}, tree="[0]")
private Output* @Nullable */ ScaleSettingsResponse> scaleSettings;
/**
* @return Defines the desired size of the pool. This can either be 'fixedScale' where the requested targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically reevaluated. If this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes.
*
*/
public Output> scaleSettings() {
return Codegen.optional(this.scaleSettings);
}
/**
* In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool.
*
*/
@Export(name="startTask", refs={StartTaskResponse.class}, tree="[0]")
private Output* @Nullable */ StartTaskResponse> startTask;
/**
* @return In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool.
*
*/
public Output> startTask() {
return Codegen.optional(this.startTask);
}
/**
* If omitted, the default value is Default.
*
*/
@Export(name="targetNodeCommunicationMode", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> targetNodeCommunicationMode;
/**
* @return If omitted, the default value is Default.
*
*/
public Output> targetNodeCommunicationMode() {
return Codegen.optional(this.targetNodeCommunicationMode);
}
/**
* If not specified, the default is spread.
*
*/
@Export(name="taskSchedulingPolicy", refs={TaskSchedulingPolicyResponse.class}, tree="[0]")
private Output* @Nullable */ TaskSchedulingPolicyResponse> taskSchedulingPolicy;
/**
* @return If not specified, the default is spread.
*
*/
public Output> taskSchedulingPolicy() {
return Codegen.optional(this.taskSchedulingPolicy);
}
/**
* 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.
*
*/
@Export(name="taskSlotsPerNode", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> taskSlotsPerNode;
/**
* @return 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.
*
*/
public Output> taskSlotsPerNode() {
return Codegen.optional(this.taskSlotsPerNode);
}
/**
* The type of the resource.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource.
*
*/
public Output type() {
return this.type;
}
@Export(name="userAccounts", refs={List.class,UserAccountResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> userAccounts;
public Output>> userAccounts() {
return Codegen.optional(this.userAccounts);
}
/**
* For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. 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).
*
*/
@Export(name="vmSize", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> vmSize;
/**
* @return For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. 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).
*
*/
public Output> vmSize() {
return Codegen.optional(this.vmSize);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Pool(java.lang.String name) {
this(name, PoolArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Pool(java.lang.String name, PoolArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public Pool(java.lang.String name, PoolArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:batch:Pool", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Pool(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:batch:Pool", name, null, makeResourceOptions(options, id), false);
}
private static PoolArgs makeArgs(PoolArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? PoolArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:batch/v20170901:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20181201:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20190401:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20190801:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20200301:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20200501:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20200901:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20210101:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20210601:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20220101:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20220601:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20221001:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20230501:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20231101:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20240201:Pool").build()),
Output.of(Alias.builder().type("azure-native:batch/v20240701:Pool").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host 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 options Optional settings to control the behavior of the CustomResource.
*/
public static Pool get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Pool(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy