Updated on 2023-09-13 GMT+08:00

Querying Resource Quotas

Function

This API is used to query quotas of a tenant.

Debugging

You can debug the API in API Explorer to support automatic authentication. API Explorer can automatically generate and debug example SDK code.

URI

GET /v3/{project_id}/quotas

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region

For details about how to obtain the project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

The content type.

The default value is application/json.

X-Auth-Token

Yes

String

User token obtained from IAM.

X-Language

No

String

Request language type.

Default value: en-us

Values:

  • en-us
  • zh-cn

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

quotas

Object

Quota information.

For details, see Table 4.

Table 4 Data structure description of field quotas

Parameter

Type

Description

resource

Object

Quota information.

For details, see Table 5.

Table 5 Data structure description of field resource

Parameter

Type

Description

type

String

Quota type information.

min

Integer

Minimum value of the quota.

max

Integer

Maximum value of the quota.

quota

Integer

Actual value of the user quota.

used

Integer

Used quota.

Example Request

Example of querying quotas

https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/quotas

Example Response

Status code: 200

OK

{
  "quotas" : {
    "resource" : {
      "type" : "instances",
      "min" : 0,
      "max" : 9999,
      "quota" : 9999,
      "used" : 41
    }
  }
}

Status Code

Status Code

Description

200

OK

Error Code

For details, see Error Code.