DescribeImages
获取一个或多个镜像。
可根据镜像ID,状态,镜像名称、操作系统平台作过滤条件,来获取镜像列表。 如果不指定任何过滤条件,默认返回你所拥有的所有镜像。 如果指定不存在的镜像ID,或非法状态值,则会返回错误信息。
基本信息
Action
Path
/iaas
Method
GET
请求参数
此接口除公共参数外,还包含以下参数。关于公共参数的更多信息,请参见前文内容。
| 参数名 | 类型 | 描述 | 是否必须 |
|---|---|---|---|
images.n |
String |
镜像ID |
否 |
processor_type |
String |
镜像支持的处理器类型,有效值为 64bit 和 32bit |
否 |
os_family |
String |
镜像操作系统发行版,有效值为 centos,ubuntu,debian,fedora 和 windows 等 |
否 |
visibility |
String |
镜像的可见范围,有效值为 public 和 private |
否 |
provider |
String |
镜像提供者。初始青云系统会提供一系列默认镜像,其 provider 为 system 。 当用户捕获云服务器后,被捕获的"自有"镜像的 provider 为 self 。 |
否 |
status.n |
String |
镜像状态: pending, available, deprecated, suspended, deleted, ceased |
否 |
search_word |
String |
搜索关键词,支持镜像ID,镜像名称 |
否 |
verbose |
Integer |
是否返回冗长的信息,目前 verbose 只支持为 0。 |
否 |
Response Elements
| 参数名 | 类型 | 描述 |
|---|---|---|
image_set |
Array |
JSON 格式的镜像数据列表,每项参数可见下面 Response Item |
total_count |
Integer |
根据过滤条件得到的镜像总数 |
image_set 参数说明如下。
| 参数名 | 类型 | 描述 |
|---|---|---|
image_id |
String |
镜像ID |
image_name |
String |
镜像名称 |
description |
String |
镜像描述 |
size |
Integer |
镜像空间大小,单位为 GB |
processor_type |
String |
镜像支持的处理器类型,有效值为 64位 ( 64bit ) 和 32位 ( 32bit ) |
platform |
String |
镜像操作系统平台,有效值为 linux 和 windows |
os_family |
String |
镜像操作系统发行版,有效值为 centos,ubuntu,debian,fedora 和 windows 等 |
visibility |
String |
镜像的可见范围,取值说明如下。
|
provider |
String |
镜像提供者,取值说明如下。
|
owner |
String |
镜像提供者 ID |
recommended_type |
String |
运行该镜像的推荐云服务器配置 |
status |
String |
镜像状态,取值说明如下。
|
transition_status |
String |
镜像过渡状态,取值说明如下。
|
create_time |
TimeStamp |
镜像创建时间,为UTC时间,格式可参见 ISO8601. |
status_time |
TimeStamp |
镜像最近一次状态变更时间,为UTC时间,格式可参见 ISO8601. |
tags |
String |
|
请求示例
https://api.<your_domain>/iaas/?action=DescribeImages
&COMMON_PARAMS
返回示例
{
"action":"DescribeImagesResponse",
"total_count":9,
"image_set":[
{
"status":"ceased",
"processor_type":"64bit",
"image_id":"img-37amqany",
"sub_code":1,
"transition_status":"",
"recommended_type":"small_b",
"image_name":"",
"visibility":"private",
"platform":"linux",
"create_time":"2013-08-07T18:16:32Z",
"os_family":"centos",
"provider":"self",
"owner":"usr-1234abcd",
"status_time":"2013-08-17T08:16:33Z",
"tags":[
{ "color":"#c096e0", "tag_id":"tag-rj6nhkn1", "tag_value":"test-tag", "tag_name":"test-tag", "owner":"admin", "tag_key":"test-tag" }
],
"size":20,
"description":null
}
],
"ret_code":0
}