DescribeImages

Last Updated: Sep 15, 2017

Description

Query the list of available images.

  • The displayed image resource list contains your custom images, public images from Alibaba Cloud, and other available images from the image market.
  • If you need to create ECS instances using an image from the image market, you must subscribe the image beforehand.
  • You can query images by pages. The result consists of the total number of available image resources and all the image resources on the current page. By default, 10 images are displayed per page.

Request parameters

Name Type Required Description
Action String Yes Required parameter, with a value: DescribeImages.
RegionId String Yes ID of the region to which an instance belongs.
ImageId String No The image ID. Multiple image IDs can be entered, separated by single-byte commas.
SnapshotId String No The ID of the snapshot used to create the image.
ImageName String No The name of the image.
ImageOwnerAlias string No The alias of the image owner.
Value:
  • system | self | others | marketplace
Default value: None, indicates that system + self + others is returned
If this parameter is not specified, this parameter is not used as a filter condition.
Value description:
  • system: images provided by Alibaba Cloud
  • self: images defined by users.
  • others: available images of others.
  • marketplace: images available on the image market.
PageNumber Integer No Page number of the instance status list. The start value is 1. The default value is 1.
PageSize Integer No Sets the number of lines per page for queries per page. The maximum value is 50. The default value is 10.

Return parameters

Name Type Description
RegionId String The region ID of the image.
TotalCount Integer The number of items on the list.
PageNumber Integer The current page.
PageSize Integer The number of items on the current page.
Images ImageType A collection composed of image information ImageType.

Error code

Error Code Description Http status code Meaning
MissingParameter The input parameter RegionId that is mandatory for processing this request is not supplied. 400 RegionId field missing.
InvalidImageOwnerAlias.ValueNotSupported The specified ImageOwnerAlias value is not supported. 400 Invalid ImageOwnerAlias value.
InvalidParameter The specified parameter PageNumber is not valid. 400 The specified PageNumber parameter is invalid.
InvalidParameter The specified parameter PageSize is not valid. 400 The specified PageSize parameter is invalid.

Examples

Request example

  1. https://ecs.aliyuncs.com/?Action=DescribeImages
  2. &RegionId=cn-hangzhou
  3. &<Public Request Parameters>

Return example

XML format

  1. <DescribeImagesResponse>
  2. <Images>
  3. <Image>
  4. <Architecture>i386</Architecture>
  5. <CreationTime>2014-07-22T09:53:44Z</CreationTime>
  6. <Description></Description>
  7. <DiskDeviceMappings>
  8. <DiskDeviceMapping>
  9. <Device>/dev/xvda</Device>
  10. <Size>20</Size>
  11. <SnapshotId></SnapshotId>
  12. </DiskDeviceMapping>
  13. </DiskDeviceMappings>
  14. <ImageId>suse11sp3_64_20G_aliaegis_20150428.vhd</ImageId>
  15. <ImageName>suse11sp3_64_20G_aliaegis_20150428.vhd</ImageName>
  16. <ImageOwnerAlias>system</ImageOwnerAlias>
  17. <ImageVersion>1.0</ImageVersion>
  18. <IsCopied>false</IsCopied>
  19. <IsSubscribed>false</IsSubscribed>
  20. <OSName>SUSE Linux Enterprise Server 11 SP3 64bit</OSName>
  21. <ProductCode></ProductCode>
  22. <OSType>linux</OSType>
  23. <Platform>SUSE</Platform>
  24. <Progress>100</Progress>
  25. <Size>20</Size>
  26. <Status>Available</Status>
  27. <Usage>instance</Usage>
  28. </Image>
  29. </Images>
  30. <PageNumber>1</PageNumber>
  31. <PageSize>2</PageSize>
  32. <RegionId>cn-hangzhou</RegionId>
  33. <TotalCount>24</TotalCount>
  34. <RequestId>7871BB26-3002-4950-B2E6-98D333077EA5</RequestId>
  35. </DescribeImagesResponse>

JSON format

  1. {
  2. "Images": {
  3. "Image": [
  4. {
  5. "Architecture": "x86_64",
  6. "CreationTime": "2015-05-06T09:01:32Z",
  7. "DiskDeviceMappings": {
  8. "DiskDeviceMapping": [
  9. {
  10. "Device": "/dev/xvda",
  11. "Size": "20"
  12. }
  13. ]
  14. },
  15. "ImageId": "suse11sp3_64_20G_aliaegis_20150428.vhd",
  16. "ImageName": "suse11sp3_64_20G_aliaegis_20150428.vhd",
  17. "ImageOwnerAlias": "system",
  18. "ImageVersion": "1",
  19. "IsCopied": false,
  20. "IsSubscribed": false,
  21. "OSName": "SUSE Linux Enterprise Server 11 SP3 64bit",
  22. "OSType": "linux",
  23. "Platform": "SUSE",
  24. "Progress": "100%",
  25. "Size": 20,
  26. "Status": "Available",
  27. "Usage": "instance"
  28. }
  29. ]
  30. }
  31. "PageNumber": 1,
  32. "PageSize": 1,
  33. "RegionId": "cn-hangzhou",
  34. "RequestId": "49CBCED4-C9B9-4851-BEB5-8FB5E5169E30",
  35. "TotalCount": 24
  36. }
Thank you! We've received your feedback.