1. Packages
  2. Azure Classic
  3. API Docs
  4. batch
  5. getAccount

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.batch.getAccount

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    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/v5/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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:batch/getAccount:getAccount
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Batch account.
    ResourceGroupName string
    The Name of the Resource Group where this Batch account exists.
    Name string
    The name of the Batch account.
    ResourceGroupName string
    The Name of the Resource Group where this Batch account exists.
    name String
    The name of the Batch account.
    resourceGroupName String
    The Name of the Resource Group where this Batch account exists.
    name string
    The name of the Batch account.
    resourceGroupName string
    The Name of the Resource Group where this Batch account exists.
    name str
    The name of the Batch account.
    resource_group_name str
    The Name of the Resource Group where this Batch account exists.
    name String
    The name of the Batch account.
    resourceGroupName String
    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.
    Encryption GetAccountEncryption
    The encryption block 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.
    KeyVaultReferences List<GetAccountKeyVaultReference>
    The key_vault_reference block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the UserSubscription pool allocation mode.
    Location string
    The Azure Region in which this Batch account exists.
    Name string
    The Batch account name.
    PoolAllocationMode string
    The pool allocation mode configured for this Batch account.
    PrimaryAccessKey string
    The Batch account primary access key.
    ResourceGroupName string
    SecondaryAccessKey string
    The Batch account secondary access key.
    StorageAccountId string
    The ID of the Storage Account used for this Batch account.
    Tags Dictionary<string, string>
    A map of tags assigned to the Batch account.
    AccountEndpoint string
    The account endpoint used to interact with the Batch service.
    Encryption GetAccountEncryption
    The encryption block 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.
    KeyVaultReferences []GetAccountKeyVaultReference
    The key_vault_reference block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the UserSubscription pool allocation mode.
    Location string
    The Azure Region in which this Batch account exists.
    Name string
    The Batch account name.
    PoolAllocationMode string
    The pool allocation mode configured for this Batch account.
    PrimaryAccessKey string
    The Batch account primary access key.
    ResourceGroupName string
    SecondaryAccessKey string
    The Batch account secondary access key.
    StorageAccountId string
    The ID of the Storage Account used for this Batch account.
    Tags map[string]string
    A map of tags assigned to the Batch account.
    accountEndpoint String
    The account endpoint used to interact with the Batch service.
    encryption GetAccountEncryption
    The encryption block 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.
    keyVaultReferences List<GetAccountKeyVaultReference>
    The key_vault_reference block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the UserSubscription pool allocation mode.
    location String
    The Azure Region in which this Batch account exists.
    name String
    The Batch account name.
    poolAllocationMode String
    The pool allocation mode configured for this Batch account.
    primaryAccessKey String
    The Batch account primary access key.
    resourceGroupName String
    secondaryAccessKey String
    The Batch account secondary access key.
    storageAccountId String
    The ID of the Storage Account used for this Batch account.
    tags Map<String,String>
    A map of tags assigned to the Batch account.
    accountEndpoint string
    The account endpoint used to interact with the Batch service.
    encryption GetAccountEncryption
    The encryption block 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.
    keyVaultReferences GetAccountKeyVaultReference[]
    The key_vault_reference block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the UserSubscription pool allocation mode.
    location string
    The Azure Region in which this Batch account exists.
    name string
    The Batch account name.
    poolAllocationMode string
    The pool allocation mode configured for this Batch account.
    primaryAccessKey string
    The Batch account primary access key.
    resourceGroupName string
    secondaryAccessKey string
    The Batch account secondary access key.
    storageAccountId string
    The ID of the Storage Account used for this Batch account.
    tags {[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.
    encryption GetAccountEncryption
    The encryption block 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_references Sequence[GetAccountKeyVaultReference]
    The key_vault_reference block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the UserSubscription pool allocation mode.
    location str
    The Azure Region in which this Batch account exists.
    name str
    The Batch account name.
    pool_allocation_mode str
    The pool allocation mode configured for this Batch account.
    primary_access_key str
    The Batch account primary access key.
    resource_group_name str
    secondary_access_key str
    The Batch account secondary access key.
    storage_account_id str
    The ID of the Storage Account used for this Batch account.
    tags Mapping[str, str]
    A map of tags assigned to the Batch account.
    accountEndpoint String
    The account endpoint used to interact with the Batch service.
    encryption Property Map
    The encryption block 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.
    keyVaultReferences List<Property Map>
    The key_vault_reference block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the UserSubscription pool allocation mode.
    location String
    The Azure Region in which this Batch account exists.
    name String
    The Batch account name.
    poolAllocationMode String
    The pool allocation mode configured for this Batch account.
    primaryAccessKey String
    The Batch account primary access key.
    resourceGroupName String
    secondaryAccessKey String
    The Batch account secondary access key.
    storageAccountId String
    The ID of the Storage Account used for this Batch account.
    tags Map<String>
    A map of tags assigned to the Batch account.

    Supporting Types

    GetAccountEncryption

    KeyVaultKeyId string
    The full URL path of the Key Vault Key used to encrypt data for this Batch account.
    KeyVaultKeyId string
    The full URL path of the Key Vault Key used to encrypt data for this Batch account.
    keyVaultKeyId String
    The full URL path of the Key Vault Key used to encrypt data for this Batch account.
    keyVaultKeyId string
    The full URL path of the Key Vault Key used to encrypt data for this Batch account.
    key_vault_key_id str
    The full URL path of the Key Vault Key used to encrypt data for this Batch account.
    keyVaultKeyId String
    The full URL path of the Key Vault Key used to encrypt data for this Batch account.

    GetAccountKeyVaultReference

    Id string
    The Azure identifier of the Azure KeyVault reference.
    Url string
    The HTTPS URL of the Azure KeyVault reference.
    Id string
    The Azure identifier of the Azure KeyVault reference.
    Url string
    The HTTPS URL of the Azure KeyVault reference.
    id String
    The Azure identifier of the Azure KeyVault reference.
    url String
    The HTTPS URL of the Azure KeyVault reference.
    id string
    The Azure identifier of the Azure KeyVault reference.
    url string
    The HTTPS URL of the Azure KeyVault reference.
    id str
    The Azure identifier of the Azure KeyVault reference.
    url str
    The HTTPS URL of the Azure KeyVault reference.
    id String
    The Azure identifier of the Azure KeyVault reference.
    url String
    The HTTPS URL of the Azure KeyVault reference.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi