Cancels an invitation.
Usage notes
This topic provides an example on how to call the API operation to cancel the invitation
whose ID is h-ycm4rp****
.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CancelHandshake |
The operation that you want to perform. Set the value to CancelHandshake. |
HandshakeId | String | Yes | h-ycm4rp**** |
The ID of the invitation. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 9B34724D-54B0-4A51-B34D-4512372FE1BE |
The ID of the request. |
Handshake | Object |
The information of the invitation. |
|
Status | String | Cancelled |
The status of the invitation. Valid values:
|
ExpireTime | String | 2018-08-24T09:55:41Z |
The time when the invitation expires. The time is displayed in UTC. |
ResourceDirectoryId | String | h-ycm4rp**** |
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 |
The type of the invited account. Valid values:
|
|
HandshakeId | String | h-ycm4rp**** |
The ID of the invitation. |
For more information about common request parameters, see Common parameters.
Examples
Sample requests
https://resourcemanager.aliyuncs.com/?Action=CancelHandshake
&HandshakeId=h-ycm4rp****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CancelHandshakeResponse>
<RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
<Handshake>
<HandshakeId>h-ycm4rp****</HandshakeId>
<ResourceDirectoryId>rd-abcdef****</ResourceDirectoryId>
<MasterAccountId>172841235500****</MasterAccountId>
<MasterAccountName>Alice</MasterAccountName>
<TargetEntity>someone@example.com</TargetEntity>
<TargetType>Email</TargetType>
<Note>Welcome</Note>
<Status>Cancelled</Status>
<CreateTime>2018-08-10T09:55:41Z</CreateTime>
<ModifyTime>2018-08-10T09:55:41Z</ModifyTime>
<ExpireTime>2018-08-24T09:55:41Z</ExpireTime>
</Handshake>
</CancelHandshakeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "9B34724D-54B0-4A51-B34D-4512372FE1BE",
"Handshake" : {
"HandshakeId" : "h-ycm4rp****",
"ResourceDirectoryId" : "rd-abcdef****",
"MasterAccountId" : "172841235500****",
"MasterAccountName" : "Alice",
"TargetEntity" : "someone@example.com",
"TargetType" : "Email",
"Note" : "Welcome",
"Status" : "Cancelled",
"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 |
---|---|---|---|
400 | MissingParameter.HandshakeId | You must specify HandshakeId. | The error message returned because the HandshakeId parameter is not specified. Specify this parameter. |
400 | InvalidParameter.HandshakeId | The HandshakeId is invalid. | The error message returned because the value of the HandshakeId parameter is invalid. The value must start with h- followed by 16 characters. Valid characters include letters and digits. |
404 | EntityNotExists.Handshake | The specified handshake does not exist. | The error message returned because the invitation does not exist. Specify a valid invitation. |
409 | HandshakeStatusMismatch | The invitation is invalid. | The error message returned because the invitation is invalid. |
For a list of error codes, visit the API Error Center.