You need to enable JavaScript to run this app.
导航

获取镜像列表

最近更新时间2023.07.03 16:32:41

首次发布时间2022.11.23 10:27:19

本接口用于获取某一实例规格支持的镜像列表,包括公共镜像和自定义镜像。

接口说明

默认列出自定义镜像。如果需要列出公共镜像,您需要将 property 参数设置为 PublicBaseImage

请求方法

GET

请求参数

下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数

名称

类型

是否必选

示例值

描述

Action

String

ListImages

公共参数。该参数表示接口名称。取值:ListImages。

Version

String

2021-04-30

公共参数。该参数表示接口版本。取值:2021-04-30。

instance_type

String

veEN.G1.large

实例规格。您可以通过 ListInstanceTypes 接口获取可开通的实例规格。

system_arch

String

Linux

操作系统的架构。取值范围:

  • Linux:Linux 操作系统。
  • Windows:Windows 操作系统。

system_bit

String

64

操作系统的位数。取值范围:

  • 32:32位操作系统。
  • 64:64位操作系统。

system_type

String

CentOS

操作系统的类型。取值范围:
Linux:

  • CentOS
  • Ubuntu
  • Debian

Windows:

  • Windows

system_version

String

8.3

操作系统的版本。取值范围:
CentOS:

  • 6.9
  • 7.2
  • 7.3
  • 7.4
  • 7.5
  • 7.6
  • 7.8
  • 7.9
  • 8.3

Debian:

  • 9
  • 10

Ubuntu:

  • Server 16.04 LTS
  • Server 18.04 LTS
  • Server 20.04 LTS

Windows:

  • 10
  • 2012 R2 STD 标准版
  • 2016 STD 标准版
  • 2019 STD 标准版

disk_size

Integer

50

镜像的系统盘的大小。单位:GB。

label

String

IPV6

镜像标签,取值范围:

  • IPV6:IPv6。
  • MultiIPPriNet:辅助私网 IP。

镜像标签之间用半角逗号(,)分隔。

说明

  • label 参数仅在 property 参数的值为 PublicBaseImage生效。
  • 如果您没有开通 IPv6、辅助私网 IP 功能,无法通过指定 label 参数来列出相关镜像。如需开通相关功能,请提交工单申请。

property

String

UrlImage

镜像属性,取值范围:

  • BENBuildImage:通过边缘实例创建的镜像。
  • LocalImage:本地镜像。
  • PublicBaseImage:公共镜像。
  • UrlImage:通过 URL 上传的镜像。

返回数据

名称

类型

示例值

描述

images

[]Image

请参见返回示例

镜像列表。

请求示例

GET https://veenedge.volcengineapi.com/?Action=ListImages&Version=2021-04-30
&instance_type=veEN.G1.large
&<其他公共参数>

返回示例

{
  "ResponseMetadata": {
    "RequestId": "202110222135390102250842170003****",
    "Action": "ListImages",
    "Version": "2021-04-30",
    "Service": "veenedge",
    "Region": "cn-north-1"
  },
  "Result": {
    "images": [
      {
        "id": "imagespnwnf****",
        "name": "helloworld",
        "description": "test",
        "system_arch": "Linux",
        "system_bit": "64位",
        "system_type": "CentOS",
        "system_version": "8.3",
        "disk_size": 50,
        "property": "UrlImage",
        "status": "Online",
        "is_enable": false,
        "label": null,
        "create_time": "2021-05-26T06:15:50+08:00",
        "update_time": "2021-09-22T16:55:39+08:00"
      },
      {
        "id": "image6gb5xg****",
        "name": "ztest",
        "description": "",
        "system_arch": "Linux",
        "system_bit": "64位",
        "system_type": "CentOS",
        "system_version": "8.3",
        "disk_size": 50,
        "property": "LocalImage",
        "status": "Uploading",
        "is_enable": false,
        "label": null,
        "create_time": "2021-07-20T20:09:26+08:00",
        "update_time": "2021-07-20T20:09:26+08:00"
      }
    ]
  }
}

错误码

如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见错误码