调用InitResourceDirectory开通资源目录。开通资源目录后,系统会为您创建一个Root资源夹,并将当前账号设置为企业管理账号。该企业管理账号具有管理资源目录的所有权限。
接口说明
说明
请使用经过企业实名认证的账号开通资源目录。个人实名认证账号不能开通资源目录。
建议您将企业管理账号仅作为资源目录的管理员,不建议您在企业管理账号下订购云产品资源。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
resourcemanager:InitResourceDirectory |
create |
*ResourceDirectory
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
CD76D376-2517-4924-92C5-DBC52262F93A |
| ResourceDirectory |
object |
资源目录信息。 |
|
| CreateTime |
string |
资源目录开通时间,采用 RFC 3339 UTC 时间格式,以 Z 表示 UTC。 |
2019-02-18T15:32:10.473Z |
| MasterAccountId |
string |
企业管理账号 ID。 |
172841235500**** |
| MasterAccountName |
string |
企业管理账号名称。 |
aliyun-**** |
| ResourceDirectoryId |
string |
资源目录 ID。 |
rd-Ss**** |
| RootFolderId |
string |
Root 资源夹 ID。 |
r-Zo**** |
示例
正常返回示例
JSON格式
{
"RequestId": "CD76D376-2517-4924-92C5-DBC52262F93A",
"ResourceDirectory": {
"CreateTime": "2019-02-18T15:32:10.473Z",
"MasterAccountId": "172841235500****",
"MasterAccountName": "aliyun-****",
"ResourceDirectoryId": "rd-Ss****",
"RootFolderId": "r-Zo****"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 409 | NotSupport.AccountInAnotherResourceDirectory | The specified account is an Alibaba Cloud account or already exists in another resource directory. | |
| 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 | Invalid.AccountType | The specified profile type of account is invalid. | 账号类型无效,请您使用企业类型账号。 |
| 409 | Invalid.EnterpriseName | You must specify the enterprise name. | 账号未设置企业名称,请您先完成企业名称设置。 |
| 409 | NotSupport.Account.Site | The caller is not a China site account, which is not supported. | 当前账号所属站点错误,请更换为中国站账号。 |
| 409 | EntityAlreadyExists.ResourceDirectory | The resource directory for the account is already enabled. We recommend that you do not enable the resource directory again. | 账号已开通资源目录,请勿重复开通。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?