调用DescribeDirQuotas接口查询文件系统的目录配额。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeDirQuotas

接口名称。

固定取值:DescribeDirQuotas。

FileSystemId String 1ca404****

文件系统ID。

Path String /data/sub1

目录在文件系统中的绝对路径。

此项为空时会返回文件系统中全部已设置了配额的目录。

PageSize Integer 1

每个分页包含的目录个数。默认值为10。

取值范围:1~100。

PageNumber Integer 1

分页页码。

起始值(默认值):1。

返回数据

名称 类型 示例值 描述
TotalCount Integer 1

目录总个数。

DirQuotaInfos Array of DirQuotaInfo

每个目录的配额信息集合。

Status String Normal

目录的统计状态。

初始化时为Initializing;正常时为Normal。

Path String /data/sub1

目录在文件系统中的绝对路径。

DirInode String 1123

目录的inode号。

UserQuotaInfos Array of UserQuotaInfo

每个用户的配额信息集合。

FileCountReal Long 5100

目录下用户的实际文件数目。

UserType String Uid

指定UserId的类型,包括Uid、Gid、AllUsers三种。

  • 当指定为Uid或Gid时,UserId为必填。
  • 当指定为AllUsers时,UserId为空。
FileCountLimit Long 10000

目录下用户的文件数目限制。

UserId String 500

要限制的Uid或Gid,取决于UserType的值。

SizeLimit Long 1024

目录下用户的文件总容量限制,单位为GiB。

QuotaType String Accounting

配额类型,包括统计型(Accounting)和限制型(Enforcement)。

SizeReal Long 800

目录下用户的实际文件总容量,单位为GiB。

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

请求ID。

PageSize Integer 1

每个分页包含的目录个数。

PageNumber Integer 1

分页页码。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeDirQuotas
&FileSystemId=1ca404****
&Path=/data/sub1
&PageSize=1
&PageNumber=1
&公共请求参数

正常返回示例

XML格式

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格式

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
}

错误码

访问错误中心查看更多错误码。