リソースディレクトリを有効化します。
操作説明
現在のアカウントまたは新しく作成したアカウントのいずれかを使用して、リソースディレクトリを有効化できます。詳細については、「リソースディレクトリの有効化」をご参照ください。
本例では、現在のアカウントを使用してリソースディレクトリを有効化します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
resourcemanager:EnableResourceDirectory |
create |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| MAName |
string |
任意 |
新しく作成するアカウントの名前です。 名前は |
user01@rdadmin.aliyunid.com |
| MASecureMobilePhone |
string |
任意 |
新しく作成するアカウントにバインドするモバイル電話番号です。 このパラメーターを空欄のままにした場合、現在のアカウントにバインドされているモバイル電話番号が使用されます。指定するモバイル電話番号は、検証コードを取得するために SendVerificationCodeForEnableRD 操作を呼び出す際に指定したものと一致している必要があります。 モバイル電話番号は 説明
中国本土における |
xx-13900001234 |
| VerificationCode |
string |
任意 |
検証コードです。 検証コードは、SendVerificationCodeForEnableRD 操作を呼び出して取得できます。 |
123456 |
| EnableMode |
string |
必須 |
リソースディレクトリを有効化するモードです。有効な値は以下のとおりです。
|
CurrentAccount |
共通リクエストパラメーターの詳細については、「共通パラメーター」をご参照ください。
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| ResourceDirectory |
object |
リソースディレクトリの情報です。 |
|
| ResourceDirectoryId |
string |
リソースディレクトリの ID です。 |
rd-54**** |
| MasterAccountId |
string |
管理アカウントの ID です。 |
507408460615**** |
| MasterAccountName |
string |
管理アカウントの名前です。 |
alice@example.com |
| RootFolderId |
string |
Root フォルダの ID です。 |
r-G9**** |
| CreateTime |
string |
リソースディレクトリが有効化された時刻です。 |
2021-12-08T02:15:31.744Z |
| RequestId |
string |
リクエストの ID です。 |
EC2FE94D-A4A2-51A1-A493-5C273A36C46A |
例
成功レスポンス
JSONJSON
{
"ResourceDirectory": {
"ResourceDirectoryId": "rd-54****",
"MasterAccountId": "507408460615****",
"MasterAccountName": "alice@example.com",
"RootFolderId": "r-G9****",
"CreateTime": "2021-12-08T02:15:31.744Z"
},
"RequestId": "EC2FE94D-A4A2-51A1-A493-5C273A36C46A"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 409 | NotSupport.AccountInAnotherResourceDirectory | The specified account is an Alibaba Cloud account or already exists in another resource directory. | |
| 409 | Invalid.EnterpriseName | You must specify the enterprise name. | You must specify the enterprise name. |
| 409 | EnterpriseRealNameVerificationError | The specified account does not pass enterprise real-name verification. We recommend you first complete enterprise real-name verification for the account. | The specified account does not pass enterprise real-name verification. We recommend you first complete enterprise real-name verification for the account. |
| 409 | EntityAlreadyExists.ResourceDirectory | The resource directory for the account is already enabled. We recommend that you do not enable the resource directory again. | The resource directory for the account is already enabled. We recommend that you do not enable the resource directory again. |
| 409 | InvalidParameter.ManagementAccountName.AlreadyUsed | The ManagementAccountName has been used. | |
| 409 | Invalid.VerificationCode | The verification code is invalid. | |
| 409 | InvalidParameter.ManagementAccountName | The management account name is in the wrong format. | |
| 409 | InvalidParameter.ManagementAccountSecurityInfo | The parameter management account secure mobile phone is invalid. | |
| 409 | MissingSecureMobilePhone | Secure mobile phone is missing. | |
| 409 | MissingSecurityInfo | Security info is missing. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。