Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com> Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
13 KiB
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
Response
- Parameter description
Table 3 Response parameter Parameter
Type
Description
quotas
Object
Specifies quota details. For details, see Table 4.
Table 4 Quotas parameter 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 Codes
See Status Codes.