Query available images

Last Updated: Jul 25, 2017

Description

Query the list of images available to the user. The displayed image resource list contains private images of the user and images of system resources provided by Alibaba Cloud, as well as other public images and those available on the image market. An image market image must be subscribed to at the image market website before an ECS instance can be created. This interface supports querying by page. The query results contain the total number of usable image resources and the image resources on the current page. By default, 10 results 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>ubuntu1204_32_20G_aliaegis_20140703.vhd</ImageId>
  15. <ImageName>ubuntu1204_32_20G_aliaegis_20140703.vhd</ImageName>
  16. <ImageOwnerAlias>system</ImageOwnerAlias>
  17. <ImageVersion>1.0</ImageVersion>
  18. <IsSubscribed>false</IsSubscribed>
  19. <OSName>Ubuntu 12.04 32浣?lt;/OSName>
  20. <ProductCode></ProductCode>
  21. <Progress>100</Progress>
  22. <Size>20</Size>
  23. <Status>Available</Status>
  24. </Image>
  25. <Image>
  26. <Architecture>i386</Architecture>
  27. <CreationTime>2014-07-22T09:53:44Z</CreationTime>
  28. <Description></Description>
  29. <DiskDeviceMappings>
  30. <DiskDeviceMapping>
  31. <Device>/dev/xvda</Device>
  32. <Size>20</Size>
  33. <SnapshotId></SnapshotId>
  34. </DiskDeviceMapping>
  35. </DiskDeviceMappings>
  36. <ImageId>ubuntu1204_32_20G_aliaegis_20140703.vhd</ImageId>
  37. <ImageName>ubuntu1204_32_20G_aliaegis_20140703.vhd</ImageName>
  38. <ImageOwnerAlias>system</ImageOwnerAlias>
  39. <ImageVersion>1.0</ImageVersion>
  40. <IsSubscribed>false</IsSubscribed>
  41. <OSName>Ubuntu 12.04 32浣?lt;/OSName>
  42. <ProductCode></ProductCode>
  43. <Progress>100</Progress>
  44. <Size>20</Size>
  45. <Status>Available</Status>
  46. </Image>
  47. </Images>
  48. <PageNumber>1</PageNumber>
  49. <PageSize>2</PageSize>
  50. <RegionId>cn-hangzhou</RegionId>
  51. <TotalCount>24</TotalCount>
  52. <RequestId>7871BB26-3002-4950-B2E6-98D333077EA5</RequestId>
  53. </DescribeImagesResponse>

JSON format

  1. {
  2. "Images": {
  3. "Image": [
  4. {
  5. "Architecture": "i386",
  6. "CreationTime": "2014-07-22T09:53:44Z",
  7. "Description": "",
  8. "DiskDeviceMappings": {
  9. "DiskDeviceMapping": [
  10. {
  11. "Device": "/dev/xvda",
  12. "Size": "20",
  13. "SnapshotId": ""
  14. }
  15. ]
  16. }
  17. "ImageId": "ubuntu1204_32_20G_aliaegis_20140703.vhd",
  18. "ImageName": "ubuntu1204_32_20G_aliaegis_20140703.vhd",
  19. "ImageOwnerAlias": "system",
  20. "ImageVersion": "1.0",
  21. "IsSubscribed": false,
  22. "OSName": "Ubuntu 12.04 32 bits",
  23. "ProductCode": "",
  24. "Size": 20
  25. },
  26. {
  27. "Architecture": "x86_64",
  28. "CreationTime": "2014-07-22T09:53:19Z",
  29. "Description": "",
  30. "DiskDeviceMappings": {
  31. "DiskDeviceMapping": [
  32. {
  33. "Device": "/dev/xvda",
  34. "Size": "20",
  35. "SnapshotId": ""
  36. }
  37. ]
  38. }
  39. "ImageId": "ubuntu1204_64_20G_aliaegis_20140703.vhd",
  40. "ImageName": "ubuntu1204_64_20G_aliaegis_20140703.vhd",
  41. "ImageOwnerAlias": "system",
  42. "ImageVersion": "1.0",
  43. "IsSubscribed": false,
  44. "OSName": "Ubuntu 12.04 64 bits",
  45. "ProductCode": "",
  46. "Size": 20
  47. }
  48. ]
  49. }
  50. "PageNumber": 1,
  51. "PageSize": 2,
  52. "RegionId": "cn-hangzhou",
  53. "RequestId": "49CBCED4-C9B9-4851-BEB5-8FB5E5169E30",
  54. "TotalCount": 24
  55. }
Thank you! We've received your feedback.