調用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

成員加入狀態。取值:

  • CreateSuccess:創建成功。
  • PromoteVerifying:升級確認中。
  • PromoteFailed:升級失敗。
  • PromoteExpired:升級過期。
  • PromoteCancelled:升級取消。
  • PromoteSuccess:升級成功。
  • InviteSuccess:邀請成功。
Type String ResourceAccount

成員類型。取值:

  • CloudAccount:云賬號。
  • 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

成員加入方式。取值:

  • invited:邀請。
  • 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. 當前賬號未啟用資源目錄,請先啟用資源目錄。

訪問錯誤中心查看更多錯誤碼。