• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. Quota
  6. Querying Quotas

Querying Quotas

Function Description

This interface is used to query quotas, including specifications of ECSs, CPUs, and memory.

URI

  • URI format

    GET /v2/{tenant_id}/os-quota-sets/{tenant_id}?user_id={user_id}

    GET /v2.1/{tenant_id}/os-quota-sets/{tenant_id}?user_id={user_id}

  • Parameter description

    Parameter

    Type

    Mandatory

    Description

    tenant_id

    String

    Yes

    Specifies the tenant ID. If the specified tenant does not exist, the default quota in the system is returned.

    user_id

    String

    No

    Specifies the user ID. If the specified user does not exist, the default quota in the system is returned.

Restrictions

N/A

Extension Description

This API provides the user_id parameter for obtaining the quota configuration of a specified user.

Request

N/A

Response

Parameter

Type

Mandatory

Description

quota_set

Dict

Yes

Specifies the quota_set object.

Table 1 quota_set parameter description

Parameter

Type

Mandatory

Description

cores

Integer

Yes

Specifies the quantity quota of vCPUs.

fixed_ips

Integer

Yes

Specifies the quantity quota of fixed IP addresses. This parameter is not supported.

floating_ips

Integer

Yes

Specifies the quantity quota of floating IP addresses. This parameter is not supported.

id

String

Yes

Specifies the project UUID.

injected_file_content_bytes

Integer

Yes

Specifies the size quota (bytes) of the files to be injected.

injected_file_path_bytes

Integer

Yes

Specifies the size quota (bytes) of the path for the files to be injected.

injected_files

Integer

Yes

Specifies the quantity quota of the files to be injected.

instances

Integer

Yes

Specifies the quantity quota of ECSs.

key_pairs

Integer

Yes

Specifies the quantity quota of key pairs. This parameter is not supported.

metadata_items

Integer

Yes

Specifies the metadata quantity quota.

ram

Integer

Yes

Specifies the memory quota (MB).

security_group_rules

Integer

Yes

Specifies the quantity quota of security group rules. This parameter is not supported.

security_groups

Integer

Yes

Specifies the quantity quota of security groups. This parameter is not supported.

server_groups

Integer

Yes

Specifies the quantity quota of ECS groups.

server_group_members

Integer

Yes

Specifies the size quota of ECS groups.

Request Example

GET /v2/d9ebe43510414ef590a4aa158605329e/os-quota-sets/d9ebe43510414ef590a4aa158605329e

GET /v2.1/d9ebe43510414ef590a4aa158605329e/os-quota-sets/d9ebe43510414ef590a4aa158605329e

Response Example

{
    "quota_set": {
        "cores": 20,
        "fixed_ips": 40,
        "floating_ips": 10,
        "id": "d9ebe43510414ef590a4aa158605329e",
        "injected_file_content_bytes": 10240,
        "injected_file_path_bytes": 255,
        "injected_files": 5,
        "instances": 20,
        "key_pairs": 100,
        "metadata_items": 128,
        "ram": 51200,
        "security_group_rules": 20,
        "security_groups": 50,
"server_group_members": 10,
        "server_groups": 10
}
}

Returned Values

See General Request Returned Values.