1. 镜像列表
1.1. 描述
获取镜像列表
1.2. 请求地址
请求地址的格式如下:
https://<区域服务地址>/v1/image/list
1.3. 请求参数
Name | Type | Description | Required |
---|---|---|---|
type | String | 镜像类型(系统镜像:SYSTEM,私有镜像:PRIVATE,共享镜像:CUSTOMER_SHARE) | 是 |
projectId | String | 项目ID(镜像类型为PRIVATE,CUSTOMER_SHARE时必填) | 是 |
feeType | String | 计费类型,系统镜像查询时必须填。(按需计费:FEE_TYPE_NEED,包年包月:FEE_TYPE_MONTH_YEAR) | 否 |
azSn | String | azSn | 是 |
name | String | 镜像名称 | 否 |
curPage | Integer | 当前页码,默认值1 | 否 |
perPage | Integer | 每页显示条数,默认值10 | 否 |
1.4. 请求示例
1.4.1. 请求地址
POST https://cn-east-1.api.yovole.com/v1/image/list HTTP/1.1
x-ycs-timestamp: 2019-06-19T14:26:26Z
x-ycs-requestid: 2a49cfa2-925b-11e9-bb3a-6c96cfdcd6b9
x-ycs-security-authorization: Authorization: YCS1-HMAC-SHA1 Credential=08e206fb-7b41-45b7-8076-8d43e8aeea89,SignedHeaders=content-type;x-ycs-requestid;x-ycs-timestamp,Signature=2RFjU7C9gICCrQfpAIfAJHqRRlQ=
1.4.2. 接口请求参数
{
"projectId": "xxxxxxxxxxx",
"type": "SYSTEM",
"feeType": "FEE_TYPE_NEED",
"azSN": "CN-EAST-1-A",
"name": "windows",
"curPage":1,
"perPage":10
}
1.5. 返回结果
1.5.1. 返回正确结果示例
{
"success":true,
"code":0,
"pager":{
"curPage":1,
"perPage":10,
"totalRecords":22,
"totalPages":3,
"pageData":[
{
"id":"2c94805c655ff0d5016561192060008e",
"name":"Windows-Windows2008R2 SP1-64-chs",
"regionSn":"CN-EAST-1",
"azSn":"CN-EAST-1-A",
"category":"VM",
"type":"SYSTEM",
"osPlatformName":"Windows",
"osVersion":"2008R2 SP1",
"bit":64,
"minCpu":1,
"minRam":1,
"minDisk":50
},
{
"id":"2c9480bf63005f990163011c0297005b",
"name":"Windows-10 Pro-64-中文版",
"regionSn":"CN-EAST-1",
"azSn":"CN-EAST-1-A",
"category":"VM",
"type":"SYSTEM",
"osPlatformName":"Windows",
"osVersion":"10 Pro",
"bit":64,
"minCpu":1,
"minRam":1,
"minDisk":50
},
{
"id":"2c9480be66bf6bdf0166c2cb55ca000e",
"name":"windows-1-32-5",
"regionSn":"CN-EAST-1",
"azSn":"CN-EAST-1-A",
"category":"VM",
"type":"SYSTEM",
"osPlatformName":"Windows",
"osVersion":"1",
"bit":32,
"minCpu":1,
"minRam":1,
"minDisk":20
},
{
"id":"windows-server-2008-sp2-et-64-zh",
"name":"windows-server-2008-sp2-et-64-zh",
"regionSn":"CN-EAST-1",
"azSn":"CN-EAST-1-A",
"category":"VM",
"type":"SYSTEM",
"osPlatformName":"Windows",
"osVersion":"2008",
"bit":64,
"minCpu":1,
"minRam":1,
"minDisk":50
},
{
"id":"windows-server-2008-sp2-dc-64-zh",
"name":"windows-server-2008-sp2-dc-64-zh",
"regionSn":"CN-EAST-1",
"azSn":"CN-EAST-1-A",
"category":"VM",
"type":"SYSTEM",
"osPlatformName":"Windows",
"osVersion":"2008",
"bit":64,
"minCpu":1,
"minRam":1,
"minDisk":50
},
{
"id":"windows-server-2008r2-sp1-et-64-zh",
"name":"windows-server-2008r2-sp1-et-64-zh",
"regionSn":"CN-EAST-1",
"azSn":"CN-EAST-1-A",
"category":"VM",
"type":"SYSTEM",
"osPlatformName":"Windows",
"osVersion":"2008R2",
"bit":64,
"minCpu":1,
"minRam":1,
"minDisk":50
},
{
"id":"windows-server-2008r2-sp1-dc-64-zh",
"name":"windows-server-2008r2-sp1-dc-64-zh",
"regionSn":"CN-EAST-1",
"azSn":"CN-EAST-1-A",
"category":"VM",
"type":"SYSTEM",
"osPlatformName":"Windows",
"osVersion":"2008R2",
"bit":64,
"minCpu":1,
"minRam":1,
"minDisk":50
},
{
"id":"windows-server-2008r2-sp1-dc-64-en",
"name":"windows-server-2008r2-sp1-dc-64-en",
"regionSn":"CN-EAST-1",
"azSn":"CN-EAST-1-A",
"category":"VM",
"type":"SYSTEM",
"osPlatformName":"Windows",
"osVersion":"2008R2",
"bit":64,
"minCpu":1,
"minRam":1,
"minDisk":50
},
{
"id":"windows-server-2008r2-sp1-st-64-zh",
"name":"windows-server-2008r2-sp1-st-64-zh",
"regionSn":"CN-EAST-1",
"azSn":"CN-EAST-1-A",
"category":"VM",
"type":"SYSTEM",
"osPlatformName":"Windows",
"osVersion":"2008R2",
"bit":64,
"minCpu":1,
"minRam":1,
"minDisk":50
},
{
"id":"windows-server-2008r2-sp1-st-64-en",
"name":"windows-server-2008r2-sp1-st-64-en",
"regionSn":"CN-EAST-1",
"azSn":"CN-EAST-1-A",
"category":"VM",
"type":"SYSTEM",
"osPlatformName":"Windows",
"osVersion":"2008R2",
"bit":64,
"minCpu":1,
"minRam":1,
"minDisk":50
}
]
}
}
1.5.2. 返回错误结果示例
{
"requestId": "2a49cfa2-925b-11e9-bb3a-6c96cfdcd6b9",
"success": false,
"code": 400,
"message": "Required attribute 'projectId' not specified",
"errorCode": "Invalid argument"
}
1.6. 错误码
可以通过错误返回结果中的code、errorCode和message字段了解错误分类和具体的错误原因。
该接口没有特殊错误码,错误码信息和简单的错误分析方法可以参考公共错误码。