调用CreateFolder创建资源夹。
接口说明
最多支持创建 5 级资源夹。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ParentFolderId |
string |
否 |
父资源夹 ID。 |
r-b1**** |
| FolderName |
string |
是 |
资源夹名称。 长度为 1~24 个字符或汉字,可包含汉字、英文字母、数字、下划线(_)、半角句号(.)和短划线(-)。 |
rdFolder |
| Tag |
array<object> |
否 |
资源夹的标签。 |
|
|
object |
否 |
资源夹的标签。 |
||
| Key |
string |
否 |
标签键。 |
k1 |
| Value |
string |
否 |
标签值。 |
v1 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| Folder |
object |
资源夹信息。 |
|
| CreateTime |
string |
资源夹创建时间。 |
2019-02-19T09:34:50.757Z |
| FolderId |
string |
资源夹 ID。 |
fd-u8B321**** |
| FolderName |
string |
资源夹名称。 |
rdFolder |
| ParentFolderId |
string |
父资源夹 ID。 |
r-b1**** |
| RequestId |
string |
请求 ID。 |
C2CBCA30-C8DD-423E-B4AD-4FB694C9180C |
示例
正常返回示例
JSON格式
{
"Folder": {
"CreateTime": "2019-02-19T09:34:50.757Z",
"FolderId": "fd-u8B321****",
"FolderName": "rdFolder",
"ParentFolderId": "r-b1****"
},
"RequestId": "C2CBCA30-C8DD-423E-B4AD-4FB694C9180C"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.ParentFolderId | The ParentFolderId is invalid. | |
| 400 | MissingParameter.Folder.Name | You must specify the resource folder name. | |
| 400 | InvalidParameter.Folder.Name | The Name of folder is invalid. | |
| 400 | InvalidParameter.Folder.Name.Length | The Name of folder exceeds the length limit. | |
| 400 | InvalidParameter.Folder.Name.AlreadyUsed | The name already exists under the same parent. Please change to another name. | |
| 404 | EntityNotExists.ResourceDirectory | The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. | |
| 404 | EntityNotExists.Folder | The resource directory folder does not exist. | |
| 409 | LimitExceeded.Folder.Depth | The folder depth exceeds the limit of 5. | |
| 409 | QuotaExceeded.Folder.Count | The number of folders exceeds the quota. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。