• Elastic Cloud Server

ecs
  1. Help Center
  2. Elastic Cloud Server
  3. API Reference
  4. OpenStack Nova APIs
  5. Flavor Management
  6. Querying the extra_specs Value for an ECS Flavor

Querying the extra_specs Value for an ECS Flavor

Function Description

This interface is used to query the extra_specs value for a specified ECS flavor.

URI

GET /v2/{project_id}/flavors/{flavors_id}/os-extra_specs

GET /v2.1/{project_id}/flavors/{flavors_id}/os-extra_specs

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

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

flavors_id

Yes

Specifies the flavor ID.

Request

N/A

Response

Response parameters

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

extra_specs

Dict

Specifies the key-value pair of an ECS flavor.

Table 3 os_extra_specs field description

Parameter

Type

Description

cond:operation:status

String

This parameter takes effect region-wide. If an AZ is not configured in the cond:operation:az parameter, the value of this parameter is used by default. If this parameter is not set or used, the meaning of normal applies. Options:

  • normal: indicates normal commercial use of the flavor.
  • abandon: indicates that the flavor has been canceled (not displayed).
  • sellout: indicates that the flavor has been sold out.
  • obt: indicates that the flavor is under OBT.
  • promotion: indicates the recommended flavor (commercial use, which is similar to normal).

cond:operation:az

String

This parameter takes effect AZ-wide. If an AZ is not configured in this parameter, the value of the cond:operation:status parameter is used by default. This parameter is in the format of "az(xx)". The value in parentheses is the flavor status in an AZ. If the parentheses are left blank, the configuration is invalid. The cond:operation:az options are the same as the cond:operation:status options.

For example, a flavor is sold out in AZ 0, shielded in AZ 1, and available in other AZs of a region, configure the following parameters:

  • Set cond:operation:status to normal.
  • Set cond:operation:az to az0(sellout), az1(abandon).
NOTE:

Configure this parameter if the flavor status in an AZ is different from the cond:operation:status value.

cond:operation:roles

String

Specifies Open Beta Test for a flavor. Configure this parameter if a flavor in an AZ is at Open Beta Test.

For example, a flavor is at Open Beta Test in only AZ 1 and unavailable in other AZs, configure the following parameters:

  • Set cond:operation:status to normal.
  • Set cond:operation:az to az1(obt).
  • Set cond:operation:roles to op_gated_ecs_c3ne.

Examples

  • Example request
    GET v2/775ad4f543e247938551b93417b27f0b/flavors/c2.medium/os-extra_specs
    GET v2.1/775ad4f543e247938551b93417b27f0b/flavors/c2.medium/os-extra_specs
  • Example response
    {
        "extra_specs": {
            "key1": "value1",
            "key2": "value2"
        }
    }

Returned Values

See General Request Returned Values.