All Products
Search
Document Center

Resource Management:ListAccounts

Last Updated:Aug 28, 2026

Queries all members in a resource directory.

Operation description

Only the management account of a resource directory or a delegated administrator account of a trusted service can call this operation.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

resourcemanager:ListAccounts

get

*Account

acs:resourcemanager:*:{#accountId}:account/*

None None

Request parameters

Parameter

Type

Required

Description

Example

PageNumber

integer

No

The page number to return.

Pages start from page 1. Default value: 1.

1

PageSize

integer

No

The number of entries to return on each page.

Valid values: 1 to 100. Default value: 10.

10

Tag

array<object>

No

The tag key and value.

object

No

The tag key and value.

Key

string

No

A tag key.

tag_key

Value

string

No

A tag value.

tag_value

IncludeTags

boolean

No

Specifies whether to return tag information. Valid values:

  • false (default value)

  • true

true

For more information about common request parameters, see Common parameters.

Response elements

Element

Type

Description

Example

object

TotalCount

integer

The total number of entries returned.

2

RequestId

string

The ID of the request.

7B8A4E7D-6CFF-471D-84DF-195A7A241ECB

PageSize

integer

The number of entries returned per page.

5

PageNumber

integer

The page number of the returned page.

1

Accounts

object

Account

array<object>

The members returned.

array<object>

The members returned.

Status

string

The status of the member. Valid values:

  • CreateSuccess: The member is created.

  • PromoteVerifying: The upgrade of the member is being confirmed.

  • PromoteFailed: The upgrade of the member fails.

  • PromoteExpired: The upgrade of the member expires.

  • PromoteCancelled: The upgrade of the member is canceled.

  • PromoteSuccess: The member is upgraded.

  • InviteSuccess: The member accepts the invitation.

CreateSuccess

Type

string

The type of the member. Valid values:

  • CloudAccount: cloud account

  • ResourceAccount: resource account

ResourceAccount

DisplayName

string

The display name of the member.

test

FolderId

string

The ID of the folder.

fd-QRzuim****

ResourceDirectoryId

string

The ID of the resource directory.

rd-3G****

JoinTime

string

The time when the member joined the resource directory, in UTC.

2021-01-18T08:01:50.522Z

AccountId

string

The Alibaba Cloud account ID of the member.

181761095690****

JoinMethod

string

The method by which the member joined the resource directory. Valid values:

  • invited: The member is invited to join the resource directory.

  • created: The member is directly created in the resource directory.

created

ModifyTime

string

The time when the member was last modified, in UTC.

2021-01-18T08:04:37.668Z

ResourceDirectoryPath

string

The path of the member in the resource directory.

rd-3G****/r-Wm****/fd-QRzuim****/181761095690****

Tags

object

Tag

array<object>

The tags added to the member.

object

The tags added to the member.

Key

string

A tag key.

tag_key

Value

string

A tag value.

tag_value

Examples

Success response

JSON format

{
  "TotalCount": 2,
  "RequestId": "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
  "PageSize": 5,
  "PageNumber": 1,
  "Accounts": {
    "Account": [
      {
        "Status": "CreateSuccess",
        "Type": "ResourceAccount",
        "DisplayName": "test",
        "FolderId": "fd-QRzuim****",
        "ResourceDirectoryId": "rd-3G****",
        "JoinTime": "2021-01-18T08:01:50.522Z",
        "AccountId": "181761095690****",
        "JoinMethod": "created",
        "ModifyTime": "2021-01-18T08:04:37.668Z",
        "ResourceDirectoryPath": "rd-3G****/r-Wm****/fd-QRzuim****/181761095690****",
        "Tags": {
          "Tag": [
            {
              "Key": "tag_key",
              "Value": "tag_value"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

404 EntityNotExists.ResourceDirectory The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.