获取镜像列表

更新时间:
复制 MD 格式

ListImages

描述

列出用户所有镜像信息。

请求语法

请求行:

  1. GET /images?Marker={Marker}&MaxItemCount={MaxItemCount}&Type={Type} HTTP/1.1

请求方法为 GET ,请求资源为 images ,属性说明如下:

属性名称 类型 是否必须 描述
Marker string 否 本页起始资源标识符。默认为空字符串。
MaxItemCount int 否 实际返回最大资源数量。默认值50,最大值100。
Type string 否 返回的镜像类型,现在只支持“System”和“Self”,其他无效类型效果同无此字段。默认:“Self”。

返回信息

成功

状态行:

  1. HTTP/1.1 200 OK

响应数据:

  1. {
  2. "NextMarker": "xxmarkerxx",
  3. "Items":[{
  4. "CreationTime": "2016-10-31T06:55:33.921878Z",
  5. "Description": "Centos 6.5 64位,python 2.6.6",
  6. "EcsImageId": "m-28rvocix1",
  7. "Id": "img-centos",
  8. "Name": "Centos-6.5-x64",
  9. "OwnerId": 0,
  10. "Platform": "Linux",
  11. "Type": "System"
  12. },
  13. {
  14. "CreationTime": "2016-10-31T06:55:33.921890Z",
  15. "Description": "Ubuntu 14.04 64位, python 2.7, jdk 1.7, Docker 1.10.1",
  16. "EcsImageId": "m-28lyfn0tr",
  17. "Id": "img-ubuntu",
  18. "Name": "ubuntu-14.04-x64",
  19. "OwnerId": 0,
  20. "Platform": "Linux",
  21. "Type": "System"
  22. },
  23. {
  24. "CreationTime": "2016-10-31T06:55:33.921897Z",
  25. "Description": "Windows Server 2008 R2 企业版 64位 中文",
  26. "EcsImageId": "m-281zatqcs",
  27. "Id": "img-windows",
  28. "Name": "Windows-Server-2008-R2-x64",
  29. "OwnerId": 0,
  30. "Platform": "Windows",
  31. "Type": "System"
  32. }]
  33. }

属性说明

属性名称 类型 是否必须 描述
NextMarker string 是 下一页起始资源标识符。最后一页该值为空。
Items array 是 资源列表,具体的资源格式由ImageInfo描述。

错误

状态码 错误码 错误信息 语义
400 InvalidMaxItemCount Specified parameter MaxItemCount is not valid. Its type must be integer. MaxItemCount必须是一个integer
400 InvalidMaxItemCount Specified parameter MaxItemCount is not valid. It must be in [0, 100]. MaxItemCount的大小必须在0与100之间