All Products
Search
Document Center

Cloud Parallel File Storage:CreateFileset

Last Updated:Jan 26, 2026

Creates a fileset.

Operation description

  • CPFS usage notes

    • Only CPFS V2.2.0 and later support fileset creation. You can view the version information on the file system details page in the console.
    • A maximum of 10 filesets can be created for a CPFS file system.
    • The parent directory must be an existing directory.
    • The maximum depth supported by a fileset path is eight levels. The depth of the root directory / is 0 levels. For example, the fileset path /test/aaa/ccc/ has three levels.
    • Nested filesets are not supported. If a fileset is specified as a parent directory, its subdirectory cannot be a fileset.
    • A fileset supports a maximum of one million files. If the number of files exceeds the upper limit, the no space error message is returned when you add new files.
  • CPFS for Lingjun usage notes

    • Only CPFS for Lingjun V2.7.0 and later support this operation. You can view the version information on the file system details page in the console.
    • A maximum of 500 filesets can be created for a CPFS file system.
    • The fileset path must be a new path and cannot be an existing path. Fileset paths cannot be renamed and cannot be symbolic links.
    • The maximum depth supported by a fileset path is eight levels. The depth of the root directory / is 0 levels. For example, the fileset path /test/aaa/ccc/ has three levels.
    • If the fileset path is a multi-level path, the parent directory must be an existing directory.
    • Nested filesets are not supported. If a fileset is specified as a parent directory, its subdirectory cannot be a fileset. A fileset path supports only one quota.
    • The minimum capacity quota of a fileset is 10 GiB. The scaling step size is 1 GiB.
    • A fileset supports a minimum of 10,000 files or directories and a maximum of 10 billion files or directories. The scaling step size is 1.
    • When you modify a directory quota, you must set the quota capacity or the number of files to be greater than the capacity or file quantity that has been used.
    • The quota statistics have a 15-minute latency. The actual usage takes effect after 15 minutes.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
nas:CreateFilesetcreate
*Fileset
acs:nas:{#regionId}:{#accountId}:filesystem/{#filesystemId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
FileSystemIdstringYes

The ID of the file system.

  • The IDs of CPFS file systems must start with cpfs-. Example: cpfs-099394bd928c****.
  • The IDs of CPFS for Lingjun file systems must start with bmcpfs-. Example: bmcpfs-290w65p03ok64ya****.
bmcpfs-290w65p03ok64ya****
FileSystemPathstringYes

The absolute path of the fileset.

  • CPFS path limits.

    • The parent directory of the path that you specify must be an existing directory in the file system.
    • The path must be 2 to 1024 characters in length.
    • The path must start and end with a forward slash (/).
  • Path limit of CPFS for Lingjun

    • The path must be 2 to 1024 characters in length.
    • The path must start and end with a forward slash (/).
    • The fileset path must be a new path and cannot be an existing path. Fileset paths cannot be renamed and cannot be symbolic links.
    • The maximum depth supported by a fileset path is eight levels. The depth of the root directory / is 0 levels. For example, the fileset path /test/aaa/ccc/ has three levels.
    • If the fileset path is a multi-level path, the parent directory must be an existing directory.
    • Nested filesets are not supported. If a fileset is specified as a parent directory, its subdirectory cannot be a fileset. A fileset path supports only one quota.
    • The path cannot exceed 990 characters in length.
/test/
DryRunbooleanNo

Specifies whether to perform a dry run.

During the dry run, the system checks whether the request parameters are valid and whether the requested resources are available. During the dry run, no fileset is created and no fee is incurred.

Valid value:

  • true: performs a dry run. The system checks the required parameters, request syntax, service limits, and available Apsara File Storage NAS (NAS) resources. Otherwise, an error message is returned. If the request passes the dry run, the HTTP status code 200 is returned. No value is returned for the FsetId parameter.
  • false (default): performs a dry run and sends the request. If the request passes the dry run, a fileset is created.
false
DeletionProtectionbooleanNo

Specifies whether to enable deletion protection to allow you to release the fileset by using the console or by calling the DeleteFileset operation.

  • true: enables release protection.
  • false (default): disables release protection.
Note This parameter can protect filesets only against manual releases, but not against automatic releases.
false
DescriptionstringNo

The description of the fileset.

  • The description must be 2 to 128 characters in length.
  • The name must start with a letter and cannot start with http:// or https://.
  • The description can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).
test
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests.

The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
123e4567-e89b-12d3-a456-42665544****
QuotaobjectNo

The quota information.

Note Only CPFS for Lingjun V2.7.0 and later support this parameter.
FileCountLimitlongNo

The file quantity quota. Valid values:

  • Minimum value: 100000.
  • Maximum value: 10000000000.
10000
SizeLimitlongNo

The total quota capacity limit. Unit: bytes.

Valid values:

  • Minimum value: 10,737,418,240 (10 GiB).
  • Step size: 1073741824 (1 GiB).
10737418240

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

Request ID.

98696EF0-1607-4E9D-B01D-F20930B6****
FsetIdstring

The fileset ID.

fset-1902718ea0ae****

Examples

Sample success responses

JSONformat

{
  "RequestId": "98696EF0-1607-4E9D-B01D-F20930B6****",
  "FsetId": "fset-1902718ea0ae****"
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalCharactersThe parameter contains illegal characters.The parameter contains illegal characters.
400MissingFileSystemIdFileSystemId is mandatory for this action.-
400MissingFileSystemPathFileSystemPath is mandatory for this action.-
400InvalidFilesystemType.NotSupportThis Api does not support this fileSystem type.The current interface does not support this type of file system.
400InvalidFilesystemVersion.NotSupportThis Api does not support this fileSystem version.This Api does not support this fileSystem version.
400InvalidRequestThe request is invalid.Invalid request
400Quota.Invalid.LimitQuota limit is invalid.Invalid quota.
400Resource.Exceed.LimitResource exceed limit.The number of resources exceeds the limit.
400Resource.Check.FailResource check failed.-
400Fileset.Path.DuplicateFileset path is duplicate.Fileset path is duplicate.
400Fileset.Path.NestedFileset path is nested.Fileset path is nested.
400Fileset.Path.NotExistFileset.Path.Not.Exist.Fileset parent directory path does not exist.
400Fileset.Path.ExistFileset already exist.Fileset path already exists.
403OperationDenied.AlreadyExistsThe operation is denied due to IdirName already exists in parent path.-
403OperationDenied.TooManyFilesetsThe operation is denied due to too many fileset in filesystem.-
403OperationDenied.TooManyDepthsThe operation is denied due to Fileset path too deep.-
403OperationDenied.NestedDirThe operation is denied due to nested directory.-
403OperationDenied.DependencyViolationThe operation is denied due to dependancy violation.-
403OperationDenied.FilesetNotSupportedThe operation is not supported.-
404InvalidFileSystem.NotFoundThe specified file system does not exist.The specified file system does not exist.
404InvalidFileSystemPath.ParentNotFoundThe specified parent path does not exist.-
404InvalidFileSystemPath.NotDirectoryThe specified idir parent path is not directory.-
404InvalidFileSystemPath.InvalidCharactersThe specified fileset path contains invalid characters.-
404InvalidFilesetPath.InvalidParameterFileset path is invalid.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-10-24The Error code has changed. The request parameters of the API has changedView Change Details
2024-05-31The Error code has changed. The request parameters of the API has changedView Change Details
2023-04-24The Error code has changedView Change Details