查询云服务器规格变更支持列表(废弃)
URI
GET /v2.1/{project_id}/resize_flavors?instance_uuid={instance_uuid}&source_flavor_id={source_flavor_id}&source_flavor_name={source_flavor_name}&sort_key={sort_key}&sort_dir={sort_dir}&limit={limit}&marker={marker}
instance_uuid、source_flavor_id、source_flavor_name三个参数必须要选择一个参数使用。如果同时选择传递多个参数,则系统默认按照instance_uuid、source_flavor_id、source_flavor_name的优先级进行处理。
查询参数如表2所示。
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
instance_uuid |
否 |
String |
进行规格切换的云服务器ID,UUID格式。 |
|
source_flavor_id |
否 |
String |
进行规格切换的云服务器源规格ID。 |
|
source_flavor_name |
否 |
String |
进行规格切换的云服务器源规格名称。 |
|
sort_key |
否 |
String |
排序字段。 key的取值范围:
|
|
sort_dir |
否 |
String |
升序/降序排序,默认值为:asc。 取值范围:
|
|
limit |
否 |
Integer |
单页面可显示的flavor条数最大值,默认是1000。 |
|
marker |
否 |
String |
以单页最后一条flavor的ID作为分页标记。 |
请求消息
无
响应消息
响应参数如表3所示。
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
id |
是 |
String |
云服务器规格ID。 |
|
name |
是 |
String |
云服务器规格名称。 |
|
vcpus |
是 |
Integer |
云服务器规格对应要求的CPU核数。 |
|
ram |
是 |
Integer |
云服务器规格对应要求的内存大小,单位为MB。 |
|
disk |
是 |
Integer |
云服务器规格对应要求的系统盘大小。 当前未使用该参数,缺省值为0。 |
|
swap |
否 |
String |
云服务器规格对应要求的交换分区大小。 当前未使用该参数,缺省值为""。 |
|
OS-FLV-EXT-DATA:ephemeral |
是 |
Integer |
扩展属性,临时盘大小。 当前未使用该参数,缺省值为0。 |
|
OS-FLV-DISABLED:disabled |
是 |
Boolean |
扩展属性,指定规格是否可用。
说明:
当前未使用该参数。 |
|
rxtx_factor |
是 |
Float |
扩展属性。
说明:
当前未使用该参数。 |
|
rxtx_quota |
是 |
String |
云服务器可使用网络带宽的软限制。 当前未使用该参数,缺省值为null。 |
|
rxtx_cap |
是 |
String |
云服务器可使用网络带宽的硬限制。 当前未使用该参数,缺省值为null。 |
|
os-flavor-access:is_public |
是 |
Boolean |
扩展属性,flavor是否给所有租户使用。
缺省值为“true”。 |
|
links |
是 |
Array of objects |
规格相关快捷链接地址。 详情请参见表5。 |
|
extra_specs |
是 |
Array of objects |
云服务器规格的扩展字段。 详情请参见表6。 |
请求示例
GET https://{endpoint}/v1/{project_id}/cloudservers/resize_flavors?source_flavor_id=c3.xlarge.2
响应示例
{
"flavors": [
{
"id": "c3.15xlarge.2",
"name": "c3.15xlarge.2",
"vcpus": "60",
"ram": 131072,
"disk": "0",
"swap": "",
"links": [
{
"rel": "self",
"href": "https://compute-ext.region.xxx.com/v1.0/743b4c0428d94531b9f2add666642e6b/flavors/c3.15xlarge.2",
"type": null
},
{
"rel": "bookmark",
"href": "https://compute-ext.region.xxx.com/743b4c0428d94531b9f2add666642e6b/flavors/c3.15xlarge.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,
"extra_specs": {
"ecs:virtualization_env_types": "CloudCompute",
"ecs:generation": "c3",
"ecs:performancetype": "computingv3",
"resource_type": "IOoptimizedC3_2"
}
}
]
}
返回值
请参考通用请求返回值。
错误码
请参考错误码。