说明:
1. 接口描述
本接口 (DescribeImages) 用于获取用户能够使用的镜像,可以使用这些镜像来创建 CVM 实例。
接口请求域名:image.api.qcloud.com
可以通过镜像 ID 进行查询(最多指定10个镜像 ID);同时,也可以根据镜像的状态或者类型来进行过滤。
镜像拥有5个状态,用户可以根据需要来进行过滤:
1: 创建中
2: 正常
3: 使用中
4: 同步中
5: 复制中
镜像拥有4个类型,用户可以根据需要来进行过滤:
1: 私有镜像 (本账户创建的镜像)
2: 公共镜像 (腾讯云官方镜像)
3: 服务市场 (服务市场提供的镜像)
4: 共享镜像(其他账户共享给本账户的镜像)
北美地区不支持服务市场。
常用公共镜像 ID 一览:
镜像名称 | unImgId/unImageId |
CentOS 5.8 32位 | img-7br3ouzr |
CentOS 5.8 64位 | img-4cq5l3u1 |
CentOS 5.11 32位 | img-ko6c8e6f |
CentOS 5.11 64位 | img-ailu7ftt |
CentOS 6.2 64位 | img-50mr2ow7 |
CentOS 6.3 32位 | img-1afi29f3 |
CentOS 6.3 64位 | img-4w43a15z |
CentOS 6.4 32位 | img-k09t26i1 |
CentOS 6.4 64位 | img-jlo93805 |
CentOS 6.5 32位 | img-7uq6rrhr |
CentOS 6.5 64位 | img-7fwdvfur |
CentOS 6.6 32位 | img-5jbd8jxn |
CentOS 6.6 64位 | img-h5le2uy5 |
CentOS 6.7 32位 | img-ljriodz5 |
CentOS 6.7 64位 | img-9iwld2rx |
CentOS 7.0 64位 | img-b1ve77s9 |
CentOS 7.1 64位 | img-9q2lxkar |
CentOS 7.2 64位 | img-31tjrtph |
Debian 7.4 64位 | img-c1l6bgb1 |
Debian 7.8 32位 | img-2p1g2wjv |
Debian 7.8 64位 | img-feqctcrx |
Debian 8.2 32位 | img-ez7jwngr |
Debian 8.2 64位 | img-hi93l4ht |
Ubuntu Server 12.04 LTS 64位 (Docker) | img-aa9z7opt |
Ubuntu Server 14.04.1 LTS 32位 | img-qpxvpujt |
Ubuntu Server 14.04.1 LTS 64位 | img-3wnd9xpl |
openSUSE 12.3 32位 | img-8bf2kz5x |
openSUSE 12.3 64位 | img-1p6m0vz5 |
openSUSE 13.2 64位 | img-pmhtrjdx |
SUSE Linux Enterprise Server 11 SP3 64位 | img-mg89zx1h |
SUSE Linux Enterprise Server 12 64位 | img-d5304izr |
FreeBSD 10.1 64位 | img-871lthrb |
CoreOS 717.3.0 64位 | img-6mre94jv |
Windows Server 2012 R2 标准版 64位英文版 | img-lkxqa4kj |
Windows Server 2012 R2 标准版 64位中文版 | img-egif9bvl |
Windows Server 2012 R2 数据中心版 64位英文版 | img-2tddq003 |
Ubuntu 16.04.1 LTS 64位中文版 | img-pyqx34y1 |
Windows Server 2016 R2 数据中心版 64位中文版 | img-9id7emv7 |
2. 输入参数
3. 输出参数
参数名称 | 类型 | 描述 |
code | Int | 公共错误码。0表示成功,其他值表示失败。 |
message | String | 模块错误信息描述,与接口相关。 |
totalCount | Int | 符合条件的镜像数量。 |
imageSet | Array | 符合条件的镜像信息。 |
其中 imageSet 存储了镜像具体的信息,构成如下:
参数名称 | 类型 | 描述 |
unImgId | String | 硬盘镜像 ID,命名格式为“img-xxxxxxxx”,使用此 ID 标识镜像。 |
imageName | String | 硬盘镜像名称。 |
imageDescription | String | 描述信息。 |
imageType | Int | 镜像类型。具体值见上。 |
osName | String | 操作系统名称。 |
createTime | String | 创建时间。 |
creator | String | 创建者的账号。 |
status | Int | 镜像的状态。具体值见上。 |
4. 示例
输入
https://image.api.qcloud.com/v2/index.php?Action=DescribeImages&imageType=1
输出
{"code" : 0,"message" : "","totalCount" : 1,"imageSet" : [{"unImgId" : "img-1234test","imageName" : "test","imageDescription" : "test","osName" : "Ubuntu 12.04 64bit","imageType" : 1,"createTime" : "2014-09-27 10:11:00","createor" : "1000","status" : 2}]}