创建一个Fileset。
接口说明
-
CPFS 使用说明
仅支持 CPFS 2.2.0 及以上版本创建 Fileset。您可以在控制台文件系统详情页面查看版本信息。
单个 CPFS 文件系统最多支持创建 10 个 Fileset。
父目录必须是已存在的目录。
Fileset 路径支持的最大深度为 8 层,根目录/为 0 层。例如,Fileset 路径为/test/aaa/ccc/,则表示路径深度为 3 层。
不支持 Fileset 中嵌套 Fileset。即当父目录已指定为 Fileset,其子目录不支持指定为 Fileset。
Fileset 最多支持 100 万个文件,如果文件数量超过此上限,添加新文件会返回
no space错误信息。
-
CPFS 智算版使用说明
仅支持 CPFS 智算版 2.7.0 及以上版本创建 Fileset。您可以在控制台文件系统详情页面查看版本信息。
单个 CPFS 文件系统最多支持创建 500 个 Fileset。
Fileset 路径必须为新路径,不能为已存在路径,Fileset 路径不支持重命名,不支持路径为软链接。
Fileset 路径支持的最大深度为 8 层,根目录/为 0 层。例如,Fileset 路径为/test/aaa/ccc/,则表示路径深度为 3 层。
Fileset 路径为多层目录时,父目录必须是已存在的目录。
不支持在 Fileset 中嵌套 Fileset,即当父目录已指定为 Fileset,其子目录不支持指定为 Fileset。一个 Fileset 路径只支持一个配额。
Fileset 容量配额,最小起步 10 GiB,扩容单位为 1 GiB。
Fileset 最多支持 100 亿个文件或目录,最小起步 10000,扩容单位为 1。
修改目录配额时,设置的配额容量或文件数必须高于已使用容量或文件数。
配额的统计有 15 分钟的延迟,当前的实际使用量 15 分钟之后才会生效。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
nas:CreateFileset |
create |
*Fileset
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| FileSystemId |
string |
是 |
文件系统 ID。
|
bmcpfs-290w65p03ok64y***** |
| FileSystemPath |
string |
是 |
待创建的 Fileset 的绝对路径。
|
/test/ |
| DryRun |
boolean |
否 |
是否对此次创建请求执行预检。 预检操作会帮助您检查参数有效性、校验库存等,并不会实际创建实例,也不会产生费用。 取值:
|
false |
| DeletionProtection |
boolean |
否 |
实例释放保护属性,指定是否支持通过控制台或 API( DeleteFileset )释放实例。
说明
该属性只能限制手动释放操作,对系统释放操作不生效。 |
false |
| Description |
string |
否 |
Fileset 的描述信息。
|
内部事务目录 |
| ClientToken |
string |
否 |
保证请求幂等性,从您的客户端生成一个参数值,确保不同的请求间该参数值唯一。 ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多信息,请参见如何保证幂等性。 说明
若用户未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 可能不一样。 |
123e4567-e89b-12d3-a456-4266554***** |
| Quota |
object |
否 |
配额信息。 说明
仅 CPFS 智算版 2.7.0 及以上版本支持此参数。 |
|
| FileCountLimit |
integer |
否 |
配额文件数量限制。取值范围:
|
10000 |
| SizeLimit |
integer |
否 |
配额总容量限制。单位:Byte。 取值范围:
|
10737418240 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
98696EF0-1607-4E9D-B01D-F20930B6**** |
| FsetId |
string |
Fileset ID。 |
fset-1902718ea0ae**** |
示例
正常返回示例
JSON格式
{
"RequestId": "98696EF0-1607-4E9D-B01D-F20930B6****",
"FsetId": "fset-1902718ea0ae****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | IllegalCharacters | The parameter contains illegal characters. | 参数非法。 |
| 400 | MissingFileSystemId | FileSystemId is mandatory for this action. | 未指定FileSystemId参数。 |
| 400 | MissingFileSystemPath | FileSystemPath is mandatory for this action. | 缺少FileSystemPath参数。 |
| 400 | InvalidFilesystemType.NotSupport | This Api does not support this fileSystem type. | 当前接口不支持该类型文件系统。 |
| 400 | InvalidFilesystemVersion.NotSupport | This Api does not support this fileSystem version. | 当前接口不支持该版本文件系统。 |
| 400 | InvalidRequest | The request is invalid. | 请求无效。 |
| 400 | Quota.Invalid.Limit | Quota limit is invalid. | 无效的配额。 |
| 400 | Resource.Exceed.Limit | Resource exceed limit. | 资源数量超过限制。 |
| 400 | Resource.Check.Fail | Resource check failed. | 资源检查失败。 |
| 400 | Fileset.Path.Duplicate | Fileset path is duplicate. | Fileset路径已存在。 |
| 400 | Fileset.Path.Nested | Fileset path is nested. | Fileset路径存在嵌套。 |
| 400 | Fileset.Path.NotExist | Fileset.Path.Not.Exist. | Fileset父目录路径不存在。 |
| 400 | Fileset.Path.Exist | Fileset already exist. | Fileset路径已经存在。 |
| 403 | OperationDenied.AlreadyExists | The operation is denied due to IdirName already exists in parent path. | 创建的目录名在父目录中已存在。 |
| 403 | OperationDenied.TooManyFilesets | The operation is denied due to too many fileset in filesystem. | 文件系统的Fileset目录数量超过阈值。 |
| 403 | OperationDenied.TooManyDepths | The operation is denied due to Fileset path too deep. | Fileset目录路径深度超过阈值。 |
| 403 | OperationDenied.NestedDir | The operation is denied due to nested directory. | 目录存在嵌套导致无法创建自动更新配置。 |
| 403 | OperationDenied.DependencyViolation | The operation is denied due to dependancy violation. | 进行该操作的条件不满足。 |
| 403 | OperationDenied.FilesetNotSupported | The operation is not supported. | 该文件系统不支持Fileset。 |
| 404 | InvalidFileSystem.NotFound | The specified file system does not exist. | 指定的文件系统不存在。 |
| 404 | InvalidFileSystemPath.ParentNotFound | The specified parent path does not exist. | 指定的父目录不存在。 |
| 404 | InvalidFileSystemPath.NotDirectory | The specified idir parent path is not directory. | 指定的父目录不是目录。 |
| 404 | InvalidFileSystemPath.InvalidCharacters | The specified fileset path contains invalid characters. | 指定的Fileset路径包含非法字符。 |
| 404 | InvalidFilesetPath.InvalidParameter | Fileset path is invalid. | 指定的Fileset路径无效。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。