Creates a directory quota for a file system.
Operation description
Only General-purpose NFS file systems support the directory quota feature.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
FileSystemId | string | Yes | The ID of the file system. | 1ca404**** |
Path | string | Yes | The absolute path of a directory. | /data/sub1 |
QuotaType | string | Yes | The type of the quota. Valid values:
| Accounting |
UserType | string | Yes | The type of the user. Valid values:
| Uid |
UserId | string | No | The UID or GID of the user for whom you want to set a directory quota. This parameter is required and valid only if the UserType parameter is set to Uid or Gid. Examples:
| 500 |
SizeLimit | long | No | The size of files that a user can create in the directory. Unit: GiB. If you set the QuotaType parameter to Enforcement, you must specify at least one of the SizeLimit and FileCountLimit parameters. | 1024 |
FileCountLimit | long | No | The number of files that a user can create in the directory. This number includes the number of files, subdirectories, and special files. If you set the QuotaType parameter to Enforcement, you must specify at least one of the SizeLimit and FileCountLimit parameters. | 10000 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "5BC5CB97-9F28-42FE-84A4-0CD0DF42****",
"Success": true
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
404 | InvalidParameter.DirPathNotExist | The Dir Path does not exist |
For a list of error codes, visit the Service error codes.