全部产品
Search
文档中心

资源管理:AcceptHandshake - 接受邀请

更新时间:Sep 10, 2026

被邀请的阿里云账号调用AcceptHandshake接受邀请。

接口说明

被邀请的阿里云账号成功加入资源目录后,会成为资源目录的成员。资源目录默认使用被邀请的阿里云账号名称作为该成员的成员名称和账号名称。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

resourcemanager:AcceptHandshake

update

*Handshake

acs:resourcemanager::{#accountId}:handshake/{#HandshakeId}

无 无

请求参数

名称

类型

必填

描述

示例值

HandshakeId

string

是

邀请 ID。

您可以调用 ListHandshakesForAccount 获取邀请 ID。

本接口必须由被邀请的阿里云账号或其已授权的 RAM 用户调用,不能由邀请方的管理账号代为接受邀请

h-Ih8IuPfvV0t0****

返回参数

名称

类型

描述

示例值

object

返回结果。

RequestId

string

请求 ID。

5828C836-3286-49A6-9006-15231BB19342

Handshake

object

邀请信息。

Status

string

邀请状态。取值:

  • Pending:等待确认。

  • Accepted:已接受。

  • Cancelled:已取消。

  • Declined:已拒绝。

  • Expired:超时。

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:阿里云账号 ID。

  • Email:阿里云账号登录邮箱。

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. 您的账号非企业类型实名,无法接受邀请。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情。