Listing Flavor Details and Extended Information
Function
This API is used to list flavor details and extended information.
URI
GET /v1/{project_id}/cloudservers/flavors
| Parameter | Mandatory | Description |
|---|---|---|
| project_id | Yes | Definition Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| availability_zone | No | String | Definition Specifies an AZ. If this parameter is not left blank, flavors in the normal, obt, or promotion states are returned. Constraints N/A Range N/A Default Value N/A |
Request
None
Response
| Parameter | Type | Description |
|---|---|---|
| flavors | Array of objects | Definition Specifies ECS flavors. For details, see Table 4. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Specifies the ID of the ECS flavor. Range N/A |
| name | String | Definition Specifies the name of the ECS flavor. Range N/A |
| vcpus | String | Definition Specifies the number of vCPUs in the ECS flavor. Range N/A |
| ram | Integer | Definition Specifies the memory size (MiB) in the ECS flavor. Range N/A |
| disk | String | Definition Specifies the system disk size in the ECS flavor. This parameter has not been used. Its default value is 0. Range N/A |
| swap | String | Definition Specifies the swap partition size required by the ECS flavor. This parameter has not been used. Its default value is "". Range N/A |
| OS-FLV-EXT-DATA:ephemeral | Integer | Definition Specifies the temporary disk size. This is an extended attribute. This parameter has not been used. Its default value is 0. Range N/A |
| OS-FLV-DISABLED:disabled | Boolean | Definition Specifies whether the ECS flavor has been disabled. This is an extended attribute. This parameter has not been used. Its default value is false. Range N/A |
| rxtx_factor | Float | Definition Specifies the ratio of the available network bandwidth to the network hardware bandwidth of the ECS. This parameter has not been used. Its default value is 1.0. Range N/A |
| rxtx_quota | String | Definition Specifies the software constraints of the network bandwidth that can be used by the ECS. This parameter has not been used. Its default value is null. Range N/A |
| rxtx_cap | String | Definition Specifies the hardware constraints of the network bandwidth that can be used by the ECS. This parameter has not been used. Its default value is null. Range N/A |
| os-flavor-access:is_public | Boolean | Definition Specifies whether a flavor is available to all tenants. This is an extended attribute. Range
Default value: true |
| links | Array of objects | Definition Specifies shortcut links for ECS flavors. For details, see Table 5. Range N/A |
| os_extra_specs | Object | Definition Specifies extended ECS specifications. For details, see Table 6. Range N/A |
| attachableQuantity | Object | Definition Specifies the number of NICs and disks that can be attached to an ECS. For details, see Table 7. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| rel | String | Definition Specifies the shortcut link marker name. Range N/A |
| href | String | Definition Provides the corresponding shortcut link. Range N/A |
| type | String | Definition Specifies the shortcut link type. This parameter has not been used. Its default value is null. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| ecs:performancetype | String | Definition Specifies the ECS flavor type. Range
|
| hw:numa_nodes | String | Definition Specifies the number of physical CPUs of the host. The ECS specifications determine whether to return the parameter value. Range N/A |
| resource_type | String | Definition Specifies the resource type. resource_type is used to differentiate between the types of the physical servers accommodating ECSs. Range N/A |
| hpet_support | String | Definition Specifies whether the high-precision clock is enabled for the ECS. The ECS specifications determine whether to return the parameter value. Range
|
| instance_vnic:type | String | Definition Specifies the NIC type. Range The value is fixed at enhanced, indicating that network-enhanced resources are used to create ECSs. |
| instance_vnic:instance_bandwidth | String | Definition Specifies the maximum bandwidth. Range Maximum value: 10000 (in Mbit/s) |
| instance_vnic:max_count | String | Definition Specifies the maximum number of NICs. Range Maximum value: 4 |
| quota:local_disk | String | Definition This field is dedicated for disk-intensive ECSs. Range The value of this parameter is in format of {type}:{count}:{size}:{safeFormat}.
|
| quota:nvme_ssd | String | Definition This field is dedicated for ultra-high I/O ECSs. Range The value of this parameter is in the format of {type}:{spec}:{num}:{size}:{safeFormat}.
|
| extra_spec:io:persistent_grant | String | Definition Specifies whether persistent storage is supported. This parameter is only available for disk-intensive D1 ECSs. Range This value is true, indicating that the ECS is persistently authorized to access the storage. |
| ecs:generation | String | Definition Specifies the generation of an ECS type. For example, 3 in s3 indicates the general computing III generation. For details about flavors and generations, see ECS Specifications in the Elastic Cloud Server User Guide. Range N/A |
| ecs:virtualization_env_types | String | Definition Specifies a virtualization type. Range
|
| pci_passthrough:enable_gpu | String | Definition Specifies whether the GPU is passthrough. Range If the value is true, the GPU is passthrough. |
| pci_passthrough:gpu_specs | String | Definition Specifies the technology used on the G1 and G2 ECSs, including GPU virtualization and GPU passthrough. Range
|
| pci_passthrough:alias | String | Definition Specifies the PCI passthrough device information in the "PCI device name:Quantity" format. Use commas (,) to separate multiple device information records. For example, nvidia-a30:1 indicates that the ECS has an A30 GPU attached. Range N/A |
| cond:operation:status | String | Definition 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 specified or used, the status is normal. Range
|
| cond:operation:az | String | Definition 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 for commercial use in AZs 0 and 3, sold out in AZ 1, for OBT in AZ 2, and is canceled in other AZs. Then, set parameters as follows:
NOTE: Configure this parameter if the flavor status in an AZ is different from the cond:operation:status value. Range N/A |
| quota:max_rate | String | Definition Specifies the maximum bandwidth. Range Unit: Mbit/s. If the unit is Gbit/s, the value is divided by 1000. |
| quota:min_rate | String | Definition Specifies the assured bandwidth. Range Unit: Mbit/s. If the unit is Gbit/s, the value is divided by 1000. |
| quota:max_pps | String | Definition Specifies the maximum intranet PPS. Range Unit: number. If a value is in the unit of 10000, the value is divided by 10000. |
| cond:operation:charge:stop | String | Definition Specifies whether charges apply after the ECS is stopped. By default, no charge applies. Range
|
| cond:operation:charge | String | Definition Specifies the billing mode. All billing modes are supported if this parameter is not specified. Range
|
| cond:spot:operation:az | String | Definition For sales information about spot ECSs, use the API for querying flavor sales policies. Specifies the AZ for the flavors in spot pricing billing mode. Range N/A |
| cond:operation:roles | String | Definition Specifies the allowed roles. Roles match the tags specified by op_gatexxx of roles. If this parameter is not specified, all users can use this API. Range N/A |
| cond:spot:operation:status | String | Definition Specifies the status of a flavor in spot pricing billing mode. For sales information about spot ECSs, use the API for listing flavor sales policies. If this parameter is not specified, abandon is used. Range
|
| cond:network | String | Definition Specifies network constraints. Network features are supported. If this parameter is not specified, the default configuration on the console is used. Range N/A |
| cond:storage | String | Definition Specifies storage constraints. Disk features are supported. If this parameter is not specified, the default configuration on the console is used. Range
|
| cond:compute:live_resizable | String | Definition Specifies compute constraints. Range
|
| cond:compute | String | Definition Specifies compute constraints. Range
|
| ecs:instance_architecture | String | Definition Specifies the CPU architecture corresponding to the flavor. This parameter is returned only for Kunpeng ECSs. Range The value arm64 indicates that the CPU architecture is Kunpeng. |
| info:gpu:name | String | Definition Specifies the number and names of GPUs. Range N/A |
| info:cpu:name | String | Definition Specifies the CPU name. Range N/A |
| quota:gpu | String | Definition Specifies the GPU name. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| free_scsi | Integer | Definition Specifies the number of SCSI disks that can be attached. Range N/A |
| free_blk | Integer | Definition Specifies the number of VBD disks that can be attached. Range N/A |
| free_disk | Integer | Definition Specifies the number of disks that can be attached. Range N/A |
| free_nic | Integer | Definition Specifies the number of NICs that can be attached. Range N/A |
For more information, see "ECS Specifications and Types" in Elastic Cloud Server User Guide.
Example Request
List ECS flavor details and extended flavor information.
GET https://{endpoint}/v1/{project_id}/cloudservers/flavors?availability_zone=availability_value Example Response
{
"flavors": [
{
"attachableQuantity": {
"free_scsi": 60,
"free_blk": 24,
"free_disk": 60,
"free_nic": 12
},
"id": "c3.2xlarge.2",
"name": "c3.2xlarge.2",
"vcpus": "8",
"ram": 16384,
"disk": "0",
"swap": "",
"links": [
{
"rel": "self",
"href": "https://ecs.region.example.com/v1.0/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.2",
"type": null
},
{
"rel": "bookmark",
"href": "https://ecs.region.example.com/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.2",
"type": null
}
],
"OS-FLV-EXT-DATA:ephemeral": 0,
"rxtx_factor": 1,
"OS-FLV-DISABLED:disabled": false,
"rxtx_quota": null,
"rxtx_cap": null,
"os-flavor-access:is_public": true,
"os_extra_specs": {
"ecs:virtualization_env_types": "CloudCompute",
"ecs:generation": "c3",
"ecs:instance_architecture":"arm64" ,
"ecs:performancetype": "computingv3",
"resource_type": "IOoptimizedC3_2"
}
}
]
} Returned Values
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.