Azure Classic v5.43.0, May 6 23
Azure Classic v5.43.0, May 6 23
azure.batch.getAccount
Explore with Pulumi AI
Use this data source to access information about an existing Batch Account.
Example Usage
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 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 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()));
}
}
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
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.