调用ListAvailableEcsTypes查询云服务器ECS可用的实例规格资源。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListAvailableEcsTypes |
操作接口名,系统规定参数,取值:ListAvailableEcsTypes。 |
ZoneId | String | 是 | cn-hangzho-b |
可用区ID。 |
SpotStrategy | String | 否 | NoSpot |
可选项:NoSpot、SpotWithPriceLimit 或 SpotAsPriceGo。具体含义请参考 ECS CreateInstance接口同名参数。 |
InstanceChargeType | String | 否 | PostPaid |
ECS 实例的付费类型:
|
ShowSoldOut | Boolean | 否 | false |
显示实例规格是否卖完。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
InstanceTypeFamilies | Array of InstanceTypeFamilyInfo |
实例规格所属的规格族。 |
|
InstanceTypeFamilyInfo | |||
Generation | String | ecs-3 |
实例规格族系列。 |
InstanceTypeFamilyId | String | ecs.n4 |
实例规格所属的规格族ID。更多详情,请参见实例规格族。 |
Types | Array of TypesInfo |
规格列表。 |
|
TypesInfo | |||
CpuCoreCount | Integer | 4 |
vCPU内核数目。 |
EniQuantity | Integer | 2 |
实例规格支持网卡数量。 |
GPUAmount | Integer | 0 |
实例规格附带GPU数量。 |
GPUSpec | String | 0 |
实例规格附带GPU类型 。 |
InstanceBandwidthRx | Integer | 819200 |
内网入方向带宽限制,单位为kbps。 |
InstanceBandwidthTx | Integer | 819200 |
内网出方向带宽限制,单位为kbps。 |
InstancePpsRx | Integer | 150000 |
内网入方向PPS限制。 |
InstancePpsTx | Integer | 150000 |
内网入方向PPS限制。 |
InstanceTypeId | String | ecs.n4.xlarge |
实例规格ID。 |
MemorySize | Integer | 8 |
内存大小,单位GiB。 |
Status | String | Available |
实例状态。 |
RequestId | String | D9DD3AF8-1F91-4075-8669-55D10E45D9B1 |
请求ID。 |
SupportSpotInstance | Boolean | false |
是否支持竞价实例。 |
示例
请求示例
http(s)://[Endpoint]/?Action=ListAvailableEcsTypes
&ZoneId=cn-hangzho-b
&<公共请求参数>
正常返回示例
XML
格式
<ListAvailableEcsTypesResponse>
<InstanceTypeFamilies>
<InstanceTypeFamilyInfo>
<Types>
<TypesInfo>
<CpuCoreCount>4</CpuCoreCount>
<InstanceBandwidthRx>819200</InstanceBandwidthRx>
<EniQuantity>2</EniQuantity>
<InstancePpsRx>150000</InstancePpsRx>
<InstanceTypeId>ecs.n4.xlarge</InstanceTypeId>
<InstanceBandwidthTx>819200</InstanceBandwidthTx>
<GPUSpec></GPUSpec>
<MemorySize>8</MemorySize>
<GPUAmount>0</GPUAmount>
<InstancePpsTx>150000</InstancePpsTx>
</TypesInfo>
</Types>
<InstanceTypeFamilyId>ecs.n4</InstanceTypeFamilyId>
<Generation>ecs-3</Generation>
</InstanceTypeFamilyInfo>
</InstanceTypeFamilies>
<RequestId>D9DD3AF8-1F91-4075-8669-55D10E45D9B1</RequestId>
<SupportSpotInstance>true</SupportSpotInstance>
</ListAvailableEcsTypesResponse>
JSON
格式
{
"InstanceTypeFamilies": {
"InstanceTypeFamilyInfo": [
{
"Types": {
"TypesInfo": [
{
"CpuCoreCount": 4,
"InstanceBandwidthRx": 819200,
"EniQuantity": 2,
"InstancePpsRx": 150000,
"InstanceTypeId": "ecs.n4.xlarge",
"InstanceBandwidthTx": 819200,
"GPUSpec": "",
"MemorySize": 8,
"GPUAmount": 0,
"InstancePpsTx": 150000
}
]
},
"InstanceTypeFamilyId": "ecs.n4",
"Generation": "ecs-3"
}
]
},
"RequestId": "D9DD3AF8-1F91-4075-8669-55D10E45D9B1",
"SupportSpotInstance": true
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | 请求失败,服务暂时不可用 |
访问错误中心查看更多错误码。
在文档使用中是否遇到以下问题
更多建议
匿名提交