Updated on 2025-11-20 GMT+08:00

Querying Quotas

Function

This API is used to query a resource quota and the used amount. The current resource refers to alarm rules only.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    ces:quotas:get

    Read

    -

    -

    -

    -

URI

GET /V1.0/{project_id}/quotas

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. It is used to specify the project that an asset belongs to. You can query the assets of a project by project ID. You can obtain the project ID from the API or console. For details, see Obtaining a Project ID.

Constraints

N/A

Range

1 to 64 characters

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

No

String

Definition

MIME type of the request body.

Constraints

N/A

Range

1 to 64 characters

Default Value

Default value application/json; charset=UTF-8 is recommended. For APIs used to upload objects or images, the MIME type varies with the flow type.

X-Auth-Token

No

String

Definition

User token.

Constraints

N/A

Range

1 to 16,384 characters

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

quotas

QuotasResp object

Definition

Quota list.

Table 4 QuotasResp

Parameter

Type

Description

resources

Array of ResourceQuotasResp objects

Definition

Resource quota list.

Table 5 ResourceQuotasResp

Parameter

Type

Description

type

String

Definition

Quota type.

Range

The value can be:

  • alarm: alarm rule

used

Long

Definition

Used amount of the quota.

Range

N/A

unit

String

Definition

Unit.

Range

0 to 32 characters

quota

Long

Definition

Total quotas.

Range

N/A

min

Long

Definition

Minimum value.

Range

N/A

max

Long

Definition

Maximum value.

Range

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

-

String

Request error.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

-

String

The authentication information is not provided or is incorrect.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

-

String

Access to the requested page is forbidden.

Status code: 408

Table 9 Response body parameters

Parameter

Type

Description

-

String

The request timed out.

Status code: 429

Table 10 Response body parameters

Parameter

Type

Description

-

String

Too many requests.

Status code: 500

Table 11 Response body parameters

Parameter

Type

Description

-

String

Failed to complete the request because of an internal service error.

Status code: 503

Table 12 Response body parameters

Parameter

Type

Description

-

String

The system is currently unavailable.

Example Requests

/V1.0/{project_id}/quotas

Example Responses

Status code: 200

OK

{
  "quotas" : {
    "resources" : [ {
      "unit" : "",
      "type" : "alarm",
      "quota" : 1000,
      "used" : 10
    } ]
  }
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

408

Request Timeout

429

Too Many Requests

500

Internal Server Error

503

Service Unavailable

Error Codes

See Error Codes.