We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.batch.getAccount
Explore with Pulumi AI
Use this data source to access information about an existing Batch Account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.batch.getAccount({
    name: "testbatchaccount",
    resourceGroupName: "test",
});
export const poolAllocationMode = example.then(example => example.poolAllocationMode);
import pulumi
import pulumi_azure as azure
example = azure.batch.get_account(name="testbatchaccount",
    resource_group_name="test")
pulumi.export("poolAllocationMode", example.pool_allocation_mode)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := batch.LookupAccount(ctx, &batch.LookupAccountArgs{
			Name:              "testbatchaccount",
			ResourceGroupName: "test",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("poolAllocationMode", example.PoolAllocationMode)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.Batch.GetAccount.Invoke(new()
    {
        Name = "testbatchaccount",
        ResourceGroupName = "test",
    });
    return new Dictionary<string, object?>
    {
        ["poolAllocationMode"] = example.Apply(getAccountResult => getAccountResult.PoolAllocationMode),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.batch.BatchFunctions;
import com.pulumi.azure.batch.inputs.GetAccountArgs;
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) {
        final var example = BatchFunctions.getAccount(GetAccountArgs.builder()
            .name("testbatchaccount")
            .resourceGroupName("test")
            .build());
        ctx.export("poolAllocationMode", example.applyValue(getAccountResult -> getAccountResult.poolAllocationMode()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:batch:getAccount
      arguments:
        name: testbatchaccount
        resourceGroupName: test
outputs:
  poolAllocationMode: ${example.poolAllocationMode}
Using getAccount
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAccount(args: GetAccountArgs, opts?: InvokeOptions): Promise<GetAccountResult>
function getAccountOutput(args: GetAccountOutputArgs, opts?: InvokeOptions): Output<GetAccountResult>def get_account(name: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetAccountResult
def get_account_output(name: Optional[pulumi.Input[str]] = None,
                resource_group_name: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetAccountResult]func LookupAccount(ctx *Context, args *LookupAccountArgs, opts ...InvokeOption) (*LookupAccountResult, error)
func LookupAccountOutput(ctx *Context, args *LookupAccountOutputArgs, opts ...InvokeOption) LookupAccountResultOutput> Note: This function is named LookupAccount in the Go SDK.
public static class GetAccount 
{
    public static Task<GetAccountResult> InvokeAsync(GetAccountArgs args, InvokeOptions? opts = null)
    public static Output<GetAccountResult> Invoke(GetAccountInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
public static Output<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
fn::invoke:
  function: azure:batch/getAccount:getAccount
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Batch account.
- ResourceGroup stringName 
- The Name of the Resource Group where this Batch account exists.
- Name string
- The name of the Batch account.
- ResourceGroup stringName 
- The Name of the Resource Group where this Batch account exists.
- name String
- The name of the Batch account.
- resourceGroup StringName 
- The Name of the Resource Group where this Batch account exists.
- name string
- The name of the Batch account.
- resourceGroup stringName 
- The Name of the Resource Group where this Batch account exists.
- name str
- The name of the Batch account.
- resource_group_ strname 
- The Name of the Resource Group where this Batch account exists.
- name String
- The name of the Batch account.
- resourceGroup StringName 
- The Name of the Resource Group where this Batch account exists.
getAccount Result
The following output properties are available:
- AccountEndpoint string
- The account endpoint used to interact with the Batch service.
- Encryptions
List<GetAccount Encryption> 
- The encryptionblock that describes the Azure KeyVault key reference used to encrypt data for the Azure Batch account.
- Id string
- The provider-assigned unique ID for this managed resource.
- KeyVault List<GetReferences Account Key Vault Reference> 
- The key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.
- Location string
- The Azure Region in which this Batch account exists.
- Name string
- The Batch account name.
- PoolAllocation stringMode 
- The pool allocation mode configured for this Batch account.
- PrimaryAccess stringKey 
- The Batch account primary access key.
- ResourceGroup stringName 
- SecondaryAccess stringKey 
- The Batch account secondary access key.
- StorageAccount stringId 
- The ID of the Storage Account used for this Batch account.
- Dictionary<string, string>
- A map of tags assigned to the Batch account.
- AccountEndpoint string
- The account endpoint used to interact with the Batch service.
- Encryptions
[]GetAccount Encryption 
- The encryptionblock that describes the Azure KeyVault key reference used to encrypt data for the Azure Batch account.
- Id string
- The provider-assigned unique ID for this managed resource.
- KeyVault []GetReferences Account Key Vault Reference 
- The key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.
- Location string
- The Azure Region in which this Batch account exists.
- Name string
- The Batch account name.
- PoolAllocation stringMode 
- The pool allocation mode configured for this Batch account.
- PrimaryAccess stringKey 
- The Batch account primary access key.
- ResourceGroup stringName 
- SecondaryAccess stringKey 
- The Batch account secondary access key.
- StorageAccount stringId 
- The ID of the Storage Account used for this Batch account.
- map[string]string
- A map of tags assigned to the Batch account.
- accountEndpoint String
- The account endpoint used to interact with the Batch service.
- encryptions
List<GetAccount Encryption> 
- The encryptionblock that describes the Azure KeyVault key reference used to encrypt data for the Azure Batch account.
- id String
- The provider-assigned unique ID for this managed resource.
- keyVault List<GetReferences Account Key Vault Reference> 
- The key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.
- location String
- The Azure Region in which this Batch account exists.
- name String
- The Batch account name.
- poolAllocation StringMode 
- The pool allocation mode configured for this Batch account.
- primaryAccess StringKey 
- The Batch account primary access key.
- resourceGroup StringName 
- secondaryAccess StringKey 
- The Batch account secondary access key.
- storageAccount StringId 
- The ID of the Storage Account used for this Batch account.
- Map<String,String>
- A map of tags assigned to the Batch account.
- accountEndpoint string
- The account endpoint used to interact with the Batch service.
- encryptions
GetAccount Encryption[] 
- The encryptionblock that describes the Azure KeyVault key reference used to encrypt data for the Azure Batch account.
- id string
- The provider-assigned unique ID for this managed resource.
- keyVault GetReferences Account Key Vault Reference[] 
- The key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.
- location string
- The Azure Region in which this Batch account exists.
- name string
- The Batch account name.
- poolAllocation stringMode 
- The pool allocation mode configured for this Batch account.
- primaryAccess stringKey 
- The Batch account primary access key.
- resourceGroup stringName 
- secondaryAccess stringKey 
- The Batch account secondary access key.
- storageAccount stringId 
- The ID of the Storage Account used for this Batch account.
- {[key: string]: string}
- A map of tags assigned to the Batch account.
- account_endpoint str
- The account endpoint used to interact with the Batch service.
- encryptions
Sequence[GetAccount Encryption] 
- The encryptionblock that describes the Azure KeyVault key reference used to encrypt data for the Azure Batch account.
- id str
- The provider-assigned unique ID for this managed resource.
- key_vault_ Sequence[Getreferences Account Key Vault Reference] 
- The key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.
- location str
- The Azure Region in which this Batch account exists.
- name str
- The Batch account name.
- pool_allocation_ strmode 
- The pool allocation mode configured for this Batch account.
- primary_access_ strkey 
- The Batch account primary access key.
- resource_group_ strname 
- secondary_access_ strkey 
- The Batch account secondary access key.
- storage_account_ strid 
- The ID of the Storage Account used for this Batch account.
- Mapping[str, str]
- A map of tags assigned to the Batch account.
- accountEndpoint String
- The account endpoint used to interact with the Batch service.
- encryptions List<Property Map>
- The encryptionblock that describes the Azure KeyVault key reference used to encrypt data for the Azure Batch account.
- id String
- The provider-assigned unique ID for this managed resource.
- keyVault List<Property Map>References 
- The key_vault_referenceblock that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscriptionpool allocation mode.
- location String
- The Azure Region in which this Batch account exists.
- name String
- The Batch account name.
- poolAllocation StringMode 
- The pool allocation mode configured for this Batch account.
- primaryAccess StringKey 
- The Batch account primary access key.
- resourceGroup StringName 
- secondaryAccess StringKey 
- The Batch account secondary access key.
- storageAccount StringId 
- The ID of the Storage Account used for this Batch account.
- Map<String>
- A map of tags assigned to the Batch account.
Supporting Types
GetAccountEncryption  
- KeyVault stringKey Id 
- The full URL path of the Key Vault Key used to encrypt data for this Batch account.
- KeyVault stringKey Id 
- The full URL path of the Key Vault Key used to encrypt data for this Batch account.
- keyVault StringKey Id 
- The full URL path of the Key Vault Key used to encrypt data for this Batch account.
- keyVault stringKey Id 
- The full URL path of the Key Vault Key used to encrypt data for this Batch account.
- key_vault_ strkey_ id 
- The full URL path of the Key Vault Key used to encrypt data for this Batch account.
- keyVault StringKey Id 
- The full URL path of the Key Vault Key used to encrypt data for this Batch account.
GetAccountKeyVaultReference    
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.