Accepts an invitation.
Operation description
After an invited Alibaba Cloud account joins a resource directory, it becomes a member of the resource directory. By default, the name of the invited Alibaba Cloud account is used as the display name of the account in the resource directory.
This topic provides an example on how to call the API operation to accept the invitation h-Ih8IuPfvV0t0****
that is initiated to invite the Alibaba Cloud account 177242285274****
to join the resource directory rd-3G****
.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
resourcemanager:AcceptHandshake | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
HandshakeId | string | Yes | The ID of the invitation. You can call the ListHandshakesForAccount operation to obtain the ID. | h-Ih8IuPfvV0t0**** |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "5828C836-3286-49A6-9006-15231BB19342",
"Handshake": {
"Status": "Accepted",
"ExpireTime": "2021-01-20T02:15:40Z",
"ResourceDirectoryId": "rd-3G****",
"CreateTime": "2021-01-06T02:15:40Z",
"Note": "Welcome",
"TargetEntity": "177242285274****",
"MasterAccountId": "151266687691****",
"MasterAccountName": "CompanyA",
"ModifyTime": "2021-01-06T02:16:40Z",
"TargetType": "Account",
"HandshakeId": "h-Ih8IuPfvV0t0****"
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter.HandshakeId | You must specify HandshakeId. | - |
400 | InvalidParameter.HandshakeId | The HandshakeId is invalid. | - |
404 | EntityNotExists.Handshake | The specified handshake does not exist. | - |
404 | SpecifiedResourceDirectoryNotExists | The specified resource directory does not exist. You must specify a valid resource directory. | The specified resource directory does not exist. You must specify a valid resource directory. |
409 | HandshakeStatusMismatch | The invitation is invalid. | The invitation is invalid. |
409 | NotSupport.AccountInAnotherResourceDirectory | Your account is a management account for another resource directory or a member of another resource directory. | Your account is the management account or a member of another resource directory. |
409 | Invalid.AccountType | The specified profile type of account is invalid. | The specified AccountType is invalid. |
409 | NotSupport.Account.RealNameType | Your account is not a real-name of enterprise type, so you cannot accept the invitation. | You cannot accept the invitation because your account has not passed enterprise real-name verification. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|