Querying the Quota of a Tenant¶
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.
URI¶
GET /v1.0/{project_id}/quota
Table 1 describes the parameter.
Parameter | Type | Mandatory | Description |
---|---|---|---|
project_id | String | Yes | Project ID. For details on how to obtain the value of this parameter, see Obtaining a Project ID. |
Request¶
Request parameters
None
Example request
None
Response¶
Response parameters
Table 2 describes the response parameters.
Parameter | Type | Mandatory | Description |
---|---|---|---|
resources | Array | Yes | List of quotas. For details, see Table 4. |
resource_user | Object | Yes | Information about a resource tenant For details, see Table 5. |
Parameter | Type | Description |
---|---|---|
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 | Values:
|
unit | String | Resource unit.
|
max | Integer |
|
min | Integer |
|
Parameter | Type | Description |
---|---|---|
tenant_id | String | Resource tenant ID |
tenant_name | String | Resource tenant name |
Example response
{
"quotas": {
"resources": [
{
"quota": 10,
"used": 3,
"type": "instance",
"min": 1,
"max": 10,
"unit": null
},
{
"quota": 800,
"used": 22,
"type": "ram",
"min": 1,
"max": 800,
"unit": "GB"
}
],
"resource_user": {
"tenant_id": "836152f9838a44089f40f3cf6fd432bf",
"tenant_name": "op_svc_dcs_003"
}
}
}
Status Code¶
Table 6 describes the status code of successful operations. For details about other status codes, see Table 1.
Status Code | Description |
---|---|
200 | Tenant quota queried successfully. |