Updated on 2025-05-13 GMT+08:00

Querying the Tenant Quotas

Function

This API is used to query the default instance quota and total memory quota of a tenant and the maximum and minimum quotas a tenant can apply for. Different tenants have different quotas in different regions.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/quota

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Parameter description:

Project ID. For details, see Obtaining a Project ID.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

quotas

quotas object

Parameter description:

Quota information.

Value range:

N/A.

Table 3 quotas

Parameter

Type

Description

resources

Array of Resources objects

Parameter description:

Quota list.

Value range:

N/A.

Table 4 Resources

Parameter

Type

Description

unit

String

Parameter description:

Resource unit.

  • When type is set to instance, no value is returned.

  • When type is set to ram, GB is returned.

Value range:

N/A.

min

Integer

Parameter description:

  • Minimum limit of instance quota when type is set to instance.

  • Minimum limit of memory quota when type is set to ram.

Value range:

N/A.

max

Integer

Parameter description:

  • Maximum limit of instance quota when type is set to instance.

  • Maximum limit of memory quota when type is set to ram.

Value range:

N/A.

quota

Integer

Parameter description:

Maximum number of instances that can be created and maximum allowed total memory.

Value range:

N/A.

used

Integer

Parameter description:

Number of created instances and used memory.

Value range:

N/A.

type

String

Parameter description:

Quota type.

Value range:

  • instances: instance quota

  • ram: memory quota

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Parameter description:

Extended error information. This parameter is not used currently and is set to null.

Value range:

N/A.

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

error_code

String

Parameter description:

Error code.

Value range:

For details, see Error Codes.

error_ext_msg

String

Parameter description:

Extended error information. This parameter is not used currently and is set to null.

Value range:

N/A.

Example Requests

GET https://{dcs_endpoint}/v2/{project_id}/quota

Example Responses

Status code: 200

Tenant quota queried successfully.

{
  "quotas" : {
    "resources" : [ {
      "unit" : { },
      "min" : 1,
      "max" : 10,
      "quota" : 10,
      "used" : 3,
      "type" : "instance"
    }, {
      "unit" : "GB",
      "min" : 1,
      "max" : 800,
      "quota" : 800,
      "used" : 22,
      "type" : "ram"
    } ]
  }
}

Status Codes

Status Code

Description

200

Tenant quota queried successfully.

400

Invalid request.

500

Internal service error.

Error Codes

See Error Codes.