Querying the Quota¶
Function¶
This API is used to query the quota of your resources, including VPC endpoint services and VPC endpoints.
URI¶
GET /v1/{project_id}/quotas?type={resource_type}
Table 1 describes the required parameters.
Parameter | Mandatory | Description |
---|---|---|
project_id | Yes | Specifies the project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request¶
Parameter description
¶ Parameter
Mandatory
Type
Description
type
No
String
Specifies the resource type.
endpoint_service: indicates the VPC endpoint service.
endpoint: indicates the VPC endpoint.
Example request
This request is to query the quota of VPC endpoint services.
GET https://{endpoint}/v1/{project_id}/quotas?type=endpoint_service
Response¶
Parameter description
¶ Parameter
Type
Description
type
String
Specifies the resource type. You can query the quota of resources of a specified type by configuring this parameter.
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 maximum quota of resources.
The value ranges from the default quota value to the maximum quota value.
Example response
{ "quotas":{ "resources":[ { "type":"endpoint", "used":4, "quota":150 }, { "type":"endpoint_service", "used":10, "quota": 100 } ] } }
Status Code¶
For details about status codes, see Status Code.