Querying Quota Information
Function
This API is used to query quota information.
Calling Method
For details, see Calling APIs.
URI
GET /v5/{project_id}/billing/quotas
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
User project ID Minimum: 1 Maximum: 128 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps. Default: 0 Minimum: 1 Maximum: 256 |
version |
No |
String |
HSS edition. Its value can be:
Minimum: 1 Maximum: 64 |
charging_mode |
No |
String |
Billing mode. Its value can be:
Minimum: 1 Maximum: 32 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-auth-token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. Minimum: 32 Maximum: 4096 |
region |
No |
String |
region id Minimum: 0 Maximum: 128 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
data_list |
Array of ResourceQuotasInfo objects |
Quota statistics list Array Length: 0 - 200 |
Parameter |
Type |
Description |
---|---|---|
version |
String |
HSS edition. Its value can be:
Minimum: 1 Maximum: 64 |
total_num |
Integer |
Total quotas Minimum: 0 Maximum: 2000000 |
used_num |
Integer |
Used quotas Minimum: 0 Maximum: 2000000 |
available_num |
Integer |
Total quotas Minimum: 0 Maximum: 2000000 |
available_resources_list |
Array of AvailableResourceIdsInfo objects |
Available resource list Array Length: 0 - 200 |
Example Requests
This API is used to query quotas of the basic edition in all enterprise projects.
GET https://{endpoint}/v5/{project_id}/billing/quotas?version=hss.version.basic&enterprise_project_id=all_granted_eps
Example Responses
Status code: 200
Quota statistics list
{ "data_list" : [ { "available_num" : 1, "available_resources_list" : [ { "current_time" : "2022-09-17T17:00:24Z", "resource_id" : "9ecb83a7-8b03-4e37-a26d-c3e90ca97eea", "shared_quota" : "shared" } ], "total_num" : 2, "used_num" : 1, "version" : "hss.version.basic" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Quota statistics list |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.