This API is used to query BMS flavors.
The flavors you obtained using this API are all the flavors in the system. The flavors whose names starting with physical are BMS flavors and can be used to create BMSs.
GET /v2.1/{project_id}/flavors/detail{?minDisk={minDisk}&minRam={minRam}&sort_key={sort_key}&sort_dir={sort_dir}}
Table 1 lists the parameters.
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For how to obtain the project ID, see Obtaining Required Information. |
Table 2 lists the optional parameters that can be used to query BMS flavors.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
minDisk |
No |
String |
Specifies the minimum disk size in GB. Only the BMSs with a disk size greater than or equal to the minimum size can be queried. |
minRam |
No |
String |
Specifies the minimum memory size in MB. Only the BMSs with the memory size greater than or equal to the minimum size can be queried. |
sort_key |
No |
String |
Specifies the sorting field. The default value is flavorid. The value of this parameter can also be name, memory_mb, vcpus, root_gb, or flavorid. |
sort_dir |
No |
String |
Specifies the sorting of BMS flavors. The value can be asc or desc, and is asc by default. |
1 | GET https://{ECS Endpoint}/v2.1/bbf1946d374b44a0a2a95533562ba954/flavors/detail |
1 | GET https://{ECS Endpoint}/v2.1/bbf1946d374b44a0a2a95533562ba954/flavors/detail?minDisk=3725 |
1 | GET https://{ECS Endpoint}/v2.1/bbf1946d374b44a0a2a95533562ba954/flavors/detail?minDisk=3725&is_public=true |
Parameter |
Type |
Description |
---|---|---|
flavors |
Array of objects |
Specifies BMS flavors. For details, see Table 3. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the BMS flavor ID. |
name |
String |
Specifies the BMS flavor name. |
vcpus |
Integer |
Specifies the number of CPU cores in the BMS flavor. |
ram |
Integer |
Specifies the memory size (MB) in the BMS flavor. |
disk |
Integer |
Specifies the disk size (GB) in the BMS flavor. |
swap |
String |
This is a reserved attribute. |
OS-FLV-EXT-DATA:ephemeral |
Integer |
This is a reserved attribute. |
OS-FLV-DISABLED:disabled |
Boolean |
This is a reserved attribute. |
rxtx_factor |
Float |
This is a reserved attribute. |
os-flavor-access:is_public |
Boolean |
This is a reserved attribute. |
links |
Array of objects |
Specifies shortcut links of the BMS flavor. For details, see Table 4. |
Parameter |
Type |
Description |
---|---|---|
rel |
String |
Specifies the shortcut link marker name.
|
href |
String |
Specifies the corresponding shortcut link. |
{ "flavors": [ { "name": "physical.o2.medium", "links": [ { "href": "https://openstack.example.com/v2/c685484a8cc2416b97260938705deb65/flavors/physical.o2.medium", "rel": "self" }, { "href": "https://openstack.example.com/c685484a8cc2416b97260938705deb65/flavors/physical.o2.medium", "rel": "bookmark" } ], "ram": 321725, "OS-FLV-DISABLED:disabled": false, "vcpus": 56, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor": 1, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 3725, "id": "physical.o2.medium" } ] }
Returned Values |
Description |
---|---|
200 |
The request has been successfully processed. |
For details about other returned values, see Status Codes.
See Error Codes.