Querying the Tenant Quotas
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.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/quota
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Parameter description: Project ID. For details, see Obtaining a Project ID. Constraints: N/A. Value range: N/A. Default value: N/A. |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
quotas |
quotas object |
Parameter description: Quota information. Value range: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
resources |
Array of Resources objects |
Parameter description: Quota list. Value range: N/A. |
|
Parameter |
Type |
Description |
|---|---|---|
|
unit |
String |
Parameter description: Resource unit.
Value range: N/A. |
|
min |
Integer |
Parameter description:
Value range: N/A. |
|
max |
Integer |
Parameter description:
Value range: N/A. |
|
quota |
Integer |
Parameter description: Maximum number of instances that can be created and maximum allowed total memory. Value range: N/A. |
|
used |
Integer |
Parameter description: Number of created instances and used memory. Value range: N/A. |
|
type |
String |
Parameter description: Quota type. Value range:
|
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Example Requests
GET https://{dcs_endpoint}/v2/{project_id}/quota
Example Responses
Status code: 200
Tenant quota queried successfully.
{
"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 Codes
|
Status Code |
Description |
|---|---|
|
200 |
Tenant quota queried successfully. |
|
400 |
Invalid request. |
|
500 |
Internal service error. |
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.