查询产品镜像列表 - ListImages
功能介绍
该接口用于查询云桌面支持的产品镜像列表。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,当前API调用无需身份策略权限。
URI
GET /v2/{project_id}/images
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目id。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
os_type | 否 | String | 产品镜像的操作系统类型,如Windows。 |
image_type | 否 | String | 镜像类型。 -gold 公共镜像 -private 私有镜像 |
platform | 否 | String | 镜像系统类型,如Windows。 |
architecture | 否 | String | 镜像架构:x86。 |
package_type | 否 | String | 套餐系列。 |
image_id | 否 | String | 镜像Id。 |
limit | 否 | Integer | 每页数量,范围0-100,默认100。 |
offset | 否 | Integer | 偏移量,默认0。 |
sort_field | 否 | String | 用于排序,表示按照哪个字段排序。取值为镜像属性name、created_at字段,默认为name。 |
sort_type | 否 | String | 用于排序,表示升序还是降序,取值为asc和desc。与sort_field一起组合使用,默认为升序asc。 |
请求参数
无
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
images | Array of ImageInfo objects | 云桌面支持的产品镜像列表。 |
total_count | Integer | 对象总数。 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | 镜像ID。 |
image_type | String | 镜像类型,目前支持以下类型: 公共镜像:gold 私有镜像:private。 |
os_type | String | 操作系统类型,目前取值Linux, Windows,Other。 |
architecture | String | 操作系统架构,目前取值arm,x86。 |
os_version | String | 操作系统具体版本。 |
disk_format | String | 镜像格式,目前支持vhd,raw,qcow2,zvhd2格式。 |
name | String | 镜像名称。 |
min_ram | Integer | 镜像运行需要的最小内存,单位为MB。参数取值依据弹性云服务器的规格限制,一般设置为0。 |
min_disk | Integer | 镜像运行需要的最小磁盘,单位为GB 。取值为40~1024GB。 |
product_code | String | 镜像的产品编码。 |
created_at | String | 创建时间。格式为UTC时间。 |
kms_id | String | 镜像kmsId。 |
状态码:400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:401
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:404
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:405
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:500
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:503
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
请求示例
-
GET /v2/29dfe82ada564ac2b927e1ff036d9a9b/images?image_type=gold&os_type=Linux
-
GET /v2/0e69423d4400f4a82f67c0059a1e4cc8/images?architecture=x86&image_type=private
响应示例
状态码:200
查询OpenStack环境中的镜像响应。
{
"total_count" : 1,
"images" : [ {
"id" : "d6b368bc-a24d-4fb5-a8fb-727356a53f33",
"image_type" : "gold",
"os_type" : "Linux",
"os_version" : "EulerOS 2.2 64bit",
"disk_format" : "qcow2",
"name" : "Euler_Online_Tenant_vAG",
"min_ram" : 0,
"min_disk" : 50
}, {
"id" : "bef99a44-2b6a-4ef9-b1a2-204a4910e374",
"image_type" : "gold",
"os_type" : "Linux",
"os_version" : "EulerOS 2.5 64bit",
"disk_format" : "qcow2",
"name" : "FA-LZ-x86vAG-801temp",
"min_ram" : 0,
"min_disk" : 60
} ]
} 状态码
状态码 | 描述 |
|---|---|
200 | 查询OpenStack环境中的镜像响应。 |
400 | 由于包含语法错误,当前请求无法被服务器理解。 |
401 | 鉴权失败。 |
403 | 没有操作权限。 |
404 | 找不到资源。 |
405 | 请求中指定的方法不被允许。 |
500 | 服务内部错误,具体返回错误码请参见错误码说明。 |
503 | 服务不可用。 |
错误码
请参见错误码。

