Queries the information of all the member accounts in a resource directory.

Note Only a master account can be used to call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListAccounts

The operation that you want to perform. Set the value to ListAccounts.

PageNumber Integer No 1

The number of the page to return.

Pages start from page 1. Default value: 1.

PageSize Integer No 5

The number of entries to return on each page.

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

Response parameters

Parameter Type Example Description
Accounts Array

The information of the member accounts.

Account
AccountId String 12323344****

The ID of the member account.

DisplayName String admin

The display name of the member account.

FolderId String fd-bVaRIG****

The ID of the folder.

JoinMethod String created

The way in which the member account joined the resource directory. Valid values:

  • invited: The member account is invited to join the resource directory.
  • created: The member account is directly created in the resource directory.
JoinTime String 2015-01-23T12:33:18Z

The time when the member account joined the resource directory.

ModifyTime String 2015-01-23T12:33:18Z

The time when the member account was modified.

ResourceDirectoryId String rd-k4****

The ID of the resource directory.

Status String CreateSuccess

The status of the member account. Valid values:

  • CreateSuccess: The member account is created.
  • CreateVerifying: The creation of the member account is under confirmation.
  • CreateFailed: The member account failed to be created.
  • CreateExpired: The creation of the member account expired.
  • CreateCancelled: The creation of the member account is canceled.
  • PromoteVerifying: The upgrade of the member account is under confirmation.
  • PromoteFailed: The member account failed to be upgraded.
  • PromoteExpired: The upgrade of the member account expired.
  • PromoteCancelled: The upgrade of the member account is canceled.
  • PromoteSuccess: The member account is upgraded.
  • InviteSuccess: The owner of the member account accepted the invitation.
  • Removed: The member account is removed from the resource directory.
Type String ResourceAccount

The type of the member account. Valid values:

  • CloudAccount: cloud account
  • ResourceAccount: resource account
PageNumber Integer 1

The page number of the returned page.

PageSize Integer 5

The number of entries returned per page.

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

The ID of the request.

TotalCount Integer 2

The total number of returned entries.

Examples

Sample requests

https://resourcemanager.aliyuncs.com/?Action=ListAccounts
&<Common request parameters>

Sample success responses

XML format

<ListAccountsResponse>
        <RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
        <PageNumber>1</PageNumber>
        <PageSize>5</PageSize>
        <TotalCount>2</TotalCount>
        <Accounts>
                <Account>
                        <ResourceDirectoryId>rd-k4****</ResourceDirectoryId>
                        <AccountId>12323344****</AccountId>
                        <DisplayName>admin</DisplayName>
                        <FolderId>fd-bVaRIG****</FolderId>
                        <JoinMethod>created</JoinMethod>
                        <JoinTime>2015-01-23T12:33:18Z</JoinTime>
                        <Type>ResourceAccount</Type>
                        <Status>CreateSuccess</Status>
                        <ModifyTime>2015-01-23T12:33:18Z</ModifyTime>
                </Account>
                <Account>
                        <ResourceDirectoryId>rd-k4****</ResourceDirectoryId>
                        <AccountId>12323344****</AccountId>
                        <DisplayName>manager</DisplayName>
                        <FolderId>fd-bVaRIG****</FolderId>
                        <JoinMethod>created</JoinMethod>
                        <JoinTime>2015-01-23T12:33:18Z</JoinTime>
                        <Type>ResourceAccount</Type>
                        <Status>CreateSuccess</Status>
                        <ModifyTime>2015-01-23T12:33:18Z</ModifyTime>
                </Account>
        </Accounts>
</ListAccountsResponse>

JSON format

{
    "RequestId": "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
    "PageNumber": 1,
    "PageSize": 5,
    "TotalCount": 2,
    "Accounts":  {
        "Account": [
          {
            "ResourceDirectoryId":"rd-k4****",
            "AccountId": "12323344****",
            "DisplayName": "admin",
            "FolderId": "fd-bVaRIG****",
            "JoinMethod": "created",
            "JoinTime": "2015-01-23T12:33:18Z",
            "Type":"ResourceAccount",
            "Status":"CreateSuccess",
            "ModifyTime":"2015-01-23T12:33:18Z"       
          },
          {
            "ResourceDirectoryId":"rd-k4****",
            "AccountId": "12323344****",
            "DisplayName": "manager",
            "FolderId": "fd-bVaRIG****",
            "JoinMethod": "created",
            "JoinTime": "2015-01-23T12:33:18Z",
            "Type":"ResourceAccount",
            "Status":"CreateSuccess",
            "ModifyTime":"2015-01-23T12:33:18Z"
          }
       ]
    }
}

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 error message returned because the resource directory for the account is not enabled. Enable the resource directory for the account.

For a list of error codes, visit the API Error Center.