BatchAccountArgs

data class BatchAccountArgs(val accountName: Output<String>? = null, val allowedAuthenticationModes: Output<List<AuthenticationMode>>? = null, val autoStorage: Output<AutoStorageBasePropertiesArgs>? = null, val encryption: Output<EncryptionPropertiesArgs>? = null, val identity: Output<BatchAccountIdentityArgs>? = null, val keyVaultReference: Output<KeyVaultReferenceArgs>? = null, val location: Output<String>? = null, val networkProfile: Output<NetworkProfileArgs>? = null, val poolAllocationMode: Output<PoolAllocationMode>? = null, val publicNetworkAccess: Output<PublicNetworkAccessType>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<BatchAccountArgs>

Contains information about an Azure Batch account. Uses Azure REST API version 2024-07-01. In version 2.x of the Azure Native provider, it used API version 2023-05-01. Other available API versions: 2023-05-01, 2023-11-01, 2024-02-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native batch [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

BatchAccountCreate_BYOS

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var batchAccount = new AzureNative.Batch.BatchAccount("batchAccount", new()
{
AccountName = "sampleacct",
AutoStorage = new AzureNative.Batch.Inputs.AutoStorageBasePropertiesArgs
{
StorageAccountId = "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
KeyVaultReference = new AzureNative.Batch.Inputs.KeyVaultReferenceArgs
{
Id = "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
Url = "http://sample.vault.azure.net/",
},
Location = "japaneast",
PoolAllocationMode = AzureNative.Batch.PoolAllocationMode.UserSubscription,
ResourceGroupName = "default-azurebatch-japaneast",
});
});
package main
import (
batch "github.com/pulumi/pulumi-azure-native-sdk/batch/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := batch.NewBatchAccount(ctx, "batchAccount", &batch.BatchAccountArgs{
AccountName: pulumi.String("sampleacct"),
AutoStorage: &batch.AutoStorageBasePropertiesArgs{
StorageAccountId: pulumi.String("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
KeyVaultReference: &batch.KeyVaultReferenceArgs{
Id: pulumi.String("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"),
Url: pulumi.String("http://sample.vault.azure.net/"),
},
Location: pulumi.String("japaneast"),
PoolAllocationMode: batch.PoolAllocationModeUserSubscription,
ResourceGroupName: pulumi.String("default-azurebatch-japaneast"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.batch.BatchAccount;
import com.pulumi.azurenative.batch.BatchAccountArgs;
import com.pulumi.azurenative.batch.inputs.AutoStorageBasePropertiesArgs;
import com.pulumi.azurenative.batch.inputs.KeyVaultReferenceArgs;
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 batchAccount = new BatchAccount("batchAccount", BatchAccountArgs.builder()
.accountName("sampleacct")
.autoStorage(AutoStorageBasePropertiesArgs.builder()
.storageAccountId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")
.build())
.keyVaultReference(KeyVaultReferenceArgs.builder()
.id("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample")
.url("http://sample.vault.azure.net/")
.build())
.location("japaneast")
.poolAllocationMode("UserSubscription")
.resourceGroupName("default-azurebatch-japaneast")
.build());
}
}

BatchAccountCreate_Default

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var batchAccount = new AzureNative.Batch.BatchAccount("batchAccount", new()
{
AccountName = "sampleacct",
AutoStorage = new AzureNative.Batch.Inputs.AutoStorageBasePropertiesArgs
{
StorageAccountId = "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
Location = "japaneast",
ResourceGroupName = "default-azurebatch-japaneast",
});
});
package main
import (
batch "github.com/pulumi/pulumi-azure-native-sdk/batch/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := batch.NewBatchAccount(ctx, "batchAccount", &batch.BatchAccountArgs{
AccountName: pulumi.String("sampleacct"),
AutoStorage: &batch.AutoStorageBasePropertiesArgs{
StorageAccountId: pulumi.String("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
Location: pulumi.String("japaneast"),
ResourceGroupName: pulumi.String("default-azurebatch-japaneast"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.batch.BatchAccount;
import com.pulumi.azurenative.batch.BatchAccountArgs;
import com.pulumi.azurenative.batch.inputs.AutoStorageBasePropertiesArgs;
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 batchAccount = new BatchAccount("batchAccount", BatchAccountArgs.builder()
.accountName("sampleacct")
.autoStorage(AutoStorageBasePropertiesArgs.builder()
.storageAccountId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")
.build())
.location("japaneast")
.resourceGroupName("default-azurebatch-japaneast")
.build());
}
}

BatchAccountCreate_SystemAssignedIdentity

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var batchAccount = new AzureNative.Batch.BatchAccount("batchAccount", new()
{
AccountName = "sampleacct",
AutoStorage = new AzureNative.Batch.Inputs.AutoStorageBasePropertiesArgs
{
StorageAccountId = "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
Identity = new AzureNative.Batch.Inputs.BatchAccountIdentityArgs
{
Type = AzureNative.Batch.ResourceIdentityType.SystemAssigned,
},
Location = "japaneast",
ResourceGroupName = "default-azurebatch-japaneast",
});
});
package main
import (
batch "github.com/pulumi/pulumi-azure-native-sdk/batch/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := batch.NewBatchAccount(ctx, "batchAccount", &batch.BatchAccountArgs{
AccountName: pulumi.String("sampleacct"),
AutoStorage: &batch.AutoStorageBasePropertiesArgs{
StorageAccountId: pulumi.String("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
Identity: &batch.BatchAccountIdentityArgs{
Type: batch.ResourceIdentityTypeSystemAssigned,
},
Location: pulumi.String("japaneast"),
ResourceGroupName: pulumi.String("default-azurebatch-japaneast"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.batch.BatchAccount;
import com.pulumi.azurenative.batch.BatchAccountArgs;
import com.pulumi.azurenative.batch.inputs.AutoStorageBasePropertiesArgs;
import com.pulumi.azurenative.batch.inputs.BatchAccountIdentityArgs;
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 batchAccount = new BatchAccount("batchAccount", BatchAccountArgs.builder()
.accountName("sampleacct")
.autoStorage(AutoStorageBasePropertiesArgs.builder()
.storageAccountId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")
.build())
.identity(BatchAccountIdentityArgs.builder()
.type("SystemAssigned")
.build())
.location("japaneast")
.resourceGroupName("default-azurebatch-japaneast")
.build());
}
}

PrivateBatchAccountCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var batchAccount = new AzureNative.Batch.BatchAccount("batchAccount", new()
{
AccountName = "sampleacct",
AutoStorage = new AzureNative.Batch.Inputs.AutoStorageBasePropertiesArgs
{
StorageAccountId = "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
KeyVaultReference = new AzureNative.Batch.Inputs.KeyVaultReferenceArgs
{
Id = "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
Url = "http://sample.vault.azure.net/",
},
Location = "japaneast",
PublicNetworkAccess = AzureNative.Batch.PublicNetworkAccessType.Disabled,
ResourceGroupName = "default-azurebatch-japaneast",
});
});
package main
import (
batch "github.com/pulumi/pulumi-azure-native-sdk/batch/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := batch.NewBatchAccount(ctx, "batchAccount", &batch.BatchAccountArgs{
AccountName: pulumi.String("sampleacct"),
AutoStorage: &batch.AutoStorageBasePropertiesArgs{
StorageAccountId: pulumi.String("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
KeyVaultReference: &batch.KeyVaultReferenceArgs{
Id: pulumi.String("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"),
Url: pulumi.String("http://sample.vault.azure.net/"),
},
Location: pulumi.String("japaneast"),
PublicNetworkAccess: batch.PublicNetworkAccessTypeDisabled,
ResourceGroupName: pulumi.String("default-azurebatch-japaneast"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.batch.BatchAccount;
import com.pulumi.azurenative.batch.BatchAccountArgs;
import com.pulumi.azurenative.batch.inputs.AutoStorageBasePropertiesArgs;
import com.pulumi.azurenative.batch.inputs.KeyVaultReferenceArgs;
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 batchAccount = new BatchAccount("batchAccount", BatchAccountArgs.builder()
.accountName("sampleacct")
.autoStorage(AutoStorageBasePropertiesArgs.builder()
.storageAccountId("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")
.build())
.keyVaultReference(KeyVaultReferenceArgs.builder()
.id("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample")
.url("http://sample.vault.azure.net/")
.build())
.location("japaneast")
.publicNetworkAccess("Disabled")
.resourceGroupName("default-azurebatch-japaneast")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:batch:BatchAccount sampleacct /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}

Constructors

Link copied to clipboard
constructor(accountName: Output<String>? = null, allowedAuthenticationModes: Output<List<AuthenticationMode>>? = null, autoStorage: Output<AutoStorageBasePropertiesArgs>? = null, encryption: Output<EncryptionPropertiesArgs>? = null, identity: Output<BatchAccountIdentityArgs>? = null, keyVaultReference: Output<KeyVaultReferenceArgs>? = null, location: Output<String>? = null, networkProfile: Output<NetworkProfileArgs>? = null, poolAllocationMode: Output<PoolAllocationMode>? = null, publicNetworkAccess: Output<PublicNetworkAccessType>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val accountName: Output<String>? = null

A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.

Link copied to clipboard

List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. This does not affect authentication with the control plane.

Link copied to clipboard

The properties related to the auto-storage account.

Link copied to clipboard

Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.

Link copied to clipboard
val identity: Output<BatchAccountIdentityArgs>? = null

The identity of the Batch account.

Link copied to clipboard

A reference to the Azure key vault associated with the Batch account.

Link copied to clipboard
val location: Output<String>? = null

The region in which to create the account.

Link copied to clipboard
val networkProfile: Output<NetworkProfileArgs>? = null

The network profile only takes effect when publicNetworkAccess is enabled.

Link copied to clipboard

The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is BatchService, clients may authenticate using access keys or Microsoft Entra ID. If the mode is UserSubscription, clients must use Microsoft Entra ID. The default is BatchService.

Link copied to clipboard

If not specified, the default value is 'enabled'.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group that contains the Batch account.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

The user-specified tags associated with the account.

Functions

Link copied to clipboard
open override fun toJava(): BatchAccountArgs