全部产品
Search
文档中心

资源管理:AcceptHandshake - 被邀请的阿里云账号接受邀请

更新时间:Apr 24, 2024

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

接口说明

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

本文将提供一个示例,被邀请的阿里云账号177242285274****接受来自资源目录rd-3G****的邀请,邀请 ID 是h-Ih8IuPfvV0t0****

调试

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

授权信息

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

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
resourcemanager:AcceptHandshakeWrite
  • Handshake
    acs:resourcemanager:*:{#accountId}:handshake/{#HandshakeId}

请求参数

名称类型必填描述示例值
HandshakeIdstring

邀请 ID。

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

h-Ih8IuPfvV0t0****

返回参数

名称类型描述示例值
object

返回参数。

RequestIdstring

请求 ID。

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

邀请信息。

Statusstring

邀请状态。取值:

  • Pending:等待确认。
  • Accepted:已接受。
  • Cancelled:已取消。
  • Declined:已拒绝。
  • Expired:超时。
Accepted
ExpireTimestring

邀请的过期时间(UTC 时间)。

2021-01-20T02:15:40Z
ResourceDirectoryIdstring

资源目录 ID。

rd-3G****
CreateTimestring

邀请的创建时间(UTC 时间)。

2021-01-06T02:15:40Z
Notestring

备注。

欢迎您加入
TargetEntitystring

被邀请的阿里云账号 ID 或登录邮箱。

177242285274****
MasterAccountIdstring

资源目录的管理账号 ID。

151266687691****
MasterAccountNamestring

资源目录的管理账号名称。

CompanyA
ModifyTimestring

邀请的修改时间(UTC 时间)。

2021-01-06T02:16:40Z
TargetTypestring

被邀请的阿里云账号类型。取值:

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

邀请 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错误码错误信息描述
400MissingParameter.HandshakeIdYou must specify HandshakeId.邀请ID缺失,请指定目标ID。
400InvalidParameter.HandshakeIdThe HandshakeId is invalid.邀请ID无效,邀请ID应以“h-”开头+16位数字或英文字母。
404EntityNotExists.HandshakeThe specified handshake does not exist.邀请不存在,请指定正确的邀请。
404SpecifiedResourceDirectoryNotExistsThe specified resource directory does not exist. You must specify a valid resource directory.资源目录不存在,请指定正确的资源目录。
409HandshakeStatusMismatchThe invitation is invalid.握手状态不匹配或邀请已失效。
409NotSupport.AccountInAnotherResourceDirectoryYour account is a management account for another resource directory or a member of another resource directory.您的账号是另一个资源目录的管理账号或是另一个资源目录内的成员。
409Invalid.AccountTypeThe specified profile type of account is invalid.账号类型无效,请您使用企业类型账号。
409NotSupport.Account.RealNameTypeYour account is not a real-name of enterprise type, so you cannot accept the invitation.您的账号非企业类型实名,无法接受邀请。

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

变更历史

变更时间变更内容概要操作
暂无变更历史