Obtaining the Quota of a Tenant
Function
This API is used to obtain the quota of a tenant.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/quotas
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. For how to obtain it, see Obtaining a Project ID. Constraints N/A Range The value can contain 1 to 64 characters. Only letters and digits are allowed. Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. For details, see Token-based Authentication. Constraints N/A Range The value can contain 1 to 32,768 characters. Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
quota |
Array of ResourcesResult objects |
Definition Quota Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
resources |
Array |
Definition Resource details Constraints N/A Range N/A Default Value N/A |
|
items |
ResourcesdescriptionResult object |
Definition Resource details list Resource type, quota, and usage Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
Definition Resource type Constraints N/A Range
Default Value N/A |
|
quota |
Integer |
Definition Total quota of the current resource type Constraints N/A Range N/A Default Value The default total quota of common partitions is 50, that of advanced partitions is 10, and that of app partitions is 100. |
|
used |
Integer |
Definition Used quota of the current resource type Constraints N/A Range The value cannot be greater than the total quota of the corresponding resource type. The value for a common partition cannot be greater than 50, the value for an advanced partition cannot be greater than 10, and the value for an app partition cannot be greater than 100. Default Value N/A |
Example Requests
Obtain the quota of a tenant.
GET https://{Endpoint}/v1/{tenantId}/quotas
Example Responses
Status code: 200
Normal response
{
"quotas" : {
"resource" : {
"type" : "common_partition",
"quota" : 50,
"used" : 10
}
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Normal response |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot