Alibaba Cloud v3.85.0 published on Tuesday, Sep 9, 2025 by Pulumi
alicloud.resourcemanager.getAccounts
Explore with Pulumi AI
This data source provides the Resource Manager Accounts of the current Alibaba Cloud user.
NOTE: Available since v1.86.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.resourcemanager.getAccounts({});
export const resourceManagerAccountId0 = _default.then(_default => _default.accounts?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.resourcemanager.get_accounts()
pulumi.export("resourceManagerAccountId0", default.accounts[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := resourcemanager.GetAccounts(ctx, &resourcemanager.GetAccountsArgs{}, nil)
if err != nil {
return err
}
ctx.Export("resourceManagerAccountId0", _default.Accounts[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.ResourceManager.GetAccounts.Invoke();
return new Dictionary<string, object?>
{
["resourceManagerAccountId0"] = @default.Apply(@default => @default.Apply(getAccountsResult => getAccountsResult.Accounts[0]?.Id)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetAccountsArgs;
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 default = ResourcemanagerFunctions.getAccounts(GetAccountsArgs.builder()
.build());
ctx.export("resourceManagerAccountId0", default_.accounts()[0].id());
}
}
variables:
default:
fn::invoke:
function: alicloud:resourcemanager:getAccounts
arguments: {}
outputs:
resourceManagerAccountId0: ${default.accounts[0].id}
Using getAccounts
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 getAccounts(args: GetAccountsArgs, opts?: InvokeOptions): Promise<GetAccountsResult>
function getAccountsOutput(args: GetAccountsOutputArgs, opts?: InvokeOptions): Output<GetAccountsResult>
def get_accounts(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetAccountsResult
def get_accounts_output(enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccountsResult]
func GetAccounts(ctx *Context, args *GetAccountsArgs, opts ...InvokeOption) (*GetAccountsResult, error)
func GetAccountsOutput(ctx *Context, args *GetAccountsOutputArgs, opts ...InvokeOption) GetAccountsResultOutput
> Note: This function is named GetAccounts
in the Go SDK.
public static class GetAccounts
{
public static Task<GetAccountsResult> InvokeAsync(GetAccountsArgs args, InvokeOptions? opts = null)
public static Output<GetAccountsResult> Invoke(GetAccountsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccountsResult> getAccounts(GetAccountsArgs args, InvokeOptions options)
public static Output<GetAccountsResult> getAccounts(GetAccountsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:resourcemanager/getAccounts:getAccounts
arguments:
# arguments dictionary
The following arguments are supported:
- Enable
Details bool - Whether to query the detailed list of resource attributes. Default value:
false
. - Ids List<string>
- A list of Account IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Enable
Details bool - Whether to query the detailed list of resource attributes. Default value:
false
. - Ids []string
- A list of Account IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - map[string]string
- A mapping of tags to assign to the resource.
- enable
Details Boolean - Whether to query the detailed list of resource attributes. Default value:
false
. - ids List<String>
- A list of Account IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - Map<String,String>
- A mapping of tags to assign to the resource.
- enable
Details boolean - Whether to query the detailed list of resource attributes. Default value:
false
. - ids string[]
- A list of Account IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- enable_
details bool - Whether to query the detailed list of resource attributes. Default value:
false
. - ids Sequence[str]
- A list of Account IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - status str
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- enable
Details Boolean - Whether to query the detailed list of resource attributes. Default value:
false
. - ids List<String>
- A list of Account IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - Map<String>
- A mapping of tags to assign to the resource.
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>
- Enable
Details bool - Output
File string - Status string
- The status of the member.
- Dictionary<string, string>
- (Available since v1.259.0) The tags that are added to the member.
- 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
- Enable
Details bool - Output
File string - Status string
- The status of the member.
- map[string]string
- (Available since v1.259.0) The tags that are added to the member.
- accounts
List<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>
- enable
Details Boolean - output
File String - status String
- The status of the member.
- Map<String,String>
- (Available since v1.259.0) The tags that are added to the member.
- 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[]
- enable
Details boolean - output
File string - status string
- The status of the member.
- {[key: string]: string}
- (Available since v1.259.0) The tags that are added to the member.
- accounts
Sequence[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 Sequence[str]
- enable_
details bool - output_
file str - status str
- The status of the member.
- Mapping[str, str]
- (Available since v1.259.0) The tags that are added to the member.
- accounts List<Property Map>
- A list of accounts. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- enable
Details Boolean - output
File String - status String
- The status of the member.
- Map<String>
- (Available since v1.259.0) The tags that are added to the member.
Supporting Types
GetAccountsAccount
- Account
Id string - The Alibaba Cloud account ID of the member.
- Account
Name string - (Available since v1.125.0) The Alibaba Cloud account name of the member. Note:
account_name
takes effect only ifenable_details
is set totrue
. - Display
Name string - The display name of the member.
- Folder
Id string - The ID of the folder.
- Id string
- The ID of the Account.
- Join
Method string - The way in which the member joins the resource directory.
- Join
Time string - The time when the member joined the resource directory.
- Modify
Time string - The time when the member was modified.
- Payer
Account stringId - (Available since v1.124.3) The ID of the settlement account. Note:
payer_account_id
takes effect only ifenable_details
is set totrue
. - Resource
Directory stringId - The ID of the resource directory.
- Status string
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Type string
- The type of the member.
- Account
Id string - The Alibaba Cloud account ID of the member.
- Account
Name string - (Available since v1.125.0) The Alibaba Cloud account name of the member. Note:
account_name
takes effect only ifenable_details
is set totrue
. - Display
Name string - The display name of the member.
- Folder
Id string - The ID of the folder.
- Id string
- The ID of the Account.
- Join
Method string - The way in which the member joins the resource directory.
- Join
Time string - The time when the member joined the resource directory.
- Modify
Time string - The time when the member was modified.
- Payer
Account stringId - (Available since v1.124.3) The ID of the settlement account. Note:
payer_account_id
takes effect only ifenable_details
is set totrue
. - Resource
Directory stringId - The ID of the resource directory.
- Status string
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - map[string]string
- A mapping of tags to assign to the resource.
- Type string
- The type of the member.
- account
Id String - The Alibaba Cloud account ID of the member.
- account
Name String - (Available since v1.125.0) The Alibaba Cloud account name of the member. Note:
account_name
takes effect only ifenable_details
is set totrue
. - display
Name String - The display name of the member.
- folder
Id String - The ID of the folder.
- id String
- The ID of the Account.
- join
Method String - The way in which the member joins the resource directory.
- join
Time String - The time when the member joined the resource directory.
- modify
Time String - The time when the member was modified.
- payer
Account StringId - (Available since v1.124.3) The ID of the settlement account. Note:
payer_account_id
takes effect only ifenable_details
is set totrue
. - resource
Directory StringId - The ID of the resource directory.
- status String
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - Map<String,String>
- A mapping of tags to assign to the resource.
- type String
- The type of the member.
- account
Id string - The Alibaba Cloud account ID of the member.
- account
Name string - (Available since v1.125.0) The Alibaba Cloud account name of the member. Note:
account_name
takes effect only ifenable_details
is set totrue
. - display
Name string - The display name of the member.
- folder
Id string - The ID of the folder.
- id string
- The ID of the Account.
- join
Method string - The way in which the member joins the resource directory.
- join
Time string - The time when the member joined the resource directory.
- modify
Time string - The time when the member was modified.
- payer
Account stringId - (Available since v1.124.3) The ID of the settlement account. Note:
payer_account_id
takes effect only ifenable_details
is set totrue
. - resource
Directory stringId - The ID of the resource directory.
- status string
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- type string
- The type of the member.
- account_
id str - The Alibaba Cloud account ID of the member.
- account_
name str - (Available since v1.125.0) The Alibaba Cloud account name of the member. Note:
account_name
takes effect only ifenable_details
is set totrue
. - display_
name str - The display name of the member.
- folder_
id str - The ID of the folder.
- id str
- The ID of the Account.
- join_
method str - The way in which the member joins the resource directory.
- join_
time str - The time when the member joined the resource directory.
- modify_
time str - The time when the member was modified.
- payer_
account_ strid - (Available since v1.124.3) The ID of the settlement account. Note:
payer_account_id
takes effect only ifenable_details
is set totrue
. - resource_
directory_ strid - The ID of the resource directory.
- status str
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- type str
- The type of the member.
- account
Id String - The Alibaba Cloud account ID of the member.
- account
Name String - (Available since v1.125.0) The Alibaba Cloud account name of the member. Note:
account_name
takes effect only ifenable_details
is set totrue
. - display
Name String - The display name of the member.
- folder
Id String - The ID of the folder.
- id String
- The ID of the Account.
- join
Method String - The way in which the member joins the resource directory.
- join
Time String - The time when the member joined the resource directory.
- modify
Time String - The time when the member was modified.
- payer
Account StringId - (Available since v1.124.3) The ID of the settlement account. Note:
payer_account_id
takes effect only ifenable_details
is set totrue
. - resource
Directory StringId - The ID of the resource directory.
- status String
- The status of account. Valid values:
CreateCancelled
,CreateExpired
,CreateFailed
,CreateSuccess
,CreateVerifying
,InviteSuccess
,PromoteCancelled
,PromoteExpired
,PromoteFailed
,PromoteSuccess
,PromoteVerifying
. - Map<String>
- A mapping of tags to assign to the resource.
- type String
- The type of the member.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.