Queries the member accounts in a folder.
In this example, the member accounts in the fd-bVaRIG****
folder are queried. The returned result shows that the folder contains two member
accounts: member account whose Alibaba Cloud account ID is 181761095690****
and member account whose Alibaba Cloud account ID is 184311716100****
.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListAccountsForParent |
The operation that you want to perform. Set the value to ListAccountsForParent. |
ParentFolderId | String | No | fd-bVaRIG**** |
The ID of the folder. |
QueryKeyword | String | No | admin |
The keyword used for the query, such as a member account name. Fuzzy match is supported. |
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Valid values: 1 to 100. Default value: 10. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TotalCount | Integer | 2 |
The total number of entries returned. |
RequestId | String | 7B8A4E7D-6CFF-471D-84DF-195A7A241ECB |
The ID of the request. |
PageSize | Integer | 5 |
The number of entries returned per page. |
PageNumber | Integer | 1 |
The page number of the returned page. |
Accounts | Array of Account |
The information of the member accounts. |
|
Account | |||
Status | String | CreateSuccess |
The status of the member account. Valid values:
|
Type | String | ResourceAccount |
The type of the member account.
|
DisplayName | String | admin |
The name of the member account. |
FolderId | String | fd-bVaRIG**** |
The ID of the folder. |
ResourceDirectoryId | String | rd-k4**** |
The ID of the resource directory. |
JoinTime | String | 2015-01-23T12:33:18Z |
The time when the member account joined the resource directory. The time is displayed in UTC. |
AccountId | String | 184311716100**** |
The Alibaba Cloud account ID of the member account. |
JoinMethod | String | created |
The way in which the member account joins the resource directory. Valid values:
|
ModifyTime | String | 2015-01-23T12:33:18Z |
The time when the member account was modified. The time is displayed in UTC. |
Examples
Sample requests
https://resourcemanager.aliyuncs.com/?Action=ListAccountsForParent
&ParentFolderId=fd-bVaRIG****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8" ?>
<ListAccountsForParentResponse>
<RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
<PageNumber>1</PageNumber>
<PageSize>5</PageSize>
<TotalCount>2</TotalCount>
<Accounts>
<Account>
<ResourceDirectoryId>rd-k4****</ResourceDirectoryId>
<AccountId>181761095690****</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>184311716100****</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>
</ListAccountsForParentResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
"PageNumber" : 1,
"PageSize" : 5,
"TotalCount" : 2,
"Accounts" : {
"Account" : [ {
"ResourceDirectoryId" : "rd-k4****",
"AccountId" : "181761095690****",
"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" : "184311716100****",
"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 |
---|---|---|---|
400 | InvalidParameter.ParentFolderId | The ParentFolderId is invalid. | The error message returned because the value of the ParentFolderId parameter is invalid. Specify a value that starts with r- followed by 6 characters or starts with fd- followed by 10 characters. Valid characters are letters and digits. |
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. |
404 | EntityNotExists.Folder | The resource directory folder does not exist. | The error message returned because the folder does not exist. Create the folder first. |
For a list of error codes, visit the API Error Center.