Querying Details About Flavors and Extended Flavor Information
Function
This API is used to query details about ECS flavors and extended flavor information.
URI
GET /v1/{project_id}/cloudservers/flavors?availability_zone={availability_zone}
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
availability_zone |
No |
String |
Specifies the AZ name, ID, or code. |
Request
None
Response
|
Parameter |
Type |
Description |
|---|---|---|
|
flavors |
Array of objects |
Specifies ECS flavors. For details, see Table 4. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Specifies the ID of the ECS flavor. |
|
name |
String |
Specifies the name of the ECS flavor. |
|
vcpus |
String |
Specifies the number of vCPUs in the ECS flavor. |
|
ram |
Integer |
Specifies the memory size (MB) in the ECS flavor. |
|
disk |
String |
Specifies the system disk size in the ECS flavor. This parameter has not been used. Its default value is 0. |
|
swap |
String |
Specifies the swap partition size required by the ECS flavor. This parameter has not been used. Its default value is "". |
|
OS-FLV-EXT-DATA:ephemeral |
Integer |
Specifies the temporary disk size. This is an extended attribute. This parameter has not been used. Its default value is 0. |
|
OS-FLV-DISABLED:disabled |
Boolean |
Specifies whether the ECS flavor has been disabled. This is an extended attribute. This parameter has not been used. Its default value is false. |
|
rxtx_factor |
Float |
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. |
|
rxtx_quota |
String |
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. |
|
rxtx_cap |
String |
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. |
|
os-flavor-access:is_public |
Boolean |
Specifies whether a flavor is available to all tenants. This is an extended attribute.
Default value: true |
|
links |
Array of objects |
Specifies shortcut links for ECS flavors. For details, see Table 5. |
|
os_extra_specs |
Objects |
Specifies extended ECS specifications. For details, see Table 6. |
|
attachableQuantity |
Objects |
Specifies the number of NICs and disks that can be attached to an ECS. For details, see Table 7. |
|
Parameter |
Type |
Description |
|---|---|---|
|
rel |
String |
Specifies the shortcut link marker name. |
|
href |
String |
Provides the corresponding shortcut link. |
|
type |
String |
Specifies the shortcut link type. This parameter has not been used. Its default value is null. |
|
Parameter |
Type |
Description |
|---|---|---|
|
ecs:performancetype |
String |
Specifies the ECS flavor type:
NOTE:
In an earlier registered flavor, this field is hws:performancetype. |
|
resource_type |
String |
Specifies the resource type. resource_type is used to differentiate between the types of the physical servers accommodating ECSs. |
|
quota:local_disk |
String |
The value of this parameter is in format of "{type}:{count}:{size}:{safeFormat}", where,
NOTE:
This field is dedicated for disk-intensive ECSs. |
|
quota:nvme_ssd |
String |
The value of this parameter is in format of "{type}:{spec}:{size}:{safeFormat}".
NOTE:
This field is dedicated for ultra-high I/O ECSs. |
|
ecs:generation |
String |
Specifies the generation of an ECS type.
NOTE:
This field is optional. |
|
ecs:virtualization_env_types |
String |
Specifies a virtualization type.
NOTE:
This field is optional. |
|
pci_passthrough:enable_gpu |
Boolean |
Indicates whether the GPU is passthrough. If the value is true, the GPU is passthrough. |
|
pci_passthrough:gpu_specs |
String |
Indicates the technology used on the G1 and G2 ECSs, including GPU virtualization and GPU passthrough.
|
|
pci_passthrough:alias |
String |
Indicates the model and quantity of passthrough-enabled GPUs on P1 ECSs. The parameter value can be set to nvidia-p100:1, indicating that the ECS using this specification will occupy one NVIDIA P100 GPU. |
|
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:
|
|
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 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. |
|
quota:max_rate |
String |
Specifies the maximum bandwidth.
|
|
quota:min_rate |
String |
Specified the assured bandwidth.
|
|
quota:max_pps |
String |
Specifies the maximum intranet PPS.
|
|
cond:operation:charge |
String |
Specifies a billing type.
|
|
Parameter |
Type |
Description |
|---|---|---|
|
free_scsi |
Integer |
Specifies the number of SCSI disks that can be attached. |
|
free_blk |
Integer |
Specifies the number of VBD disks that can be attached. |
|
free_disk |
Integer |
Specifies the number of disks that can be attached. |
|
free_nic |
Integer |
Specifies the number of NICs that can be attached. |
For details about the flavors that have been released, see Instances in Elastic Cloud Server Service Overview.
Example Request
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.xxx.com/v1.0/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.2",
"type": null
},
{
"rel": "bookmark",
"href": "https://ecs.region.xxx.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:performancetype": "computingv3",
"resource_type": "IOoptimizedC3_2"
}
}
]
}
Returned Values
Error Codes
Last Article: Flavor Management
Next Article: Querying the Target ECS Flavors to Which a Flavor Can Be Changed
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.