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.
- Output
File string
- Ids []string
A list of account IDs.
- Output
File string
- ids string[]
A list of account IDs.
- output
File string
- ids List[str]
A list of account IDs.
- output_
file str
GetAccounts Result
The following output properties are available:
- Accounts
List<Pulumi.
Ali Cloud. Resource Manager. Outputs. Get Accounts Account> 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.
- Output
File string
- Accounts
[]Get
Accounts Account 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.
- Output
File string
- accounts
Get
Accounts Account[] 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.
- output
File string
- accounts
List[Get
Accounts Account] 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.
- Account
Id string - Display
Name string - Folder
Id 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.- Join
Method string The way in which the member account joined the resource directory.
- Join
Time string The time when the member account joined the resource directory.
- Modify
Time string The time when the member account was modified.
- Resource
Directory stringId The ID of the resource directory.
- Status string
The status of the member account.
- Type string
The type of the member account.
- Account
Id string - Display
Name string - Folder
Id 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.- Join
Method string The way in which the member account joined the resource directory.
- Join
Time string The time when the member account joined the resource directory.
- Modify
Time string The time when the member account was modified.
- Resource
Directory stringId The ID of the resource directory.
- Status string
The status of the member account.
- Type string
The type of the member account.
- account
Id string - display
Name string - folder
Id 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.- join
Method string The way in which the member account joined the resource directory.
- join
Time string The time when the member account joined the resource directory.
- modify
Time string The time when the member account was modified.
- resource
Directory stringId 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_ strid 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
alicloudTerraform Provider.