Queries the instance types supported by the specified image.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Name Type Required? Example value Description
RegionId String Yes cn-hangzhou

The ID of the region to which the instance belongs. To view the latest list of Alibaba Cloud regions, call DescribeRegions.

Action String No DescribeImageSupportInstanceTypes The name of this action. Value: DescribeImageSupportInstanceTypes
ActionType String No *

The scenario where the instance type is used. Valid values:

  • CreateEcs (default): creates an instance.
  • Upgrade: upgrades an instance type.
  • Downgrade: downgrades an instance type.
  • RenewDowngrade: renews and downgrades an instance type.
Filter.N.Key String No CreationStartTime Specifies the filtering condition Key.
Filter.N.Value String No 2017-12-05T22:40:00Z Specifies the filtering condition Value.
ImageId String No m-imageid1 The image ID.

Response parameters

Name Type Example value Description
ImageId String m-imageid2 The ID of the image to be queried.
InstanceTypes - - The instance type set that consists of InstanceTypeItemType.
 └CpuCoreCount Integer 1 The number of vCPU kernels of the instance type.
 └InstanceTypeFamily String ecs.t1 The instance type family.
 └InstanceTypeId String ecs.t1.xsmall The ID of the instance type supported by the image.
 └MemorySize Float 1024

The memory size of the instance type.

Unit: GiB

RegionId String cn-hangzhou The ID of the region to which the image belongs.
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E The request ID.

Example

Request example




https://ecs.aliyuncs.com/?Action=DescribeImageSupportInstanceTypes
&RegionId=cn-hangzhou
&ImageId=m-imageid1
&<Common Request Parameters>
			

Response example

XML format

<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

{
	"ImageId":"ubuntu_16_0402_64_20G_alibase_20180409.vhd",
	"InstanceTypes":{
		"InstanceType":[
			{
				"CpuCoreCount":1,
				"InstanceTypeFamily":"ecs.t1",
				"InstanceTypeId":"ecs.t1.xsmall",
				"MemorySize":0.5
			},
			{
				"CpuCoreCount":1,
				"InstanceTypeFamily":"ecs.t1",
				"InstanceTypeId":"ecs.t1.small",
				"MemorySize":1
			}
		]
	},
	"RegionId":"cn-hangzhou",
	"RequestId":"CF661E2D-4AFE-4BCD-959A-A65E14416B44"
}

Errors

HTTP status code Error code Error message Meaning
400 InvalidParamter Invalid Parameter The specified parameter is invalid.
404 InvalidUsage The specifed Usage is not valid The specified resource type (image, disk, image_disk, or none) that is referenced is invalid.
400 InvalidInstanceType.ValueNotSupported The specified InstanceType does not exist or beyond the permitted range. The specified instance type is not supported.

For a list of error codes, visit the API Error Center.