Get default quotas

Overview

Gets default 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}/defaults

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

Request Parameters

name

style

format

description

required/optional

tenant_id

URI

String

The ID for the tenant or account 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"

Response Code

Response Codes

response code

condition

200

normal end

400

badRequest

401

unauthorized

403

forbidden

404

itemNotFound

405

badMethod

413

overLimit

503

serviceUnavailable

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

Response Parameters

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-availability-zone/defaults

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/ad355aa6ed3e4cf5ae0fa0df652bc291/os-quota-sets/ad355aa6ed3e4cf5ae0fa0df652bc291/defaults HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: 9d98bc82b5fb43dbaa7792177ad43c6f
Content-type: application/json
Accept: application/json

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 371
X-Compute-Request-Id: req-05a5f7f5-81e1-4ff3-aba6-121bbeb3efb8
Date: Thu, 15 Oct 2015 03:49: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": "ad355aa6ed3e4cf5ae0fa0df652bc291", "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/ad355aa6ed3e4cf5ae0fa0df652bc290/os-quota-sets/ad355aa6ed3e4cf5ae0fa0df652bc290/defaults HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: 9d98bc82b5fb43dbaa7792177ad43c6f
Content-type: application/json
Accept: application/json

HTTP Response

HTTP/1.1 400 Bad Request
Content-Length: 188
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-20883f6a-1ee5-48a5-af18-707d105d693f
Date: Thu, 15 Oct 2015 03:52:36 GMT

{"badRequest": {"message": "Malformed request URL: URL's project_id 'ad355aa6ed3e4cf5ae0fa0df652bc290' doesn't match Context's project_id 'ad355aa6ed3e4cf5ae0fa0df652bc291'", "code": 400}}