调用ListAvailableEcsTypes查询可用的ECS实例规格资源。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ehpc:ListAvailableEcsTypes |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ZoneId |
string |
否 |
可用区 ID。 |
cn-hangzhou-b |
| SpotStrategy |
string |
否 |
ECS 实例抢占策略。取值范围:
|
NoSpot |
| InstanceChargeType |
string |
否 |
ECS 实例的付费类型。取值范围:
|
PostPaid |
| ShowSoldOut |
boolean |
否 |
是否显示 ECS 实例已售罄。取值范围:
默认值:false |
false |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| SupportSpotInstance |
boolean |
是否支持抢占式实例。可能值:
|
false |
| RequestId |
string |
请求 ID。 |
D9DD3AF8-1F91-4075-8669-55D10E45**** |
| InstanceTypeFamilies |
object |
||
| InstanceTypeFamilyInfo |
array<object> |
实例规格所属的规格族。 |
|
|
object |
|||
| Generation |
string |
实例规格族。 |
ecs-3 |
| InstanceTypeFamilyId |
string |
实例规格所属的规格族 ID。更多详情,请参见实例规格族。 |
ecs.n4 |
| Types |
object |
||
| TypesInfo |
array<object> |
规格列表。 |
|
|
object |
|||
| Status |
string |
ECS 实例状态。可能值:
|
Available |
| InstanceTypeId |
string |
ECS 实例规格 ID。 |
ecs.n4.xlarge |
| InstanceBandwidthRx |
integer |
内网入方向带宽限制。单位:kbit/s |
10240000 |
| GPUSpec |
string |
ECS 实例安装的 GPU 类型。 |
NVIDIA V100 |
| InstanceBandwidthTx |
integer |
内网出方向带宽限制。单位:kbit/s |
10240000 |
| InstancePpsRx |
integer |
内网入方向网络收发包能力。单位:Pps |
9000000 |
| InstancePpsTx |
integer |
内网出方向网络收发包能力。单位:Pps |
9000000 |
| GPUAmount |
integer |
ECS 实例安装的 GPU 数量。 |
2 |
| CpuCoreCount |
integer |
vCPU 内核数目。 |
4 |
| MemorySize |
integer |
ECS 实例内存大小。单位:GiB |
8 |
| EniQuantity |
integer |
ECS 实例支持挂载的弹性网卡上限。 |
2 |
| ZoneIds |
object |
||
| ZoneId |
array |
可用区 ID 列表。 |
|
|
string |
可用区 ID 列表。 |
cn-hangzhou-b |
示例
正常返回示例
JSON格式
{
"SupportSpotInstance": false,
"RequestId": "D9DD3AF8-1F91-4075-8669-55D10E45****",
"InstanceTypeFamilies": {
"InstanceTypeFamilyInfo": [
{
"Generation": "ecs-3",
"InstanceTypeFamilyId": "ecs.n4",
"Types": {
"TypesInfo": [
{
"Status": "Available",
"InstanceTypeId": "ecs.n4.xlarge",
"InstanceBandwidthRx": 10240000,
"GPUSpec": "NVIDIA V100",
"InstanceBandwidthTx": 10240000,
"InstancePpsRx": 9000000,
"InstancePpsTx": 9000000,
"GPUAmount": 2,
"CpuCoreCount": 4,
"MemorySize": 8,
"EniQuantity": 2,
"ZoneIds": {
"ZoneId": [
"cn-hangzhou-b"
]
}
}
]
}
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | 指定的参数 %s 无效。 |
| 500 | UnknownError | An unknown error occurred. | 未知错误 |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | 请求失败,服务暂时不可用 |
| 406 | EcsError | An error occurred while calling the ECS API operation. | ECS API调用出错. %s |
| 407 | NotAuthorized | You are not authorized by RAM for this request. | 此请求未获得RAM授权 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。