Sets a directory quota for a file system.
Operation description
Only General-purpose NAS file systems support the directory quota feature.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:SetDirQuota |
create |
*FileSystem
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileSystemId |
string |
Yes |
The file system ID. |
1ca404**** |
| Path |
string |
Yes |
The absolute path of the directory in the file system. Note
|
/data/sub1 |
| QuotaType |
string |
Yes |
The quota type. Valid values:
Valid values:
|
Accounting |
| UserType |
string |
Yes |
The user type. Valid values:
Valid values:
|
Uid |
| UserId |
string |
No |
The UID or GID to restrict. This parameter is required and valid only when UserType is set to Uid or Gid. Examples:
|
500 |
| SizeLimit |
integer |
No |
The total capacity limit for files in the directory. Unit: GiB. When QuotaType is set to Enforcement, you must specify at least one of SizeLimit and FileCountLimit. |
1024 |
| FileCountLimit |
integer |
No |
The maximum number of files in the directory. This includes files, directories, and special files. When QuotaType is set to Enforcement, you must specify at least one of SizeLimit and FileCountLimit. |
10000 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
5BC5CB97-9F28-42FE-84A4-0CD0DF42**** |
| Success |
boolean |
The request status. Valid values:
|
true |
Examples
Success response
JSON format
{
"RequestId": "5BC5CB97-9F28-42FE-84A4-0CD0DF42****",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | InvalidParameter.DirPathNotExist | The Dir Path does not exist | The directory path does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.