Queries invitations in a resource directory.

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 ListHandshakesForResourceDirectory

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

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 9B34724D-54B0-4A51-B34D-4512372FE1BE

The ID of the request.

PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

Handshakes Array of Handshake

The information of the invitations.

Handshake
Status String Pending

The status of the invitation. Valid values:

  • Pending: The invitation is waiting for confirmation.
  • Accepted: The invitation is accepted.
  • Cancelled: The invitation is canceled.
  • Declined: The invitation is rejected.
  • Expired: The invitation expires.
ExpireTime String 2018-08-24T09:55:41Z

The time when the invitation expires. The time is displayed in UTC.

ResourceDirectoryId String rd-abcdef****

The ID of the resource directory.

CreateTime String 2018-08-10T09:55:41Z

The time when the invitation was created. The time is displayed in UTC.

Note String Welcome

The comment on the invitation.

TargetEntity String someone@example.com

The ID or logon email address of the invited account.

MasterAccountId String 172841235500****

The ID of the management account of the resource directory.

MasterAccountName String Alice

The name of the management account of the resource directory.

ModifyTime String 2018-08-10T09:55:41Z

The time when the invitation was modified. The time is displayed in UTC.

TargetType String Email

The type of the invited account. Valid values:

  • Account: indicates the ID of the account.
  • Email: indicates the logon email address of the account.
HandshakeId String h-ycm4rp****

The ID of the invitation.

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListHandshakesForResourceDirectoryResponse>
    <RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
    <PageNumber>1</PageNumber>
    <PageSize>10</PageSize>
    <TotalCount>2</TotalCount>
    <Handshakes>
        <Handshake>
            <HandshakeId>h-ycm4rp****</HandshakeId>
            <ResourceDirectoryId>rd-abcdef****</ResourceDirectoryId>
            <MasterAccountId>172841235500****</MasterAccountId>
            <MasterAccountName>Alice</MasterAccountName>
            <InviteEntity>someone@example.com</InviteEntity>
            <InviteType>Email</InviteType>
            <Note>Welcome</Note>
            <Status>Pending</Status>
            <CreateTime>2018-08-10T09:55:41Z</CreateTime>
            <ModifyTime>2018-08-10T09:55:41Z</ModifyTime>
            <ExpireTime>2018-08-24T09:55:41Z</ExpireTime>
        </Handshake>
        <Handshake>
            <HandshakeId>h-ycm4rp****</HandshakeId>
            <ResourceDirectoryId>rd-abcdef****</ResourceDirectoryId>
            <MasterAccountId>172841235500****</MasterAccountId>
            <MasterAccountName>Alice</MasterAccountName>
            <TargetEntity>172841235500****</TargetEntity>
            <TargetType>Account</TargetType>
            <Note>Welcome</Note>
            <Status>Pending</Status>
            <CreateTime>2018-08-10T09:55:41Z</CreateTime>
            <ModifyTime>2018-08-10T09:55:41Z</ModifyTime>
            <ExpireTime>2018-08-24T09:55:41Z</ExpireTime>
        </Handshake>
    </Handshakes>
</ListHandshakesForResourceDirectoryResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "9B34724D-54B0-4A51-B34D-4512372FE1BE",
  "PageNumber" : 1,
  "PageSize" : 10,
  "TotalCount" : 2,
  "Handshakes" : {
    "Handshake" : [ {
      "HandshakeId" : "h-ycm4rp****",
      "ResourceDirectoryId" : "rd-abcdef****",
      "MasterAccountId" : "172841235500****",
      "MasterAccountName" : "Alice",
      "InviteEntity" : "someone@example.com",
      "InviteType" : "Email",
      "Note" : "Welcome",
      "Status" : "Pending",
      "CreateTime" : "2018-08-10T09:55:41Z",
      "ModifyTime" : "2018-08-10T09:55:41Z",
      "ExpireTime" : "2018-08-24T09:55:41Z"
    }, {
      "HandshakeId" : "h-ycm4rp****",
      "ResourceDirectoryId" : "rd-abcdef****",
      "MasterAccountId" : "172841235500****",
      "MasterAccountName" : "Alice",
      "TargetEntity" : "172841235500****",
      "TargetType" : "Account",
      "Note" : "Welcome",
      "Status" : "Pending",
      "CreateTime" : "2018-08-10T09:55:41Z",
      "ModifyTime" : "2018-08-10T09:55:41Z",
      "ExpireTime" : "2018-08-24T09:55:41Z"
    } ]
  }
}

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 account has not been used to enable a resource directory. Use the account to enable a resource directory first.

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