調用EnableResourceDirectory開通資源目錄。
接口說明
您可以使用當前登錄賬號或新創建管理賬號兩種方式開通資源目錄。更多信息,請參見開通資源目錄。
調試
您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
授權信息
當前API暫無授權信息透出。
請求參數
名稱 | 類型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
MAName | string | 否 | 新管理賬號名稱。 格式: | user01@rdadmin.aliyunid.com |
MASecureMobilePhone | string | 否 | 新創建管理賬號的安全手機號碼。 置空表示采用當前登錄賬號的安全手機號碼。該手機號碼必須與 SendVerificationCodeForEnableRD 中獲取驗證碼時使用的手機號碼一致。 格式: 說明
僅支持填寫 86-<手機號碼> 的中國內地手機號碼。
| xx-13900001234 |
VerificationCode | string | 否 | 驗證碼。 您可以調用 SendVerificationCodeForEnableRD 獲取驗證碼。 | 123456 |
EnableMode | string | 是 | 開通方式。取值:
| CurrentAccount |
DryRun | boolean | 否 | 是否只預檢此次請求。取值:
| false |
返回參數
示例
正常返回示例
JSON
格式
{
"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 status code | 錯誤碼 | 錯誤信息 | 描述 |
---|---|---|---|
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. | 賬號未設置企業名稱,請您先完成企業名稱設置。 |
409 | EnterpriseRealNameVerificationError | 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. | 賬號已開通資源目錄,請勿重復開通。 |
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. | 缺少安全信息。 |
409 | NotSupport.Account.Site | The caller is not a China site account, which is not supported. | 當前賬號所屬站點錯誤,請更換為中國站賬號。 |
409 | Invalid.AccountType | The specified profile type of account is invalid. | 賬號類型無效,請您使用企業類型賬號。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
變更時間 | 變更內容概要 | 操作 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2023-12-21 | OpenAPI 錯誤碼發生變更、OpenAPI 入參發生變更 | 看變更集 | ||||||||
|