调用DescribeInstanceTypes查询实例规格列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ens:DescribeInstanceTypes |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| InstanceType |
string |
否 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| Code |
integer |
业务码。调用成功返回 0,失败返回错误码。 |
0 |
| InstanceTypes |
object |
||
| InstanceType |
array<object> |
实例规格集合。 |
|
|
object |
规格列表信息。 |
||
| CpuCoreCount |
integer |
vCPU 内核数目。 |
2 |
| InstanceTypeId |
string |
此参数暂时不用。 |
此参数暂时不用。 |
| InstanceTypeName |
string |
实例规格名称。 |
ens.xxx.small |
| MemorySize |
integer |
内存大小,单位:MB。 |
8192 |
| InstanceBandwidthRx |
integer |
||
| InstanceBandwidthTx |
integer |
||
| InstanceType |
string |
||
| RequestId |
string |
请求 ID。 |
D452D190-BADF-5D09-910D-599B96D42AAA |
示例
正常返回示例
JSON格式
{
"Code": 0,
"InstanceTypes": {
"InstanceType": [
{
"CpuCoreCount": 2,
"InstanceTypeId": "此参数暂时不用。",
"InstanceTypeName": "ens.xxx.small",
"MemorySize": 8192,
"InstanceBandwidthRx": 0,
"InstanceBandwidthTx": 0,
"InstanceType": ""
}
]
},
"RequestId": "D452D190-BADF-5D09-910D-599B96D42AAA"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | MissingParameter | The input parameter domainName that is mandatory for processing this request is not supplied. | |
| 400 | InstanceIdNotFound | The input parameter instancdId that is not found. | 指定的实例ID不存在。 |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. | |
| 400 | CallInterface | Call Interface Happen Error. | 接口调用出错。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?