import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an Azure Batch account. * * ## Example Usage * * ```typescript * 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", * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Batch` - 2024-07-01 * * ## Import * * Batch Account can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:batch/account:Account example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Batch/batchAccounts/account1 * ``` */ export declare class Account extends pulumi.CustomResource { /** * Get an existing Account 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?: AccountState, opts?: pulumi.CustomResourceOptions): Account; /** * Returns true if the given object is an instance of Account. 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 Account; /** * The account endpoint used to interact with the Batch service. */ readonly accountEndpoint: pulumi.Output; /** * Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`. */ readonly allowedAuthenticationModes: pulumi.Output; /** * Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below. */ readonly encryption: pulumi.Output; /** * An `identity` block as defined below. */ readonly identity: pulumi.Output; /** * A `keyVaultReference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode. */ readonly keyVaultReference: pulumi.Output; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * Specifies the name of the Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * A `networkProfile` block as defined below. */ readonly networkProfile: pulumi.Output; /** * Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`. */ readonly poolAllocationMode: pulumi.Output; /** * The Batch account primary access key. */ readonly primaryAccessKey: pulumi.Output; /** * Whether public network access is allowed for this server. Defaults to `true`. * * > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `keyVaultReference` below. * * > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode). */ readonly publicNetworkAccessEnabled: pulumi.Output; /** * The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created. * * > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct. */ readonly resourceGroupName: pulumi.Output; /** * The Batch account secondary access key. */ readonly secondaryAccessKey: pulumi.Output; /** * Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`. * * > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`. */ readonly storageAccountAuthenticationMode: pulumi.Output; /** * Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage. * * > **NOTE:** When using `storageAccountId`, the `storageAccountAuthenticationMode` must be specified as well. */ readonly storageAccountId: pulumi.Output; /** * Specifies the user assigned identity for the storage account. */ readonly storageAccountNodeIdentity: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a Account 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: AccountArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Account resources. */ export interface AccountState { /** * The account endpoint used to interact with the Batch service. */ accountEndpoint?: pulumi.Input; /** * Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`. */ allowedAuthenticationModes?: pulumi.Input[]>; /** * Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below. */ encryption?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * A `keyVaultReference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode. */ keyVaultReference?: pulumi.Input; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A `networkProfile` block as defined below. */ networkProfile?: pulumi.Input; /** * Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`. */ poolAllocationMode?: pulumi.Input; /** * The Batch account primary access key. */ primaryAccessKey?: pulumi.Input; /** * Whether public network access is allowed for this server. Defaults to `true`. * * > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `keyVaultReference` below. * * > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode). */ publicNetworkAccessEnabled?: pulumi.Input; /** * The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created. * * > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct. */ resourceGroupName?: pulumi.Input; /** * The Batch account secondary access key. */ secondaryAccessKey?: pulumi.Input; /** * Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`. * * > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`. */ storageAccountAuthenticationMode?: pulumi.Input; /** * Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage. * * > **NOTE:** When using `storageAccountId`, the `storageAccountAuthenticationMode` must be specified as well. */ storageAccountId?: pulumi.Input; /** * Specifies the user assigned identity for the storage account. */ storageAccountNodeIdentity?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; } /** * The set of arguments for constructing a Account resource. */ export interface AccountArgs { /** * Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`. */ allowedAuthenticationModes?: pulumi.Input[]>; /** * Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below. */ encryption?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * A `keyVaultReference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode. */ keyVaultReference?: pulumi.Input; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * A `networkProfile` block as defined below. */ networkProfile?: pulumi.Input; /** * Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`. */ poolAllocationMode?: pulumi.Input; /** * Whether public network access is allowed for this server. Defaults to `true`. * * > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `keyVaultReference` below. * * > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode). */ publicNetworkAccessEnabled?: pulumi.Input; /** * The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created. * * > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct. */ resourceGroupName: pulumi.Input; /** * Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`. * * > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`. */ storageAccountAuthenticationMode?: pulumi.Input; /** * Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage. * * > **NOTE:** When using `storageAccountId`, the `storageAccountAuthenticationMode` must be specified as well. */ storageAccountId?: pulumi.Input; /** * Specifies the user assigned identity for the storage account. */ storageAccountNodeIdentity?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }