アカウントをリソースディレクトリに招待します。
操作説明
このトピックでは、アカウント someone@example.com をリソースディレクトリに招待するための API オペレーションの呼び出し例について説明します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
resourcemanager:InviteAccountToResourceDirectory |
create |
*Handshake
*Folder
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| TargetEntity |
string |
必須 |
招待対象のアカウントの ID またはログイン用メールアドレスです。 |
someone@example.com |
| TargetType |
string |
必須 |
招待対象のアカウントの種別です。有効な値は以下のとおりです。
|
|
| Note |
string |
任意 |
招待に対するコメントです。 コメントは最大 1,024 文字まで入力できます。 |
欢迎您加入 |
| Tag |
array<object> |
任意 |
タグキーおよびタグ値です。 |
|
|
object |
任意 |
タグキーおよびタグ値です。 |
||
| Key |
string |
任意 |
タグキーです。 |
k1 |
| Value |
string |
任意 |
タグ値です。 |
v1 |
共通リクエストパラメーターの詳細については、「共通パラメーター」をご参照ください。
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
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**** |
例
成功レスポンス
JSONJSON
{
"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 ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 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. | |
| 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 resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. |
| 409 | LimitExceeded.Account | The maximum number of member accounts in a resource directory exceeds the limit. | 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 | NotSupport.AccountInAnotherResourceDirectory | Your account is a management account for another resource directory or a member of another resource directory. | |
| 409 | LegalEntityMismatch | Your account does not have the same legal entity as the master account. | |
| 409 | Invalid.AccountType | The specified profile type of account is invalid. | The specified AccountType is invalid. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。