调用ListAccounts查询整个资源目录下的所有成员列表。
使用说明
资源目录的管理账号和可信服务的委派管理员账号可以调用该接口。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 | 
|---|---|---|---|---|
| Action | String | 是 | ListAccounts | 要执行的操作。取值:ListAccounts。 | 
| PageNumber | Integer | 否 | 1 | 页码。 起始值:1。默认值:1。 | 
| PageSize | Integer | 否 | 10 | 分页时每页显示的数据行数。 取值范围:1~100。默认值:10。 | 
| Tag.N.Key | String | 否 | tag_key | 标签键。 | 
| Tag.N.Value | String | 否 | tag_value | 标签值。 | 
| IncludeTags | Boolean | 否 | true | 是否返回标签信息。取值: false(默认值):不返回。 true:返回。 | 
关于公共请求参数的详情,请参见公共参数。
返回数据
| 名称 | 类型 | 示例值 | 描述 | 
|---|---|---|---|
| TotalCount | Integer | 2 | 数据总条数。 | 
| RequestId | String | 7B8A4E7D-6CFF-471D-84DF-195A7A241ECB | 请求ID。 | 
| PageSize | Integer | 5 | 分页时每页显示的数据行数。 | 
| PageNumber | Integer | 1 | 页码。 | 
| Accounts | Array of Account | 成员列表。 | |
| Account | |||
| Status | String | CreateSuccess | 成员加入状态。取值: 
 | 
| Type | String | ResourceAccount | 成员类型。取值: 
 | 
| DisplayName | String | test | 成员名称。 | 
| FolderId | String | fd-QRzuim**** | 资源夹ID。 | 
| ResourceDirectoryId | String | rd-3G**** | 资源目录ID。 | 
| JoinTime | String | 2021-01-18T08:01:50.522Z | 成员加入时间(UTC时间)。 | 
| AccountId | String | 181761095690**** | 成员账号ID。 | 
| JoinMethod | String | created | 成员加入方式。取值: 
 | 
| ModifyTime | String | 2021-01-18T08:04:37.668Z | 成员修改时间(UTC时间)。 | 
| ResourceDirectoryPath | String | rd-3G****/r-Wm****/fd-QRzuim****/181761095690**** | 成员在资源目录中的路径ID(RDPath)。 | 
| Tags | Array of Tag | 成员所有的标签。 | |
| Tag | |||
| Key | String | tag_key | 标签键。 | 
| Value | String | tag_value | 标签值。 | 
示例
请求示例
http(s)://[Endpoint]/?Action=ListAccounts
&PageNumber=1
&PageSize=10
&Tag=[{"Key":"tag_key","Value":"tag_value"}]
&IncludeTags=true
&<公共请求参数>正常返回示例
XML格式
                  
HTTP/1.1 200 OK
Content-Type:application/xml
<ListAccountsResponse>
    <TotalCount>2</TotalCount>
    <RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
    <PageSize>1</PageSize>
    <PageNumber>2</PageNumber>
    <Accounts>
        <Status>CreateSuccess</Status>
        <Type>ResourceAccount</Type>
        <DisplayName>test</DisplayName>
        <FolderId>fd-QRzuim****</FolderId>
        <ResourceDirectoryId>rd-3G****</ResourceDirectoryId>
        <JoinTime>2021-01-18T08:01:50.522Z</JoinTime>
        <AccountId>181761095690****</AccountId>
        <JoinMethod>created</JoinMethod>
        <ModifyTime>2021-01-18T08:04:37.668Z</ModifyTime>
        <ResourceDirectoryPath>rd-3G****/r-Wm****/fd-QRzuim****/181761095690****</ResourceDirectoryPath>
        <Tags>
            <Key>tag_key</Key>
            <Value>tag_value</Value>
        </Tags>
    </Accounts>
</ListAccountsResponse>JSON格式
                  
HTTP/1.1 200 OK
Content-Type:application/json
{
  "TotalCount" : 2,
  "RequestId" : "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
  "PageSize" : 1,
  "PageNumber" : 2,
  "Accounts" : [ {
    "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" : [ {
      "Key" : "tag_key",
      "Value" : "tag_value"
    } ]
  } ]
}错误码
| HttpCode | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 404 | EntityNotExists.ResourceDirectory | The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. | 当前账号未启用资源目录,请先启用资源目录。 | 
访问错误中心查看更多错误码。