All Products
Search
Document Center

File Storage NAS:DescribeDirQuotas

Last Updated:Aug 28, 2026

Queries directory quota details for a file system.

Operation description

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

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

nas:DescribeDirQuotas

list

*FileSystem

acs:nas:{#regionId}:{#accountId}:filesystem/{#filesystemId}

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 or Gid: a UserId value is returned.

  • AllUsers: UserId is empty.

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.