All Products
Search
Document Center

Apsara File Storage NAS:DescribeDirQuotas

Last Updated:Mar 14, 2024

Queries the directory quotas of a file system.

Operation description

Only General-purpose NAS file systems support the directory quota feature.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
FileSystemIdstringYes

The ID of the file system.

1ca404****
PathstringNo

The absolute path of a directory.

If you do not specify this parameter, all directories for which quotas are created are returned.

/data/sub1
PageSizeintegerNo

The number of entries per page. Default value: 10.

Valid values: 1 to 100.

1
PageNumberintegerNo

The page number.

Pages start from page 1. Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object
TotalCountinteger

The total number of directories.

1
DirQuotaInfosobject []

The queried directory quotas.

Statusstring

The status of the quota created for the directory. Valid values: Initializing and Normal. The Initializing state indicates that the quota is being created. The Normal state indicates that the quota is created.

Normal
Pathstring

The absolute path of a directory.

/data/sub1
DirInodestring

The inode number of the directory.

1123
UserQuotaInfosobject []

The information about quotas for all users.

FileCountReallong

The total number of files that a user has created in the directory.

5100
UserTypestring

The type of the user ID. Valid values: Uid, Gid, and AllUsers.

  • If the parameter is set to Uid or Gid, the value of the UserId parameter is returned.
  • If the parameter is set to AllUsers, the value of the UserID parameter is empty.
Uid
FileCountLimitlong

The maximum number of files that a user can create in the directory.

10000
UserIdstring

The ID of the user that you specify to create a quota for the directory. The value depends on the value of the UserType parameter. Valid values: Uid and Gid.

500
SizeLimitlong

The maximum size of files that a user can create in the directory. Unit: GiB.

1024
QuotaTypestring

The type of the quota. Valid values: Accounting and Enforcement.

Accounting
SizeReallong

The total size of files that a user has created in the directory. Unit: GiB.

800
RequestIdstring

The request ID.

5BC5CB97-9F28-42FE-84A4-0CD0DF42****
PageSizeinteger

The number of entries per page.

1
PageNumberinteger

The page number.

1

Examples

Sample success responses

JSONformat

{
  "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
        }
      ]
    }
  ],
  "RequestId": "5BC5CB97-9F28-42FE-84A4-0CD0DF42****",
  "PageSize": 1,
  "PageNumber": 1
}

Error codes

For a list of error codes, visit the Service error codes.