Querying the Quota of a Tenant (V2)
Function
This API is used to query the default instance quota and total memory quota of a tenant and the maximum and minimum quotas a tenant can apply for. Different tenants have different quotas in different regions.
Constraints
None
URI
GET /v2/{project_id}/quota
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
Request
None
Response
If the status code is 200, the following parameters are returned:
| Parameter | Type | Description |
|---|---|---|
| quotas | quotas object | Quota information. |
| Parameter | Type | Description |
|---|---|---|
| unit | String | Resource unit.
|
| min | Integer |
|
| max | Integer |
|
| quota | Integer | Maximum number of instances that can be created and maximum allowed total memory. |
| used | Integer | Number of created instances and used memory. |
| type | String | Options:
|
Example Request
GET https://{dcs_endpoint}/v2/{project_id}/quota Example Response
If the status code is 200, the tenant quota is successfully queried.
{
"quotas": {
"resources": [{
"unit": {
},
"min": 1,
"max": 10,
"quota": 10,
"used": 3,
"type": "instance"
},
{
"unit": "GB",
"min": 1,
"max": 800,
"quota": 800,
"used": 22,
"type": "ram"
}]
}
} Status Code
| Status Code | Description |
|---|---|
| 200 | Tenant quota queried successfully. |
| 400 | The request could not be understood by the server due to malformed syntax. |
| 500 | Failed to complete the request because of an internal service error. |
Error Codes
For details, see Error Codes.
Last Article: Querying Maintenance Time Window (V2)
Next Article: Querying Monitored Objects on Primary Dimensions
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.