You need to enable JavaScript to run this app.
文档中心
弹性文件存储

弹性文件存储

复制全文
下载 pdf
目录配额
CreateQuota - 创建目录配额
复制全文
下载 pdf
CreateQuota - 创建目录配额
调用 CreateQuota 接口创建目录配额。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:CreateQuota​
要执行的操作,取值:CreateQuota。​
​
Version string 必选 示例值:2025-01-01​
API的版本,取值:2025-01-01。​
​
FileSystemId string 必选 示例值:efs-cncqb627aa118****​
文件系统 ID。​
​
FileSystemPath string 必选 示例值:/path_test​
文件系统路径。​
​
QuotaType string 必选 示例值:DirQuota​
配额类型,仅支持取值为DirQuota,表示目录配额。​
​
LimitType string 必选 示例值:Accounting​
限制类型。取值说明如下:​
  • Accounting:统计型​
  • Enforcement:限制型​
​
UserType string 可选 示例值:AllUsers​
用户类型,仅支持取值为AllUsers,表示所有用户。​
​
CapacityLimit long 可选 示例值:100000​
容量限制,单位为 MiB。​
  • 当LimitType取值为Enforcement时,CapacityLimit与InodeLimit需至少填一项。​
  • 当LimitType取值为Accounting时,无需填写该参数。​
​
InodeLimit long 可选 示例值:200000​
文件数限制。​
  • 当LimitType取值为Enforcement时,CapacityLimit与InodeLimit需至少填一项。​
  • 当LimitType取值为Accounting时,无需填写该参数。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
QuotaId string 示例值:dq-c06d****​
目录配额 ID。​
​
​
​
请求示例​
​
POST /?Action=CreateQuota&Version=2025-01-01 HTTP/1.1​
Host: efs.cn-beijing.volcengineapi.com​
Content-Type: application/json; charset=UTF-8​
X-Date: 20260121T094957Z​
X-Content-Sha256: 287e874e******d653b44d21e​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260121/cn-beijing/efs/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
{​
"FileSystemId": "efs-cncqb627aa118****",​
"FileSystemPath": "/path_test",​
"QuotaType": "DirQuota",​
"LimitType": "Accounting",​
"UserType": "AllUsers",​
"CapacityLimit": 100000,​
"InodeLimit": 200000​
}​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2026011616344107513914516584****",​
"Action": "CreateQuota",​
"Version": "2025-01-01",​
"Service": "efs",​
"Region": "cn-beijing"​
},​
"Result": {​
"QuotaId": "dq-c06d****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidParameter.FileSystemPath​
The specified parameter FileSystemPath is invalid.​
参数 FileSystemPath 无效。​
400​
InvalidParameter.QuotaType​
The specified parameter QuotaType is invalid.​
参数 QuotaType 无效。​
400​
InvalidParameter.UserType​
The specified parameter UserType is invalid.​
参数 UserType 不合法​
400​
InvalidParameter.FileCountLimit​
The specified parameter FileCountLimit is invalid.​
参数 FileCountLimit 无效。​
400​
InvalidParameter.SizeLimit​
The specified parameter SizeLimit is invalid.​
参数 SizeLimit 无效。​
400​
InvalidParameter.LimitType​
The specified parameter LimitType is invalid.​
参数 LimitType 无效。​
403​
AlreadyExist.DirQuota​
The specified dir quota is already exist.​
参数 DirQuota 已存在。​
404​
NotFound.FileSystem​
The specified FileSystem is not exist or has been deleted.​
文件系统不存在或已删除。​
404​
NotFound.Path​
The specified parameter Path is not exist.​
参数 Path 不存在。​
500​
InternalError​
An internal error has occurred.​
内部错误。​
​
​
最近更新时间:2026.02.05 17:54:00
这个页面对您有帮助吗?
有用
有用
无用
无用