• Elastic Cloud Server

ecs
  1. Help Center
  2. Elastic Cloud Server
  3. API Reference
  4. OpenStack Nova APIs
  5. Flavor Management
  6. Querying Details About ECS Flavors

Querying Details About ECS Flavors

Function Description

This interface is used to query details about ECS flavors.

URI

GET /v2/{project_id}/flavors/detail{?minDisk,minRam,is_public,sort_key,sort_dir}

GET /v2.1/{project_id}/flavors/detail{?minDisk,minRam,is_public,sort_key,sort_dir}

Table 1 describes the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

Request

Request parameters

Table 2 describes the request parameters.
Table 2 Request parameters

Parameter

Type

Mandatory

Description

minDisk

No

String

Specifies the minimum disk specification in the unit of GB. Only the ECSs with the disk specification greater than or equal to the minimum specification can be queried.

minRam

No

String

Specifies the minimum RAM in the unit of MB. Only the ECSs with the RAM specification greater than or equal to the minimum specification can be queried.

sort_key

No

String

Indicates a sorting field, the default value of which is flavorid. The value of this parameter can also be name, memory_mb, vcpus, root_gb, or flavorid.

sort_dir

No

String

Specifies the ascending (asc) or descending (desc) sorting. Options: asc and desc

Response

Response parameters

Table 3 describes the response parameters.

Table 3 Response parameters

Parameter

Type

Description

flavors

List data structure

Specifies ECS flavors. For details, see Table 4.

Table 4 flavors field description

Parameter

Type

Description

id

String

Specifies the ECS flavor ID.

name

String

Specifies the name of the ECS flavor.

description

String

Describes the ECS flavor.

This field is supported in microversions later than 2.55.

vcpus

Integer

Specifies the number of vCPUs in the ECS flavor.

ram

Integer

Specifies the memory size (MB) in the ECS flavor.

disk

Integer

Specifies the system disk size in the ECS flavor. The value 0 indicates that the disk size is not limited.

The field is invalid in this system.

swap

String

Reserved

OS-FLV-EXT-DATA:ephemeral

Integer

Reserved

OS-FLV-DISABLED:disabled

Boolean

Reserved

rxtx_factor

Float

Reserved

os-flavor-access:is_public

Boolean

Reserved

links

List data structure

Specifies shortcut links for ECS flavors. For details, see Table 5.

Table 5 links field description

Parameter

Type

Description

rel

String

Specifies the shortcut link marker name.

href

String

Provides the corresponding shortcut link.

Examples

  • Example response
    {
        "flavors": [
    {
                "id": "104",
                "name": "m1.large",
                "vcpus": 4,
                "ram": 8192,
                "disk": 0,
                "swap": "",
                "OS-FLV-EXT-DATA:ephemeral": 0,
                "rxtx_factor": null,
                "OS-FLV-DISABLED:disabled": null,
                "os-flavor-access:is_public": null
                    }
        ]
                    }

Returned Values

See General Request Returned Values.