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

Query Quotas

Function

This API is used to query the quota of your resources, including the quota of VPC endpoint services and the quota of VPC endpoints.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/quotas

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

type

No

String

Specifies the resource type.

  • endpoint_service: indicates the VPC endpoint service.

  • endpoint: indicates the VPC endpoint.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token.

Content-Type

No

String

Specifies the MIME type of the request body. Default value application/json is recommended. For APIs used to upload objects or images, the MIME type varies depending on the flow type.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

quotas

ResourcesResponseBody object

Specifies the response body of the API for querying quotas.

Table 5 ResourcesResponseBody

Parameter

Type

Description

resources

Array of Quotas objects

Specifies the resource list.

Table 6 Quotas

Parameter

Type

Description

type

String

Specifies the resource type. You can query the quota of a specified resource by resource type.

  • endpoint_service: indicates the VPC endpoint service.

  • endpoint: indicates the VPC endpoint.

used

Integer

Specifies the number of created resources.

The value ranges from 0 to the value of quota.

quota

Integer

Specifies the resource quota.

The value ranges from the default quota value to the maximum quota value.

Example Requests

  • Querying the VPC endpoint service quotas

    GET https://{endpoint}/v1/{project_id}/quotas?type=endpoint_service
  • Querying the VPC endpoint quotas

    GET https://{endpoint}/v1/{project_id}/quotas?type=endpoint

Example Responses

Status code: 200

The server has successfully processed the request.

{
  "quotas" : {
    "resources" : [ {
      "type" : "endpoint",
      "used" : 4,
      "quota" : 150
    }, {
      "type" : "endpoint_service",
      "used" : 10,
      "quota" : 100
    } ]
  }
}

Status Codes

Status Code

Description

200

The server has successfully processed the request.

Error Codes

See Error Codes.