GetAccounts

This data source provides the Resource Manager Accounts of the current Alibaba Cloud user.

NOTE: Available in 1.86.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.ResourceManager.GetAccounts.InvokeAsync());
        this.FirstAccountId = @default.Apply(@default => @default.Accounts[0].Id);
    }

    [Output("firstAccountId")]
    public Output<string> FirstAccountId { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

default = alicloud.resourcemanager.get_accounts()
pulumi.export("firstAccountId", default.accounts[0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultAccounts = pulumi.output(alicloud.resourcemanager.getAccounts({ async: true }));

export const firstAccountId = defaultAccounts.accounts[0].id;

Using GetAccounts

function getAccounts(args: GetAccountsArgs, opts?: InvokeOptions): Promise<GetAccountsResult>
function  get_accounts(ids=None, output_file=None, opts=None)
func GetAccounts(ctx *Context, args *GetAccountsArgs, opts ...InvokeOption) (*GetAccountsResult, error)
public static class GetAccounts {
    public static Task<GetAccountsResult> InvokeAsync(GetAccountsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Ids List<string>

A list of account IDs.

OutputFile string
Ids []string

A list of account IDs.

OutputFile string
ids string[]

A list of account IDs.

outputFile string
ids List[str]

A list of account IDs.

output_file str

GetAccounts Result

The following output properties are available:

Accounts List<Pulumi.AliCloud.ResourceManager.Outputs.GetAccountsAccount>

A list of accounts. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of account IDs.

OutputFile string
Accounts []GetAccountsAccount

A list of accounts. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of account IDs.

OutputFile string
accounts GetAccountsAccount[]

A list of accounts. Each element contains the following attributes:

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of account IDs.

outputFile string
accounts List[GetAccountsAccount]

A list of accounts. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of account IDs.

output_file str

Supporting Types

GetAccountsAccount

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AccountId string
DisplayName string
FolderId string

The ID of the folder.

Id string

The ID of the resource. * account_id- The ID of the account. * display_name- The name of the member account.

JoinMethod string

The way in which the member account joined the resource directory.

JoinTime string

The time when the member account joined the resource directory.

ModifyTime string

The time when the member account was modified.

ResourceDirectoryId string

The ID of the resource directory.

Status string

The status of the member account.

Type string

The type of the member account.

AccountId string
DisplayName string
FolderId string

The ID of the folder.

Id string

The ID of the resource. * account_id- The ID of the account. * display_name- The name of the member account.

JoinMethod string

The way in which the member account joined the resource directory.

JoinTime string

The time when the member account joined the resource directory.

ModifyTime string

The time when the member account was modified.

ResourceDirectoryId string

The ID of the resource directory.

Status string

The status of the member account.

Type string

The type of the member account.

accountId string
displayName string
folderId string

The ID of the folder.

id string

The ID of the resource. * account_id- The ID of the account. * display_name- The name of the member account.

joinMethod string

The way in which the member account joined the resource directory.

joinTime string

The time when the member account joined the resource directory.

modifyTime string

The time when the member account was modified.

resourceDirectoryId string

The ID of the resource directory.

status string

The status of the member account.

type string

The type of the member account.

account_id str
display_name str
folder_id str

The ID of the folder.

id str

The ID of the resource. * account_id- The ID of the account. * display_name- The name of the member account.

join_method str

The way in which the member account joined the resource directory.

join_time str

The time when the member account joined the resource directory.

modify_time str

The time when the member account was modified.

resource_directory_id str

The ID of the resource directory.

status str

The status of the member account.

type str

The type of the member account.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.