All Products
Search
Document Center

Resource Management:CreateFolder

Last Updated:Aug 25, 2026

Creates a folder.

Operation description

A maximum of five levels of folders can be created under the Root folder.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ParentFolderId

string

No

The ID of the parent folder.

r-b1****

FolderName

string

Yes

The name of the folder.

The name must be 1 to 24 characters in length and can contain Chinese characters, letters, digits, underscores (_), periods (.),and hyphens (-).

rdFolder

Tag

array<object>

No

The tag to add to the folder.

object

No

The tag to add to the folder.

Key

string

No

The tag key.

k1

Value

string

No

The tag value.

v1

Response elements

Element

Type

Description

Example

object

The returned result.

Folder

object

The information about the folder.

CreateTime

string

The time when the folder was created.

2019-02-19T09:34:50.757Z

FolderId

string

The ID of the folder.

fd-u8B321****

FolderName

string

The name of the folder.

rdFolder

ParentFolderId

string

The ID of the parent folder.

r-b1****

RequestId

string

The ID of the request.

C2CBCA30-C8DD-423E-B4AD-4FB694C9180C

Examples

Success response

JSON format

{
  "Folder": {
    "CreateTime": "2019-02-19T09:34:50.757Z",
    "FolderId": "fd-u8B321****",
    "FolderName": "rdFolder",
    "ParentFolderId": "r-b1****"
  },
  "RequestId": "C2CBCA30-C8DD-423E-B4AD-4FB694C9180C"
}

Error codes

HTTP status code

Error code

Error message

Description

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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.