Azure Classic
getAccount
Use this data source to access information about an existing Batch Account.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Batch.GetAccount.InvokeAsync(new Azure.Batch.GetAccountArgs
{
Name = "testbatchaccount",
ResourceGroupName = "test",
}));
this.PoolAllocationMode = example.Apply(example => example.PoolAllocationMode);
}
[Output("poolAllocationMode")]
public Output<string> PoolAllocationMode { get; set; }
}
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
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Output.of(BatchFunctions.getAccount(GetAccountArgs.builder()
.name("testbatchaccount")
.resourceGroupName("test")
.build()));
ctx.export("poolAllocationMode", example.apply(getAccountResult -> getAccountResult.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)
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);
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(encryption: Optional[GetAccountEncryption] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccountResult
def get_account_output(encryption: Optional[pulumi.Input[GetAccountEncryptionArgs]] = None,
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.
- Resource
Group stringName The Name of the Resource Group where this Batch account exists.
- Encryption
Get
Account Encryption
- Name string
The name of the Batch account.
- Resource
Group stringName The Name of the Resource Group where this Batch account exists.
- Encryption
Get
Account Encryption
- name String
The name of the Batch account.
- resource
Group StringName The Name of the Resource Group where this Batch account exists.
- encryption
Get
Account Encryption
- name string
The name of the Batch account.
- resource
Group stringName The Name of the Resource Group where this Batch account exists.
- encryption
Get
Account Encryption
- name str
The name of the Batch account.
- resource_
group_ strname The Name of the Resource Group where this Batch account exists.
- encryption
Get
Account Encryption
- name String
The name of the Batch account.
- resource
Group StringName The Name of the Resource Group where this Batch account exists.
- encryption Property Map
getAccount Result
The following output properties are available:
- Account
Endpoint string The account endpoint used to interact with the Batch service.
- Id string
The provider-assigned unique ID for this managed resource.
- Key
Vault List<GetReferences Account Key Vault Reference> The
key_vault_reference
block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscription
pool allocation mode.- Location string
The Azure Region in which this Batch account exists.
- Name string
The Batch account name.
- Pool
Allocation stringMode The pool allocation mode configured for this Batch account.
- Primary
Access stringKey The Batch account primary access key.
- Resource
Group stringName - Secondary
Access stringKey The Batch account secondary access key.
- Storage
Account stringId The ID of the Storage Account used for this Batch account.
- Dictionary<string, string>
A map of tags assigned to the Batch account.
- Encryption
Get
Account Encryption
- Account
Endpoint string The account endpoint used to interact with the Batch service.
- Id string
The provider-assigned unique ID for this managed resource.
- Key
Vault []GetReferences Account Key Vault Reference The
key_vault_reference
block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscription
pool allocation mode.- Location string
The Azure Region in which this Batch account exists.
- Name string
The Batch account name.
- Pool
Allocation stringMode The pool allocation mode configured for this Batch account.
- Primary
Access stringKey The Batch account primary access key.
- Resource
Group stringName - Secondary
Access stringKey The Batch account secondary access key.
- Storage
Account stringId The ID of the Storage Account used for this Batch account.
- map[string]string
A map of tags assigned to the Batch account.
- Encryption
Get
Account Encryption
- account
Endpoint String The account endpoint used to interact with the Batch service.
- id String
The provider-assigned unique ID for this managed resource.
- key
Vault List<GetReferences Account Key Vault Reference> The
key_vault_reference
block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscription
pool allocation mode.- location String
The Azure Region in which this Batch account exists.
- name String
The Batch account name.
- pool
Allocation StringMode The pool allocation mode configured for this Batch account.
- primary
Access StringKey The Batch account primary access key.
- resource
Group StringName - secondary
Access StringKey The Batch account secondary access key.
- storage
Account StringId The ID of the Storage Account used for this Batch account.
- Map<String,String>
A map of tags assigned to the Batch account.
- encryption
Get
Account Encryption
- account
Endpoint string The account endpoint used to interact with the Batch service.
- id string
The provider-assigned unique ID for this managed resource.
- key
Vault GetReferences Account Key Vault Reference[] The
key_vault_reference
block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscription
pool allocation mode.- location string
The Azure Region in which this Batch account exists.
- name string
The Batch account name.
- pool
Allocation stringMode The pool allocation mode configured for this Batch account.
- primary
Access stringKey The Batch account primary access key.
- resource
Group stringName - secondary
Access stringKey The Batch account secondary access key.
- storage
Account stringId The ID of the Storage Account used for this Batch account.
- {[key: string]: string}
A map of tags assigned to the Batch account.
- encryption
Get
Account Encryption
- account_
endpoint str The account endpoint used to interact with the Batch service.
- id str
The provider-assigned unique ID for this managed resource.
- key_
vault_ Sequence[Getreferences Account Key Vault Reference] The
key_vault_reference
block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscription
pool 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.
- encryption
Get
Account Encryption
- account
Endpoint String The account endpoint used to interact with the Batch service.
- id String
The provider-assigned unique ID for this managed resource.
- key
Vault List<Property Map>References The
key_vault_reference
block that describes the Azure KeyVault reference to use when deploying the Azure Batch account using theUserSubscription
pool allocation mode.- location String
The Azure Region in which this Batch account exists.
- name String
The Batch account name.
- pool
Allocation StringMode The pool allocation mode configured for this Batch account.
- primary
Access StringKey The Batch account primary access key.
- resource
Group StringName - secondary
Access StringKey The Batch account secondary access key.
- storage
Account StringId The ID of the Storage Account used for this Batch account.
- Map<String>
A map of tags assigned to the Batch account.
- encryption Property Map
Supporting Types
GetAccountEncryption
- Key
Vault stringKey Id
- Key
Vault stringKey Id
- key
Vault StringKey Id
- key
Vault stringKey Id
- key_
vault_ strkey_ id
- key
Vault StringKey Id
GetAccountKeyVaultReference
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.