被邀请的阿里云账号调用AcceptHandshake接受邀请。
接口说明
被邀请的阿里云账号成功加入资源目录后,会成为资源目录的成员。资源目录默认使用被邀请的阿里云账号名称作为该成员的成员名称和账号名称。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
resourcemanager:AcceptHandshake |
update |
*Handshake
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| HandshakeId |
string |
是 |
邀请 ID。 您可以调用 ListHandshakesForAccount 获取邀请 ID。 本接口必须由被邀请的阿里云账号或其已授权的 RAM 用户调用,不能由邀请方的管理账号代为接受邀请 |
h-Ih8IuPfvV0t0**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| RequestId |
string |
请求 ID。 |
5828C836-3286-49A6-9006-15231BB19342 |
| Handshake |
object |
邀请信息。 |
|
| Status |
string |
邀请状态。取值:
|
Accepted |
| ExpireTime |
string |
邀请的过期时间(UTC 时间)。 |
2021-01-20T02:15:40Z |
| ResourceDirectoryId |
string |
资源目录 ID。 |
rd-3G**** |
| CreateTime |
string |
邀请的创建时间(UTC 时间)。 |
2021-01-06T02:15:40Z |
| Note |
string |
备注。 |
欢迎您加入 |
| TargetEntity |
string |
被邀请的阿里云账号 ID 或登录邮箱。 |
177242285274**** |
| MasterAccountId |
string |
资源目录的管理账号 ID。 |
151266687691**** |
| MasterAccountName |
string |
资源目录的管理账号名称。 |
CompanyA |
| ModifyTime |
string |
邀请的修改时间(UTC 时间)。 |
2021-01-06T02:16:40Z |
| TargetType |
string |
被邀请的阿里云账号类型。取值:
|
Account |
| HandshakeId |
string |
邀请 ID。 |
h-Ih8IuPfvV0t0**** |
示例
正常返回示例
JSON格式
{
"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": "欢迎您加入",
"TargetEntity": "177242285274****",
"MasterAccountId": "151266687691****",
"MasterAccountName": "CompanyA",
"ModifyTime": "2021-01-06T02:16:40Z",
"TargetType": "Account",
"HandshakeId": "h-Ih8IuPfvV0t0****"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | MissingParameter.HandshakeId | You must specify HandshakeId. | |
| 400 | InvalidParameter.HandshakeId | The HandshakeId is invalid. | 邀请ID无效,邀请ID应以“h-”开头+16位数字或英文字母。 |
| 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. | 资源目录不存在,请指定正确的资源目录。 |
| 409 | HandshakeStatusMismatch | The invitation is invalid. | 握手状态不匹配或邀请已失效。 |
| 409 | NotSupport.AccountInAnotherResourceDirectory | Your account is a management account for another resource directory or a member of another resource directory. | |
| 409 | Invalid.AccountType | The specified profile type of account is invalid. | 账号类型无效,请您使用企业类型账号。 |
| 409 | NotSupport.Account.RealNameType | Your account is not a real-name of enterprise type, so you cannot accept the invitation. | 您的账号非企业类型实名,无法接受邀请。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。