nav-img
Advanced

Viewing Tenant Quotas

Function

This API is used to query the maximum number of instances that a tenant can create, the number of created instances, and the maximum number of tags that can be created for each instance.

URI

GET /v2/{project_id}/quotas

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

quotas

quotas object

Quota information.

Table 3 quotas

Parameter

Type

Description

resources

Array of QuotaResourceEntity objects

Quota list.

Table 4 QuotaResourceEntity

Parameter

Type

Description

type

String

Quota types.

  • rabbitmqInstance: RabbitMQ instance quotas

  • kafkaInstance: Kafka instance quotas

  • rocketmqInstance: RocketMQ instance quotas

  • tags: Tag quotas

quota

Integer

The maximum number of instances that a tenant can create, or the maximum number of tags that can be created for each instance.

used

Integer

Number of created instances.

Example Requests

GET https://{endpoint}/v2/{project_id}/quotas

Example Responses

Status code: 200

Successful

{
"quotas" : {
"resources" : [ {
"type" : "rabbitmqInstance",
"quota" : 100,
"used" : 3
}, {
"type" : "kafkaInstance",
"quota" : 100,
"used" : 17
}, {
"type" : "rocketmqInstance",
"quota" : 100,
"used" : 17
}, {
"tpye" : "tags",
"quota" : 20
} ]
}
}

Status Codes

Status Code

Description

200

Successful

Error Codes