Queries directory quota details 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:DescribeDirQuotas |
list |
*FileSystem
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileSystemId |
string |
Yes |
The ID of the file system. |
1ca404**** |
| Path |
string |
No |
The absolute path of a directory. If not specified, all directories with quotas are returned. |
/data/sub1 |
| PageSize |
integer |
No |
The number of entries per page. Default value: 10. Valid values: 1 to 100. |
1 |
| PageNumber |
integer |
No |
The page number. Pages start from page 1. Default value: 1. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of directories. |
1 |
| DirQuotaInfos |
array<object> |
The queried directory quotas. |
|
|
array<object> |
|||
| Status |
string |
The quota status. Valid values: Initializing (quota being created) and Normal (quota created). |
Normal |
| Path |
string |
The absolute path of a directory. |
/data/sub1 |
| DirInode |
string |
The inode number of the directory. |
1123 |
| UserQuotaInfos |
array<object> |
The quota details for all users. |
|
|
object |
|||
| FileCountReal |
integer |
The number of files created by the user in the directory. |
5100 |
| UserType |
string |
The user type. Valid values: Uid, Gid, and AllUsers.
|
Uid |
| FileCountLimit |
integer |
The maximum number of files the user can create in the directory. |
10000 |
| UserId |
string |
The user ID for the directory quota. Depends on UserType. Valid values: Uid and Gid. |
500 |
| SizeLimit |
integer |
The maximum size of files the user can create in the directory. Unit: GiB. |
1024 |
| QuotaType |
string |
The quota type. Valid values: Accounting and Enforcement. |
Accounting |
| SizeReal |
integer |
The total size of files created by the user in the directory. Unit: GiB. |
800 |
| SizeRealInByte |
integer |
The total size of files created by the user in the directory. Unit: bytes. |
858995833870 |
| RequestId |
string |
The request ID. |
5BC5CB97-9F28-42FE-84A4-0CD0DF42**** |
| PageSize |
integer |
The number of entries per page. |
1 |
| PageNumber |
integer |
The page number. |
1 |
Examples
Success response
JSON format
{
"TotalCount": 1,
"DirQuotaInfos": [
{
"Status": "Normal",
"Path": "/data/sub1",
"DirInode": "1123",
"UserQuotaInfos": [
{
"FileCountReal": 5100,
"UserType": "Uid",
"FileCountLimit": 10000,
"UserId": "500",
"SizeLimit": 1024,
"QuotaType": "Accounting",
"SizeReal": 800,
"SizeRealInByte": 858995833870
}
]
}
],
"RequestId": "5BC5CB97-9F28-42FE-84A4-0CD0DF42****",
"PageSize": 1,
"PageNumber": 1
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.