调用InviteAccountToResourceDirectory邀请外部账号加入资源目录。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| TargetEntity |
string |
是 |
被邀请账号 ID 或登录邮箱。 |
someone@example.com |
| TargetType |
string |
是 |
被邀请账号类型。取值:
|
|
| Note |
string |
否 |
备注。 最大长度为 1024 个字符。 |
欢迎您加入 |
| Tag |
array<object> |
否 |
标签。 |
|
|
object |
否 |
标签。 |
||
| Key |
string |
否 |
标签键。 |
k1 |
| Value |
string |
否 |
标签值。 |
v1 |
| ParentFolderId |
string |
否 |
父资源夹 ID。 |
r-b1**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| RequestId |
string |
请求 ID。 |
9B34724D-54B0-4A51-B34D-4512372FE1BE |
| Handshake |
object |
邀请信息。 |
|
| Status |
string |
邀请状态。取值:
|
Pending |
| ExpireTime |
string |
邀请的过期时间(UTC 时间)。 |
2018-08-24T09:55:41Z |
| ResourceDirectoryId |
string |
资源目录 ID。 |
rd-abcdef**** |
| CreateTime |
string |
邀请的创建时间(UTC 时间)。 |
2018-08-10T09:55:41Z |
| Note |
string |
备注。 |
欢迎您加入 |
| TargetEntity |
string |
被邀请账号 ID 或登录邮箱。 |
someone@example.com |
| MasterAccountId |
string |
资源目录管理账号 ID。 |
172841235500**** |
| MasterAccountName |
string |
资源目录管理账号名称。 |
Alice |
| ModifyTime |
string |
邀请的修改时间(UTC 时间)。 |
2018-08-10T09:55:41Z |
| TargetType |
string |
被邀请账号类型。取值:
|
|
| HandshakeId |
string |
邀请 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 |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | MissingParameter.TargetEntity | You must specify TargetEntity. | |
| 400 | InvalidParameter.TargetEntity | The TargetEntity is invalid. | |
| 400 | MissingParameter.TargetType | You must specify TargetType. | |
| 400 | InvalidParameter.TargetType | The TargetType is invalid. | |
| 400 | InvalidParameter.Note.Length | The length of the invitation note exceeds the limit. | |
| 400 | InvalidParameter.Note | The Note is invalid. | |
| 400 | InvalidParameter.ParentFolderId | The ParentFolderId is invalid. | |
| 400 | InvalidParameter.AccountId | The AccountId is invalid. | |
| 404 | EntityNotExists.ResourceDirectory | The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. | |
| 404 | EntityNotExists.Folder | The resource directory folder does not exist. | |
| 409 | LimitExceeded.Account | The maximum number of member accounts in a resource directory exceeds the limit. | |
| 409 | LimitExceeded.InvitationRate | The number of invitations sent exceeds the limit. | |
| 409 | EntityAlreadyExists.Handshake | Handshakes with the same target entity already exist. | |
| 409 | Invalid.AccountType | The specified profile type of account is invalid. | |
| 409 | EntityAlreadyExists.ResourceDir.Account | This resource directory account already exists. | |
| 409 | LimitExceeded.Invitation.InvalidTarget | The maximum number of invalid targets that can be invited by a single account is exceeded. | |
| 409 | NotSupport.AccountInAnotherResourceDirectory | The invited account already belongs to another resource directory. To continue, remove the account from the other resource directory. | |
| 409 | LegalEntityMismatch | The account does not have the same legal entity as the management account. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。