Querying Resource Quotas
Function
This API is used to query quotas of a tenant.
Debugging
You can debug the API in API Explorer to support automatic authentication. API Explorer can automatically generate and debug example SDK code.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions and Supported Actions.
URI
GET /v3/{project_id}/quotas
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Definition MIME type of the request body. Use the default value application/json. For APIs used to upload objects or images, the value varies depending on the flow type. Constraints N/A Range application/json Default Value application/json |
| X-Auth-Token | Yes | String | Definition User token obtained from IAM. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. The token is the value of X-Subject-Token in the response header. Constraints N/A Range N/A Default Value N/A |
| X-Language | No | String | Definition Request language type. Constraints N/A Range
Default Value en-us |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| quotas | Object | Definition Quota information. For details, see Table 4. |
| Parameter | Type | Description |
|---|---|---|
| resource | Object | Definition Quota information. For details, see Table 5. |
| Parameter | Type | Description |
|---|---|---|
| type | String | Definition Quota type, which is used to identify resource quotas in different dimensions. Constraints N/A Range
|
| min | Integer | Definition Minimum quota, which indicates the lower limit of the resource quota. Constraints N/A Range N/A |
| max | Integer | Definition Maximum quota, which indicates the upper limit of the resource quota. Constraints N/A Range N/A |
| quota | Integer | Definition Actual quota, that is, the quota allocated to the user by the system. Constraints N/A Range N/A |
| used | Integer | Definition Used quota, which indicates the number of occupied resources. Constraints N/A Range N/A |
Example Request
Example of querying quotas
https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/quotas Example Response
Status code: 200
OK
{
"quotas" : {
"resource" : {
"type" : "instances",
"min" : 0,
"max" : 9999,
"quota" : 9999,
"used" : 41
}
}
} Error Code
For details, see Error Code.
What is your overall rating for this page?
Thank 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