• Distributed Message Service

dms
  1. Help Center
  2. Distributed Message Service
  3. API Reference
  4. APIs for Managing Queues and Messages
  5. Viewing Quotas

Viewing Quotas

Function

This API is used to view the quota of the current project.

URI

URI format: GET /v1.0/{project_id}/quotas/dms

Table 1 describes the parameters of this API.

Table 1 Parameter description

Parameter

Type

Mandatory or Not

Description

project_id

String

Yes

Indicates the ID of a project.

Request

Request parameters

None.

Example request

None.

Response

Response parameters

Table 2, Table 3, and Table 4 describe the response parameters.

Table 2 Parameter description

Parameter

Type

Description

quotas

JSON

Indicates the quotas of a tenant.

Table 3 quotas parameter description

Parameter

Type

Description

resources

Array

Indicates the list of quotas.

Table 4 resources parameter description

Parameter

Type

Description

type

String

Indicates the name of a quota.

quota

Integer

Indicates the total quota.

used

Integer

Indicates the used quota.

min

Integer

Indicates the minimum value that a quota must reach.

max

Integer

Indicates the maximum value that a quota cannot exceed.

Example response

{
  "quotas" : {
    "resources" : [{
        "type" : "queue",
        "quota" : 30,
        "used" : 5,
        "min" : 0,
        "max" : 500
      }, {
        "type" : "rabbitmqInstance",
        "quota" : 100,
        "used" : 3,
	"min" : 0,
        "max" : 1000
      }, {
        "type" : "kafkaInstance",
        "quota" : 100,
        "used" : 3,
        "min" : 0,
        "max" : 1000
      }
    ]
  }
}

Status Code

Table 5 lists the status code indicating that the operation is successful. For details about the status codes indicating that the operation fails, see Status Code.

Table 5 Status code

Status Code

Description

200

The information is obtained successfully.