getAccount

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)
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/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
})
}
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.poolAllocationMode());
}
}
variables:
example:
fn::invoke:
function: azure:batch:getAccount
arguments:
name: testbatchaccount
resourceGroupName: test
outputs:
poolAllocationMode: ${example.poolAllocationMode}

API Providers

This data source uses the following Azure API Providers:

  • Microsoft.Batch: 2024-07-01

Return

A collection of values returned by getAccount.

Parameters

argument

A collection of arguments for invoking getAccount.


suspend fun getAccount(name: String, resourceGroupName: String): GetAccountResult

Return

A collection of values returned by getAccount.

Parameters

name

The name of the Batch account.

resourceGroupName

The Name of the Resource Group where this Batch account exists.

See also


suspend fun getAccount(argument: suspend GetAccountPlainArgsBuilder.() -> Unit): GetAccountResult

Return

A collection of values returned by getAccount.

Parameters

argument

Builder for com.pulumi.azure.batch.kotlin.inputs.GetAccountPlainArgs.

See also