Queries the instance types supported by an image.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | DescribeImageSupportInstanceTypes | The operation that you want to perform. Set the value to DescribeImageSupportInstanceTypes. |
RegionId | String | Yes | cn-hangzhou | The region ID of the image. You can call the DescribeRegions operation to query the most recent region list. |
ImageId | String | No | m-o6w3gy99qf89rkga**** | The ID of the image. |
ActionType | String | No | CreateEcs | The scenario in which you want to use the image. Valid values:
|
Filter.N.Key | String | No | imageId | The key of filter N. Only the image ID can be used to filter instance types. Valid values:
Note This parameter does not take effect and will be removed in the future. |
Filter.N.Value | String | No | m-o6w3gy99qf89rkga**** | The value of filter N. Note This parameter does not take effect and will be removed in the future. |
Response parameters
Parameter |
Type |
Example |
Description |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E | The ID of the request. |
ImageId | String | m-o6w3gy99qf89rkga**** | The ID of the image. |
RegionId | String | cn-hangzhou | The region ID of the image. |
InstanceTypes | Array of InstanceType | Details about the instance types that are supported by the image. |
|
InstanceType | |||
InstanceTypeId | String | ecs.t1.xsmall | The ID of the instance type. |
InstanceTypeFamily | String | ecs.t1 | The instance family. |
CpuCoreCount | Integer | 1 | The number of vCPUs of the instance type. |
MemorySize | Float | 1024 | The memory size of the instance type. Unit: GiB. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=DescribeImageSupportInstanceTypes
&RegionId=cn-hangzhou
&ImageId=m-o6w3gy99qf89rkga****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeImageSupportInstanceTypesResponse>
<RequestId>CF661E2D-4AFE-4BCD-959A-A65E14416B44</RequestId>
<RegionId>cn-hangzhou</RegionId>
<ImageId>ubuntu_16_0402_64_20G_alibase_20180409.vhd</ImageId>
<InstanceTypes>
<InstanceType>
<InstanceTypeId>ecs.t1.xsmall</InstanceTypeId>
<CpuCoreCount>1</CpuCoreCount>
<MemorySize>0.5</MemorySize>
<InstanceTypeFamily>ecs.t1</InstanceTypeFamily>
</InstanceType>
<InstanceType>
<InstanceTypeId>ecs.t1.small</InstanceTypeId>
<CpuCoreCount>1</CpuCoreCount>
<MemorySize>1</MemorySize>
<InstanceTypeFamily>ecs.t1</InstanceTypeFamily>
</InstanceType>
</InstanceTypes>
</DescribeImageSupportInstanceTypesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "CF661E2D-4AFE-4BCD-959A-A65E14416B44",
"RegionId" : "cn-hangzhou",
"ImageId" : "ubuntu_16_0402_64_20G_alibase_20180409.vhd",
"InstanceTypes" : {
"InstanceType" : [ {
"InstanceTypeId" : "ecs.t1.xsmall",
"CpuCoreCount" : 1,
"MemorySize" : 0.5,
"InstanceTypeFamily" : "ecs.t1"
}, {
"InstanceTypeId" : "ecs.t1.small",
"CpuCoreCount" : 1,
"MemorySize" : 1,
"InstanceTypeFamily" : "ecs.t1"
} ]
}
}
Error codes
HTTP status code |
Error code |
Error message |
Description |
400 | InvalidParamter | Invalid Parameter. | Invalid parameter value. |
400 | InvalidInstanceType.ValueNotSupported | The specified InstanceType does not exist or beyond the permitted range. | The specified instance type is not found, or you are not authorized to manage instances of the instance type. |
404 | InvalidUsage | The specifed Usage is not valid. | Invalid Usage value. |
404 | InvalidImageId.NotFound | The specified image does not exist. | The specified image does not exist in this account. Check whether the image ID is correct. |
For a list of error codes, see Service error codes.