获取ECS规格列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
paidsw:ListEcsSpecs |
get |
*全部资源
|
无 | 无 |
请求语法
GET /api/v2/ecsspecs HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| AcceleratorType |
string |
是 |
加速器类型。
|
CPU |
| PageNumber |
integer |
否 |
ECS 规格列表的页码。起始值为 1,默认为 1。 |
1 |
| PageSize |
integer |
否 |
分页查询时设置的每页显示的 EC 规格数量。 |
10 |
| SortBy |
string |
否 |
该字段已废弃,不要使用。 |
gmtCreate |
| Order |
string |
否 |
排序顺序。取值如下:
|
DESC |
| ResourceType |
string |
否 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
ECS 规格列表。 |
||
| RequestId |
string |
请求 ID。 |
E7D55162-4489-1619-AAF5-3F97D5FCA948 |
| Success |
boolean |
成功标志,可能值:
|
true |
| Message |
string |
返回结果说明。 |
"XXX" |
| Code |
string |
状态码,可能值:
|
null |
| HttpStatusCode |
integer |
HTTP 状态码,可能值:
|
null |
| TotalCount |
integer |
实例总数。 |
35 |
| EcsSpecs |
array<object> |
本分页中请求的实例列表。 |
|
|
array<object> |
Ecs 规格。 |
||
| InstanceType |
string |
实例规格。 |
ecs.gn5-c28g1.7xlarge |
| GPUType |
string |
显卡类型。可能值:
|
v100 |
| CPU |
integer |
CPU 核数。 |
32 |
| GPU |
integer |
GPU 卡数。 |
4 |
| Memory |
number |
内存大小(GB)。 |
32 |
| SystemDiskCapacity |
integer |
系统盘大小(GB)。 |
500 |
| AcceleratorType |
string |
资源类型。 |
CPU |
| Price |
number |
价格。 |
22.8 |
| Currency |
string |
货币单位。 |
CNY |
| InstanceBandwidthRx |
integer |
实例接收带宽。 |
5120000 |
| Labels |
array<object> |
ECS 规格标签列表。 |
{'foo': 'bar'} |
|
object |
标签。 |
||
| Key |
string |
ECS 规格标签键。 |
SupportResourcePackDeduction |
| Value |
string |
ECS 规格标签值。 |
true |
| IsAvailable |
boolean |
资源是否可用 |
True |
| GPUMemorySize |
number |
||
| SpotStockStatus |
string |
示例
正常返回示例
JSON格式
{
"RequestId": "E7D55162-4489-1619-AAF5-3F97D5FCA948",
"Success": true,
"Message": "\"XXX\"",
"Code": "null",
"HttpStatusCode": 0,
"TotalCount": 35,
"EcsSpecs": [
{
"InstanceType": "ecs.gn5-c28g1.7xlarge",
"GPUType": "v100",
"CPU": 32,
"GPU": 4,
"Memory": 32,
"SystemDiskCapacity": 500,
"AcceleratorType": "CPU",
"Price": 22.8,
"Currency": "CNY",
"InstanceBandwidthRx": 5120000,
"Labels": [
{
"Key": "SupportResourcePackDeduction",
"Value": "true"
}
],
"IsAvailable": true,
"GPUMemorySize": 0,
"SpotStockStatus": ""
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。