Batch Account
Contains information about an Azure Batch account. Uses Azure REST API version 2023-05-01. In version 1.x of the Azure Native provider, it used API version 2021-01-01. Other available API versions: 2022-01-01, 2023-11-01, 2024-02-01, 2024-07-01.
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/v2"
"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/v2"
"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/v2"
"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/v2"
"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}
Properties
The account endpoint used to interact with the Batch service.
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.
Contains information about the auto-storage account associated with a Batch account.
For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned.
A list of the dedicated core quota per Virtual Machine family for the Batch account. For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned.
If this flag is true, dedicated core quota is enforced via both the dedicatedCoreQuotaPerVMFamily and dedicatedCoreQuota properties on the account. If this flag is false, dedicated core quota is enforced only via the dedicatedCoreQuota property on the account and does not consider Virtual Machine family.
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.
The identity of the Batch account.
Identifies the Azure key vault associated with a Batch account.
For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned.
The network profile only takes effect when publicNetworkAccess is enabled.
The endpoint used by compute node to connect to the Batch node management service.
The allocation mode for creating pools in the Batch account.
List of private endpoint connections associated with the Batch account
The provisioned state of the resource
If not specified, the default value is 'enabled'.