Creates a directory quota for a file system.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | SetDirQuota | The operation that you want to perform. Set the value to SetDirQuota. |
FileSystemId | String | Yes | 1ca404**** | The ID of the file system. |
Path | String | Yes | /data/sub1 | The absolute path of a directory. |
QuotaType | String | Yes | Accounting | The type of the quota. Valid values:
|
UserType | String | Yes | Uid | The type of the user. Valid values:
|
UserId | String | No | 500 | 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:
|
SizeLimit | Long | No | 1024 | Limits 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. |
FileCountLimit | Long | No | 10000 | Limits 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. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 5BC5CB97-9F28-42FE-84A4-0CD0DF42**** | The ID of the request. |
Success | Boolean | true | Indicates whether the call is successful. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=SetDirQuota
&FileSystemId=1ca404****
&Path=/data/sub1
&QuotaType=Accounting
&UserType=Uid
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<RequestId>94CA5264-2C30-4D83-865D-B1CF2BE2****</RequestId>
<Success>true</Success>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "94CA5264-2C30-4D83-865D-B1CF2BE2****",
"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. |
For a list of error codes, see Service error codes.