接口说明
实例重装操作系统时,其系统盘容量需不小于目标镜像所需的磁盘容量,本接口支持通过实例ID查询该实例可重装的镜像列表。
注意事项:
-
用户根据实例ID(instanceId)查询可重装的镜像列表。
-
镜像分为用户自定义镜像和公共镜像。
URL
GET https://ecloud.10086.cn/api/openapi-instance/v4/describe-rebuild-images
请求参数
Query
|
参数名称
|
类型
|
必填
|
描述
|
|
instanceId
|
string
|
是
|
实例ID,可通过查询实例状态列表接口获取。 |
|
imageType
|
integer(int32)
|
否
|
镜像类型。取值范围:
默认值:2。 |
请求示例
GET https://ecloud.10086.cn/api/openapi-instance/v4/describe-rebuild-images
返回参数
返回码:200
OK
|
参数名称
|
类型
|
描述
|
|
body
|
<ProductImage> array
|
请求成功时返回的数据。 |
|
imageId
|
string
|
镜像ID。 |
|
imageName
|
string
|
镜像名称。 |
|
minDisk
|
integer(int64)
|
主机规格需要的系统盘最小大小,单位G。 |
|
note
|
string
|
备注。 |
|
osType
|
string
|
操作系统类型。 |
|
imageSize
|
integer(int64)
|
镜像大小,单位G。 |
|
sourceImageId
|
string
|
源镜像ID。 |
|
sourceImagePoolId
|
string
|
原镜像所属资源池ID。 |
|
createdTime
|
string(date-time)
|
创建时间。 |
|
modifiedTime
|
string(date-time)
|
更新时间。 |
|
status
|
string
|
镜像状态。 |
|
type
|
integer(int32)
|
镜像类型。 |
|
url
|
string
|
镜像路径。 |
|
errorCode
|
string
|
统一错误码。 |
|
errorMessage
|
string
|
页面国际化错误提示。 |
|
errorParams
|
<string> array
|
统一错误码的自定义参数。 |
|
requestId
|
string
|
每个请求的序列号。 |
|
state
|
enum(OK,ERROR,EXCEPTION,ALARM,FORBIDDEN)
|
返回状态码。返回正常:OK,返回错误:ERROR,返回异常:EXCEPTION,需要告警实现的:ALARM,禁止访问:FORBIDDEN。 |
返回示例
返回码:200
OK
{
"requestId":"reqId-f98be2a92a4bd5011e370-d1c8d307-5",
"state":"OK",
"body":[
{
"imageId":"337f1981-370e-babd-15c3-58392c38ea0f",
"imageName":"AlmaLinux 8.8 64位",
"type":2,
"url":null,
"sourceImageRegionId":null,
"sourceImageId":null,
"status":"active",
"imageSize":20,
"createdTime":"2023-12-07 23:37:54",
"modifiedTime":"2023-12-07 23:37:54",
"note":null,
"osType":"linux",
"minDisk":20,
"charge":null,
"originalImageId":null
},
{
"imageId":"71b8af37-fae2-4f5f-9f42-635ec2bc1d3c",
"imageName":"AlmaLinux 9.4 64位",
"type":2,
"url":null,
"sourceImageRegionId":null,
"sourceImageId":null,
"status":"active",
"imageSize":20,
"createdTime":"2025-02-26 01:52:40",
"modifiedTime":"2025-02-26 01:52:40",
"note":null,
"osType":"linux",
"minDisk":20,
"charge":null,
"originalImageId":null
}
]
}