AccountArgs

data class AccountArgs(val allowedAuthenticationModes: Output<List<String>>? = null, val encryption: Output<AccountEncryptionArgs>? = null, val identity: Output<AccountIdentityArgs>? = null, val keyVaultReference: Output<AccountKeyVaultReferenceArgs>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val networkProfile: Output<AccountNetworkProfileArgs>? = null, val poolAllocationMode: Output<String>? = null, val publicNetworkAccessEnabled: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val storageAccountAuthenticationMode: Output<String>? = null, val storageAccountId: Output<String>? = null, val storageAccountNodeIdentity: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<AccountArgs>

Manages an Azure Batch account.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "testbatch",
location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
name: "teststorage",
resourceGroupName: example.name,
location: example.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleAccount2 = new azure.batch.Account("example", {
name: "testbatchaccount",
resourceGroupName: example.name,
location: example.location,
poolAllocationMode: "BatchService",
storageAccountId: exampleAccount.id,
storageAccountAuthenticationMode: "StorageKeys",
tags: {
env: "test",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="testbatch",
location="West Europe")
example_account = azure.storage.Account("example",
name="teststorage",
resource_group_name=example.name,
location=example.location,
account_tier="Standard",
account_replication_type="LRS")
example_account2 = azure.batch.Account("example",
name="testbatchaccount",
resource_group_name=example.name,
location=example.location,
pool_allocation_mode="BatchService",
storage_account_id=example_account.id,
storage_account_authentication_mode="StorageKeys",
tags={
"env": "test",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "testbatch",
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("example", new()
{
Name = "teststorage",
ResourceGroupName = example.Name,
Location = example.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleAccount2 = new Azure.Batch.Account("example", new()
{
Name = "testbatchaccount",
ResourceGroupName = example.Name,
Location = example.Location,
PoolAllocationMode = "BatchService",
StorageAccountId = exampleAccount.Id,
StorageAccountAuthenticationMode = "StorageKeys",
Tags =
{
{ "env", "test" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("testbatch"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
Name: pulumi.String("teststorage"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
_, err = batch.NewAccount(ctx, "example", &batch.AccountArgs{
Name: pulumi.String("testbatchaccount"),
ResourceGroupName: example.Name,
Location: example.Location,
PoolAllocationMode: pulumi.String("BatchService"),
StorageAccountId: exampleAccount.ID(),
StorageAccountAuthenticationMode: pulumi.String("StorageKeys"),
Tags: pulumi.StringMap{
"env": pulumi.String("test"),
},
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("testbatch")
.location("West Europe")
.build());
var exampleAccount = new com.pulumi.azure.storage.Account("exampleAccount", com.pulumi.azure.storage.AccountArgs.builder()
.name("teststorage")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleAccount2 = new com.pulumi.azure.batch.Account("exampleAccount2", com.pulumi.azure.batch.AccountArgs.builder()
.name("testbatchaccount")
.resourceGroupName(example.name())
.location(example.location())
.poolAllocationMode("BatchService")
.storageAccountId(exampleAccount.id())
.storageAccountAuthenticationMode("StorageKeys")
.tags(Map.of("env", "test"))
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: testbatch
location: West Europe
exampleAccount:
type: azure:storage:Account
name: example
properties:
name: teststorage
resourceGroupName: ${example.name}
location: ${example.location}
accountTier: Standard
accountReplicationType: LRS
exampleAccount2:
type: azure:batch:Account
name: example
properties:
name: testbatchaccount
resourceGroupName: ${example.name}
location: ${example.location}
poolAllocationMode: BatchService
storageAccountId: ${exampleAccount.id}
storageAccountAuthenticationMode: StorageKeys
tags:
env: test

Import

Batch Account can be imported using the resource id, e.g.

$ pulumi import azure:batch/account:Account example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Batch/batchAccounts/account1

Constructors

Link copied to clipboard
constructor(allowedAuthenticationModes: Output<List<String>>? = null, encryption: Output<AccountEncryptionArgs>? = null, identity: Output<AccountIdentityArgs>? = null, keyVaultReference: Output<AccountKeyVaultReferenceArgs>? = null, location: Output<String>? = null, name: Output<String>? = null, networkProfile: Output<AccountNetworkProfileArgs>? = null, poolAllocationMode: Output<String>? = null, publicNetworkAccessEnabled: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, storageAccountAuthenticationMode: Output<String>? = null, storageAccountId: Output<String>? = null, storageAccountNodeIdentity: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

Specifies the allowed authentication mode for the Batch account. Possible values include AAD, SharedKey or TaskAuthenticationToken.

Link copied to clipboard
val encryption: Output<AccountEncryptionArgs>? = null

Specifies if customer managed key encryption should be used to encrypt batch account data. One encryption block as defined below.

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

An identity block as defined below.

Link copied to clipboard

A key_vault_reference block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the UserSubscription pool allocation mode.

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

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

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

Specifies the name of the Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.

Link copied to clipboard

A network_profile block as defined below.

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

Specifies the mode to use for pool allocation. Possible values are BatchService or UserSubscription. Defaults to BatchService.

Link copied to clipboard
val publicNetworkAccessEnabled: Output<Boolean>? = null

Whether public network access is allowed for this server. Defaults to true.

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

The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.

Link copied to clipboard

Specifies the storage account authentication mode. Possible values include StorageKeys, BatchAccountManagedIdentity.

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

Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.

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

Specifies the user assigned identity for the storage account.

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

A mapping of tags to assign to the resource.

Functions

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