查询镜像列表
更新时间:2024-07-02
该接口用于查询用户所有的镜像信息。
- 查询的镜像信息包括公共镜像、自定义镜像和服务集成镜像。
- 支持按 imageType 来过滤查询,此参数非必需,缺省为 All,即查询所有类型的镜像。
- 支持按 imageName 来过滤查询镜像,返回名称中包含该字符串的镜像。此参数非必需。
请求结构
Plain Text
1GET /v{version}/image?marker={marker}&maxKeys={maxKeys}&imageType={imageType}&imageName={imageName} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号 |
marker | String | 否 | Query参数 | 批量获取列表的查询的起始位置,是一个由系统生成的字符串 |
maxKeys | int | 否 | Query参数 | 每页包含的最大数量,最大数量通常不超过1000。缺省值为1000 |
imageType | String | 否 | Query参数 | 指定要查询何种类型的镜像,包括All(所有),System(系统镜像/公共镜像),BbcSystem(bbc系统镜像/bbc公共镜像),Custom(自定义镜像),Integration(服务集成镜像),Sharing(共享镜像),GpuBccSystem(GPU专用公共镜像),GpuBccCustom(GPU专用自定义镜像),FpgaBccSystem(FPGA专用公共镜像),FpgaBccCustom(FPGA专用自定义镜像),缺省值为All |
imageName | String | 否 | Query参数 | 过滤查询镜像,返回名称中包含该字符串的镜像 |
返回头域
除公共头域,无其它特殊头域
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
marker | String | 标记查询的起始位置 |
isTruncated | boolean | true表示后面还有数据,false表示已经是最后一页。 |
nextMarker | String | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现。 |
maxKeys | int | 每页包含的最大数量 |
images | List<ImageModel> | 返回的镜像列表 |
请求示例
Plain Text
1GET /v2/image?marker=m-nky7qeom&maxKeys=1 HTTP/1.1
2Host: bcc.bj.baidubce.com
3ContentType: application/json
4Date: Wed, 01 Mar 2006 12:00:00 GMT
5Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
返回示例
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Wed, 03 Dec 2014 06:42:19 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6{
7 "maxKeys":1,
8 "marker":"m-nky7qeom",
9 "isTruncated":true,
10 "nextMarker":"m-I88RTNWG",
11 "images":[
12 {
13 "id": "m-nky7qeom",
14 "createTime": "2015-06-17T10:37:02Z",
15 "name": "ubuntu-14.04.1-server-amd64-201506171832",
16 "type": "System",
17 "osType": "linux",
18 "osVersion": "14.04.1 LTS",
19 "osName": "Ubuntu",
20 "osBuild": "2015061700",
21 "osArch": "x86_64 (64bit)",
22 "status": "Available",
23 "desc": null
24 }
25 ]
26}