Help Center > Elastic Cloud Server > API Reference > Specifications Query > Querying Specifications of ECSs

Querying Specifications of ECSs

Function

This interface is used to query the specifications of ECSs.

URI

  • URI format

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

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the tenant ID.

Table 2 lists the optional parameters that can be used to query ECS specifications.

Table 2 Optional parameters that can be used to query ECS specifications

Name

Mandatory

Type

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.

is_public

No

Boolean

Specifies whether public flavors are displayed. The private flavors are available only to user admin. The value of this parameter can be truefalse, or none. If this parameter is configured by a non-admin user, the system returns all public images.

sort_key

No

String

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

sort_dir

No

String

Specifies the ascending (asc) or descending (desc) sorting. The default value is asc.

Request

N/A

Response

  • Parameter description

    Name

    Type

    Description

    flavors

    List data structure [1]

    Specifies the ECS specifications list.

  • [1] flavors data structure description

    Name

    Type

    Description

    id

    String

    Specifies the ID of ECS specifications.

    name

    String

    Specifies the name of the ECS specifications.

    vcpus

    Integer

    Specifies the number of CPU cores in the ECS specifications.

    ram

    Integer

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

    disk

    Integer

    Specifies the system disk size in the ECS specifications. 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 [2]

    Specifies the shortcut link of the ECS specifications.

[2] links field data structure description

Name

Type

Description

rel

String

Specifies the shortcut link marker name.

href

String

Provides the corresponding shortcut link.

  • 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.

Registration