Invites an account to join a resource directory.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | InviteAccountToResourceDirectory |
The operation that you want to perform. Set the value to InviteAccountToResourceDirectory. |
TargetEntity | String | Yes | someone@example.com |
The ID or logon email address of the account that you want to invite. |
TargetType | String | Yes |
The type of the account. Valid values:
|
|
Note | String | No | Welcome |
The invitation note. The note can be up to 1,024 characters in length. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Handshake | Struct |
The information of the invitation. |
|
CreateTime | String | 2018-08-10T09:55:41Z |
The time when the invitation was created. |
ExpireTime | String | 2018-08-10T09:55:41Z |
The time when the invitation expires. |
HandshakeId | String | h-ycm4rp**** |
The ID of the invitation. |
MasterAccountId | String | 172841235500**** |
The ID of the enterprise management account of the resource directory. |
MasterAccountName | String | Alice |
The name of the enterprise management account of the resource directory. |
ModifyTime | String | 2018-08-10T09:55:41Z |
The time when the invitation was modified. |
Note | String | Welcome |
The invitation note. |
ResourceDirectoryId | String | rd-abcdef**** |
The ID of the resource directory. |
Status | String | Pending |
The status of the invitation. Valid values:
|
TargetEntity | String | someone@example.com |
The ID or logon email address of the invited account. |
TargetType | String |
The type of the account. Valid values:
|
|
RequestId | String | 9B34724D-54B0-4A51-B34D-4512372FE1BE |
The ID of the request. |
Examples
Sample requests
https://resource-manager.aliyuncs.com/?Action=InviteAccountToResourceDirectory
&TargetEntity=someone@example.com
&TargetType=Email
&<Common request parameters>
Sample success responses
XML
format
<InviteAccountToResourceDirectoryResponse>
<RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
<Handshake>
<HandshakeId>h-ycm4r****</HandshakeId>
<ResourceDirectoryId>rd-abcdef****</ResourceDirectoryId>
<MasterAccountId>172841235500****</MasterAccountId>
<MasterAccountName>Alice</MasterAccountName>
<TargetEntity>someone@example.com</TargetEntity>
<TargetType>Email</TargetType>
<Note>Welcom</Note>
<Status>Pending</Status>
<CreateTime>2018-08-10T09:55:41Z</CreateTime>
<ModifyTime>2018-08-10T09:55:41Z</ModifyTime>
<ExpireTime>2018-08-17T09:55:41Z7</ExpireTime>
</Handshake>
</InviteAccountToResourceDirectoryResponse>
JSON
format
{
"RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE",
"Handshake": {
"HandshakeId": "h-ycm4rp****",
"ResourceDirectoryId": "rd-abcdef****",
"MasterAccountId": "172841235500****",
"MasterAccountName": "Alice",
"TargetEntity": "someone@example.com",
"TargetType": "Email",
"Note": "Welcom",
"Status": "Pending",
"CreateTime": "2018-08-10T09:55:41Z",
"ModifyTime": "2018-08-10T09:55:41Z",
"ExpireTime": "2018-08-17T09:55:41Z7"
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter.TargetEntity | You must specify TargetEntity. | The error message returned because the TargetEntity parameter is not specified. Specify this parameter. |
400 | InvalidParameter.TargetEntity | The TargetEntity is invalid. | The error message returned because the value of the TargetEntity parameter is invalid. The value must be the ID or logon email address of an account. |
400 | MissingParameter.TargetType | You must specify TargetType. | The error message returned because the TargetType parameter is not specified. Specify this parameter. |
400 | InvalidParameter.TargetType | The TargetType is invalid. | The error message returned because the value of the TargetType parameter is invalid. The value must be the ID or logon email address of an account. |
400 | InvalidParameter.Note.Length | The length of the invitation note exceeds the limit. | The error message returned because the length of the invitation note has exceeded the upper limit. The note can be up to 1,024 characters in length. |
400 | InvalidParameter.Note | The Note is invalid. | The error message returned because the value of the Note parameter is invalid. |
409 | LimitExceeded.Account | The maximum number of member accounts in a resource directory exceeds the limit. | The error message returned because the maximum number of member accounts in the resource directory has been reached. |
409 | LimitExceeded.InvitationRate | The number of invitations sent exceeds the limit. | The error message returned because the maximum number of invitations you can send per day has been reached. A maximum of 20 invitations can be sent per day. |
409 | EntityAlreadyExists.Handshake | Handshakes with the same target entity already exist. | The error message returned because the invited account has a pending invitation. The owner of the invited account must process the invitation first. |
404 | EntityNotExists.ResourceDirectory | The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. | The error message returned because the resource directory for the account is not enabled. Enable the resource directory for the account. |
409 | NotSupport.AccountInAnotherResourceDirectory | The specified account is an Alibaba Cloud account or already exists in another resource directory. | The error message returned because the account is an enterprise management account or has joined another resource directory. |
409 | LegalEntityMismatch | Your account does not have the same legal entity as the enterprise management account. | The error message returned because the legal entity of the invited account differs from that of the current account. |
409 | Invalid.AccountType | The specified profile type of account is invalid. | The error message returned because the account type is invalid. Use an enterprise account. |
For a list of error codes, visit the API Error Center.