Show quotas¶
Overview¶
Shows quotas for a tenant.
Classification¶
- Show
API Operation Object¶
- os-quota-sets
Synchronous / Asynchronous¶
- -
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v2/{tenant_id}/os-quota-sets/{tenant_id}
HTTP Request Header¶
Format¶
Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: <token_id>
Content-Type: application/json
HTTP Request Body¶
Format¶
- none
Request Parameter¶
name | style | format | description | required/optional |
---|---|---|---|---|
tenant_id | URI | String | The ID for the tenant or project in a multi-tenancy cloud. | required |
tenant_id | URI | String | The ID for the tenant for which you want to show, update, or delete quotas. This ID is different from the first tenant ID that you specify in the URI: That ID is for the admin tenant. | required |
Response¶
HTTP Response Header¶
Format¶
HTTP/1.1 <response_code> <message> (ex. 200 OK)
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"
HTTP Response Body¶
Format¶
{
"quota_set": {
"cores": <cores>,
"fixed_ips": <fixed_ips>,
"floating_ips": <floating_ips>,
"id": "<id>",
"injected_file_content_bytes": <injected_file_content_bytes>,
"injected_file_path_bytes": <injected_file_path_bytes>,
"injected_files": <injected_files>,
"instances": <instances>,
"key_pairs": <key_pairs>,
"metadata_items": <metadata_items>,
"ram": <ram>,
"security_group_rules": <security_group_rules>,
"security_groups": <security_groups>,
"server_group_members": <server_group_members>,
"server_groups": <server_groups>
}
}
Response Parameter¶
item | format | description |
---|---|---|
quota_set | String | A quota_set object. |
cores | int | The number of instance cores allowed for each tenant. |
fixed_ips | int | The number of fixed IP addresses allowed for each tenant. Must be equal to or greater than the number of allowed instances. |
floating_ips | int | The number of floating IP addresses allowed for each tenant. |
id | int | The ID for the quota set. |
injected_file_content_bytes | int | The number of bytes of content allowed for each injected file. |
injected_file_path_bytes | int | The number of bytes allowed for each injected file path. |
injected_files | int | The number of injected files allowed for each tenant. |
instances | int | The number of instances allowed for each tenant. |
key_pairs | int | The number of key pairs allowed for each user. |
metadata_items | int | The number of metadata items allowed for each instance |
ram | int | The amount of instance RAM in megabytes allowed for each tenant. |
security_group_rules (Optional) | int | The number of rules allowed for each security group. |
security_groups | int | The number of security groups allowed for each tenant. |
server_groups | int | The number of server groups allowed for each tenant. |
server_group_members | int | The number of members allowed for each server group. |
Sample API Request and Response¶
Sample API Request¶
Request URI¶
https://example.com/v2/{tenant_id}/os-quota-sets/{tenant_id}
Request Header¶
Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02
Content-Type: application/json
Request Body¶
- none
Sample API Response¶
Response Header¶
HTTP/1.1 200 OK
<response_code>: see "HTTP Responses" section
<message>: message based on the response code
- skip auto insert field such as "X-Compute-Request-Id" and "Content-Length", "Date"
Response Body¶
{
"quota_set": {
"cores": 20,
"fixed_ips": -1,
"floating_ips": 10,
"id": "fake_tenant",
"injected_file_content_bytes": 10240,
"injected_file_path_bytes": 255,
"injected_files": 5,
"instances": 10,
"key_pairs": 100,
"metadata_items": 128,
"ram": 51200,
"security_group_rules": 20,
"security_groups": 10,
"server_group_members": 10,
"server_groups": 10
}
}
Execution Example¶
HTTP Request¶
GET /v2/f66f8e846a65484a9a6740077e72e3dd/os-quota-sets/f66f8e846a65484a9a6740077e72e3dd HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
Content-Type: application/json
Accept: application/json
X-Auth-Token: abf1b150aab044549c404ab951b8afef
HTTP Response¶
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 371
X-Compute-Request-Id: req-097a76ee-74ef-4431-99b1-1c0397eb3159
Date: Wed, 07 Oct 2015 07:10:51 GMT
{"quota_set": {"injected_file_content_bytes": 10240, "metadata_items": 128, "server_group_members": 10, "server_groups": 10, "ram": 51200, "floating_ips": 10, "key_pairs": 100, "id": "f66f8e846a65484a9a6740077e72e3dd", "instances": 10, "security_group_rules": 20, "injected_files": 5, "cores": 20, "fixed_ips": -1, "injected_file_path_bytes": 255, "security_groups": 10}}
Error Execution Example¶
HTTP Request¶
GET /v2/f66f8e846a5484a9a6740077e72e3dd/os-quota-sets/f66f8e846a65484a9a6740077e72e3dd HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
Content-Type: application/json
Accept: application/json
X-Auth-Token: abf1b150aab044549c404ab951b8afef
HTTP Response¶
HTTP/1.1 400 Bad Request
Content-Length: 187
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-f2a72725-fb4a-4fe8-82cc-a2025abe4921
Date: Wed, 07 Oct 2015 07:13:00 GMT
{"badRequest": {"message": "Malformed request URL: URL's project_id 'f66f8e846a5484a9a6740077e72e3dd' doesn't match Context's project_id 'f66f8e846a65484a9a6740077e72e3dd'", "code": 400}}