文档

InviteAccountToResourceDirectory - 邀请外部账号加入资源目录

更新时间:

调用InviteAccountToResourceDirectory邀请外部账号加入资源目录。

调试

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

调试

授权信息

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

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

请求参数

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

被邀请账号 ID 或登录邮箱。

someone@example.com
TargetTypestring

被邀请账号类型。取值:

  • Account:账号 ID。
  • Email:账号登录邮箱。
Email
Notestring

备注。

最大长度为 1024 个字符。

欢迎您加入
Tagobject []

标签。

Keystring

标签键。

k1
Valuestring

标签值。

v1
ParentFolderIdstring

父资源夹 ID。

r-b1****

返回参数

名称类型描述示例值
object

返回结果。

RequestIdstring

请求 ID。

9B34724D-54B0-4A51-B34D-4512372FE1BE
Handshakeobject

邀请信息。

Statusstring

邀请状态。取值:

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

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

2018-08-24T09:55:41Z
ResourceDirectoryIdstring

资源目录 ID。

rd-abcdef****
CreateTimestring

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

2018-08-10T09:55:41Z
Notestring

备注。

欢迎您加入
TargetEntitystring

被邀请账号 ID 或登录邮箱。

someone@example.com
MasterAccountIdstring

资源目录管理账号 ID。

172841235500****
MasterAccountNamestring

资源目录管理账号名称。

Alice
ModifyTimestring

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

2018-08-10T09:55:41Z
TargetTypestring

被邀请账号类型。取值:

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

邀请 ID。

h-ycm4rp****

示例

正常返回示例

JSON格式

{
  "RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE",
  "Handshake": {
    "Status": "Pending",
    "ExpireTime": "2018-08-24T09:55:41Z",
    "ResourceDirectoryId": "rd-abcdef****",
    "CreateTime": "2018-08-10T09:55:41Z",
    "Note": "欢迎您加入",
    "TargetEntity": "someone@example.com",
    "MasterAccountId": "172841235500****",
    "MasterAccountName": "Alice",
    "ModifyTime": "2018-08-10T09:55:41Z",
    "TargetType": "Email",
    "HandshakeId": "h-ycm4rp****"
  }
}

错误码

HTTP status code错误码错误信息描述
400MissingParameter.TargetEntityYou must specify TargetEntity.邀请方信息缺失,请指定目标实体。
400InvalidParameter.TargetEntityThe TargetEntity is invalid.目标实体无效,请指定账号UID/账号登录邮箱。
400MissingParameter.TargetTypeYou must specify TargetType.邀请类型缺失,请指定目标类型。
400InvalidParameter.TargetTypeThe TargetType is invalid.邀请类型无效,请指定账号UID/账号登录邮箱。
400InvalidParameter.Note.LengthThe length of the invitation note exceeds the limit.邀请备注长度超出限制,最多不能超过1024个字符或汉字。
400InvalidParameter.NoteThe Note is invalid.Note无效。
400InvalidParameter.ParentFolderIdThe ParentFolderId is invalid.父资源夹ID无效,资源夹ID应以“r-”开头+6位数字或英文字母或以“fd-”开头+10位数字或英文字母。
400InvalidParameter.AccountIdThe AccountId is invalid.成员ID无效,请输入16位账号ID。
404EntityNotExists.ResourceDirectoryThe resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account.当前账号未启用资源目录,请先启用资源目录。
404EntityNotExists.FolderThe resource directory folder does not exist.资源夹不存在,请先创建资源夹。
409LimitExceeded.AccountThe maximum number of member accounts in a resource directory exceeds the limit.资源目录中的成员数量超出限制。
409LimitExceeded.InvitationRateThe number of invitations sent exceeds the limit.发送邀请数量超出限制,每日最多只能发送20条邀请。
409EntityAlreadyExists.HandshakeHandshakes with the same target entity already exist.被邀请方已存在邀请记录,请先处理邀请。
409Invalid.AccountTypeThe specified profile type of account is invalid.账号类型无效,请您使用企业类型账号。
409EntityAlreadyExists.ResourceDir.AccountThis resource directory account already exists.创建成员时系统生成的邮箱已被占用,请重试。
409LimitExceeded.Invitation.InvalidTargetThe maximum number of invalid targets that can be invited by a single account is exceeded.同一账号邀请无效目标数量超过限制。
409NotSupport.AccountInAnotherResourceDirectoryThe invited account already belongs to another resource directory. To continue, remove the account from the other resource directory.被邀请账号已归属其他资源目录,如需继续请先将此账号从其他资源目录中移除。
409LegalEntityMismatchThe account does not have the same legal entity as the management account.被邀请账号与资源目录管理账号的实名信息不一致。

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

变更历史

变更时间变更内容概要操作
2023-12-08OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 409 变更
    删除错误码:400
    删除错误码:404
2023-10-25OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 409 变更
    删除错误码:400
    删除错误码:404
2023-09-04OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 409 变更
    删除错误码:400
    删除错误码:404
2023-05-24OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    错误码 409 变更
    删除错误码:404
2023-04-28OpenAPI 错误码发生变更、OpenAPI 入参发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    错误码 404 变更
    删除错误码:409
入参OpenAPI 入参发生变更
    新增入参:ParentFolderId
  • 本页导读 (1)
文档反馈