Queries the directory quotas of a file system.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDirQuotas

The operation that you want to perform.

Set the value to DescribeDirQuotas.

FileSystemId String Yes 1ca404****

The ID of the file system.

Path String No /data/sub1

The absolute path of a directory.

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

PageSize Integer No 1

The number of entries to return on each page. Default value: 10.

Valid values: 1 to 100.

PageNumber Integer No 1

The number of the page to return.

Pages start from page 1. Default value: 1.

Response parameters

Parameter Type Example Description
TotalCount Integer 1

The total number of directories.

DirQuotaInfos Array of DirQuotaInfo

The information about quotas for all directories.

Status String Normal

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.

Path String /data/sub1

The absolute path of a directory.

DirInode String 1123

The inode number of the directory.

UserQuotaInfos Array of UserQuotaInfo

The information about quotas for all users.

FileCountReal Long 5100

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

UserType String Uid

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.
FileCountLimit Long 10000

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

UserId String 500

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.

SizeLimit Long 1024

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

QuotaType String Accounting

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

SizeReal Long 800

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

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

The ID of the request.

PageSize Integer 1

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeDirQuotas
&FileSystemId=1ca404****
&Path=/data/sub1
&PageSize=1
&PageNumber=1
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDirQuotasResponse>
    <TotalCount>1</TotalCount>
    <DirQuotaInfos>
        <Status>Normal</Status>
        <Path>/data/sub1</Path>
        <DirInode>1123</DirInode>
        <UserQuotaInfos>
            <FileCountReal>5100</FileCountReal>
            <UserType>Uid</UserType>
            <FileCountLimit>10000</FileCountLimit>
            <UserId>500</UserId>
            <SizeLimit>1024</SizeLimit>
            <QuotaType>Accounting</QuotaType>
            <SizeReal>800</SizeReal>
        </UserQuotaInfos>
    </DirQuotaInfos>
    <RequestId>5BC5CB97-9F28-42FE-84A4-0CD0DF42****</RequestId>
    <PageSize>1</PageSize>
    <PageNumber>1</PageNumber>
</DescribeDirQuotasResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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 API Error Center.