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}
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
Table 2 Request parameters 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
Table 3 Response parameters Parameter
Type
Description
quotas
Object
Specifies quota details. For details, see Table 4.
Table 4 Quotas description Parameter
Type
Description
resources
Array of objects
Lists the resources. For details, see Table 5.
Table 5 Resource parameters 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot