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.

Response parameters

Parameter Type Example Description
Handshakes Array

The information of the invitations.

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

The time when the invitation was created.

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

The time when the invitation expires.

HandshakeId String h-ycm4rp****

The ID of the invitation.

MasterAccountId String 172841235500****

The ID of the master account of the resource directory.

MasterAccountName String Alice

The name of the master account of the resource directory.

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

The time when the invitation was modified.

Note String Welcome

The invitation note.

ResourceDirectoryId String rd-abcdef****

The ID of the resource directory.

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 expired.
TargetEntity String someone@example.com

The ID or logon email address of the invited account.

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.
PageNumber Integer 1

The number of the returned page.

PageSize Integer 10

The number of entries returned per page.

RequestId String 9B34724D-54B0-4A51-B34D-4512372FE1BE

The ID of the request.

TotalCount Integer 2

The total number of returned entries.

Examples

Sample requests

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

Sample success responses

XML format

<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>Welcom</Note>
                        <Status>Pending</Status>
                        <CreateTime>2018-08-10T09:55:41Z</CreateTime>
                        <ModifyTime>2018-08-10T09:55:41Z</ModifyTime>
                        <ExpireTime>2018-08-17T09:55:41Z7</ExpireTime>
                </Handshake>
                <Handshake>
                        <HandshakeId>h-ycm4rp****</HandshakeId>
                        <ResourceDirectoryId>rd-abcdef****</ResourceDirectoryId>
                        <MasterAccountId>172841235500****</MasterAccountId>
                        <MasterAccountName>Alice</MasterAccountName>
                        <TargetEntity>172841235500****</TargetEntity>
                        <TargetType>Account</TargetType>
                        <Note>Welcom</Note>
                        <Status>Pending</Status>
                        <CreateTime>2018-08-10T09:55:41Z</CreateTime>
                        <ModifyTime>2018-08-10T09:55:41Z</ModifyTime>
                        <ExpireTime>2018-08-17T09:55:41Z7</ExpireTime>
                </Handshake>
        </Handshakes>
</ListHandshakesForResourceDirectoryResponse>

JSON format

{
    "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": "Welcom",
                "Status": "Pending",
                "CreateTime": "2018-08-10T09:55:41Z",
                "ModifyTime": "2018-08-10T09:55:41Z",
                "ExpireTime": "2018-08-17T09:55:41Z7"
            },
            {
                "HandshakeId": "h-ycm4rp****",
                "ResourceDirectoryId": "rd-abcdef****",
                "MasterAccountId": "172841235500****",
                "MasterAccountName": "Alice",
                "TargetEntity": "172841235500****",
                "TargetType": "Account",
                "Note": "Welcom",
                "Status": "Pending",
                "CreateTime": "2018-08-10T09:55:41Z",
                "ModifyTime": "2018-08-10T09:55:41Z",
                "ExpireTime": "2018-08-17T09:55:41Z7"
            }
        ]
    }
}

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.