全部產品
Search
文件中心

Resource Management:EnableResourceDirectory - 開通資來源目錄

更新時間:Dec 21, 2025

調用EnableResourceDirectory開通資來源目錄。

介面說明

您可以使用當前登入帳號或新建立管理帳號兩種方式開通資來源目錄。更多資訊,請參見開通資來源目錄

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

MAName

string

新管理帳號名稱。

格式:<首碼>@rdadmin.aliyunid.com。其中,<首碼>允許輸入英文字母、數字、特殊字元_.-,且必須以英文字母或數字開頭和結尾,不能輸入連續特殊字元。<首碼>的長度為 2~50 個字元。

user01@rdadmin.aliyunid.com

MASecureMobilePhone

string

新建立管理帳號的安全手機號碼。

置空表示採用當前登入帳號的安全手機號碼。該手機號碼必須與 SendVerificationCodeForEnableRD 中擷取驗證碼時使用的手機號碼一致。

格式:<國家碼>-<手機號碼>

說明

不支援填寫86-<手機號碼>的中國內地手機號碼。

xx-13900001234

VerificationCode

string

驗證碼。

您可以調用 SendVerificationCodeForEnableRD 擷取驗證碼。

123456

EnableMode

string

開通方式。取值:

  • CurrentAccount:使用當前登入帳號開通資來源目錄。

  • NewManagementAccount:新建立管理帳號開通資來源目錄。該方式下,您需要配置MANameMASecureMobilePhoneVerificationCode

CurrentAccount

DryRun

boolean

是否只預檢此次請求。取值:

  • true:開通資來源目錄檢查,不會實際開通資來源目錄。

  • false(預設值):開通資來源目錄。

false

返回參數

名稱

類型

描述

樣本值

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

樣本

正常返回樣本

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.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情