获取镜像列表
更新时间:
ListImages
描述
列出用户所有镜像信息。
请求语法
请求行:
GET /images?Marker={Marker}&MaxItemCount={MaxItemCount}&Type={Type} HTTP/1.1
请求方法为 GET ,请求资源为 images ,属性说明如下:
| 属性名称 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| Marker | string | 否 | 本页起始资源标识符。默认为空字符串。 |
| MaxItemCount | int | 否 | 实际返回最大资源数量。默认值50,最大值100。 |
| Type | string | 否 | 返回的镜像类型,现在只支持“System”和“Self”,其他无效类型效果同无此字段。默认:“Self”。 |
返回信息
成功
状态行:
HTTP/1.1 200 OK
响应数据:
{"NextMarker": "xxmarkerxx","Items":[{"CreationTime": "2016-10-31T06:55:33.921878Z","Description": "Centos 6.5 64位,python 2.6.6","EcsImageId": "m-28rvocix1","Id": "img-centos","Name": "Centos-6.5-x64","OwnerId": 0,"Platform": "Linux","Type": "System"},{"CreationTime": "2016-10-31T06:55:33.921890Z","Description": "Ubuntu 14.04 64位, python 2.7, jdk 1.7, Docker 1.10.1","EcsImageId": "m-28lyfn0tr","Id": "img-ubuntu","Name": "ubuntu-14.04-x64","OwnerId": 0,"Platform": "Linux","Type": "System"},{"CreationTime": "2016-10-31T06:55:33.921897Z","Description": "Windows Server 2008 R2 企业版 64位 中文","EcsImageId": "m-281zatqcs","Id": "img-windows","Name": "Windows-Server-2008-R2-x64","OwnerId": 0,"Platform": "Windows","Type": "System"}]}
属性说明
| 属性名称 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| 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之间 |
该文章对您有帮助吗?