获取镜像详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ehpc:GetImage |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ImageCategory |
string |
否 |
镜像来源。取值范围:
|
Custom |
| ImageType |
string |
否 |
镜像类型。取值范围:
默认值:VM |
VM |
| ImageId |
string |
否 |
镜像 ID。 |
m-2ze74g5mvy4pjg***** |
| AdditionalRegionIds |
array |
否 |
需要查询镜像信息的附加地域 ID 列表。 |
|
|
string |
否 |
需要查询的附加地域 ID。 |
cn-heyuan |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| Success |
boolean |
执行命令并获取结果的过程是否成功。取值范围:
|
true |
| TotalCount |
integer |
本次请求条件下的数据总量。 |
10 |
| Image |
object |
镜像详情。 |
|
| ImageType |
string |
镜像类型。 |
VM |
| AppId |
string |
应用 ID。 |
ci-vm-0123456789abcdef |
| Name |
string |
镜像名称。 |
app-image |
| Version |
string |
版本。 |
v1.0 |
| Description |
string |
镜像描述。 |
应用测试镜像。 |
| Size |
string |
镜像大小。单位:GiB。 |
40 GiB |
| CreateTime |
string |
镜像创建时间。 示例采用 YYYY-MM-DDTHH:mm:ssZ 格式,Z 表示 UTC。 |
2022-12-23T09:51:39Z |
| Status |
string |
镜像状态。 |
Available |
| ContainerImageSpec |
object |
容器镜像配置详情。 |
|
| RegistryUrl |
string |
容器镜像访问链接。 |
registry-vpc.cn-hangzhou.aliyuncs.com/ehpc_open/nginx:latest |
| IsACRRegistry |
boolean |
是否为阿里云镜像仓库。
|
True |
| IsACREnterprise |
boolean |
是否为阿里云镜像仓库企业版。
|
True |
| RegistryCriId |
string |
企业版镜像仓库 ID。 |
cri-xyz795ygf8k9**** |
| RegistryCredential |
object |
私有镜像仓库鉴权。 |
|
| Server |
string |
镜像仓库的注册地址。 |
registry-vpc.cn-hangzhou.aliyuncs.com |
| UserName |
string |
登录用户名。 |
username |
| Password |
string |
登录用户密码。 |
userpassword |
| OsTag |
string |
OS 具体版本标识。 |
CentOS 7.6 64 bit |
| Platform |
string |
平台类型。 |
CentOS |
| Architecture |
string |
架构类型。 |
x86_64 |
| VMImageSpec |
object |
虚拟机镜像配置详情。 |
|
| ImageId |
string |
镜像 ID。 |
m-uf60twafjtaart****** |
| OsTag |
string |
OS 具体版本标识。 |
CentOS 7.6 64 bit |
| Platform |
string |
平台类型。 |
CentOS |
| Architecture |
string |
架构类型。 |
x86_64 |
| DocumentInfo |
object |
镜像关联的应用文档信息。 |
|
| DocumentId |
string |
应用文档 ID。 |
1001 |
| EncodingMode |
string |
应用文档的编码方式,支持 Base64 和 PlainText。 |
Base64 |
| Document |
string |
应用文档内容。 |
VGhpcyBpcyBhbiBleGFtcGxlIGFwcGxpY2F0aW9uIGRvY3VtZW50Lg== |
| AdditionalRegionsInfo |
array<object> |
镜像在附加地域的状态信息列表。 |
|
|
object |
|||
| RegionId |
string |
附加地域 ID。 |
cn-heyuan |
| ImageId |
string |
该附加地域中的镜像 ID。 |
m-f8abcdef0123456789ab |
| Status |
string |
镜像在附加地域的状态。 |
Available |
示例
正常返回示例
JSON格式
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368\n",
"Success": true,
"TotalCount": 10,
"Image": {
"ImageType": "VM",
"AppId": "ci-vm-0123456789abcdef",
"Name": "app-image",
"Version": "v1.0",
"Description": "应用测试镜像。",
"Size": "40 GiB",
"CreateTime": "2022-12-23T09:51:39Z",
"Status": "Available",
"ContainerImageSpec": {
"RegistryUrl": "registry-vpc.cn-hangzhou.aliyuncs.com/ehpc_open/nginx:latest",
"IsACRRegistry": true,
"IsACREnterprise": true,
"RegistryCriId": "cri-xyz795ygf8k9****",
"RegistryCredential": {
"Server": "registry-vpc.cn-hangzhou.aliyuncs.com",
"UserName": "username",
"Password": "userpassword"
},
"OsTag": "CentOS 7.6 64 bit",
"Platform": "CentOS",
"Architecture": "x86_64"
},
"VMImageSpec": {
"ImageId": "m-uf60twafjtaart******",
"OsTag": "CentOS 7.6 64 bit",
"Platform": "CentOS",
"Architecture": "x86_64"
},
"DocumentInfo": {
"DocumentId": "1001",
"EncodingMode": "Base64",
"Document": "VGhpcyBpcyBhbiBleGFtcGxlIGFwcGxpY2F0aW9uIGRvY3VtZW50Lg=="
},
"AdditionalRegionsInfo": [
{
"RegionId": "cn-heyuan",
"ImageId": "m-f8abcdef0123456789ab",
"Status": "Available"
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | 无效的参数:%s |
| 400 | NotEnabled | You have not enabled this service. | 您的账户还未开通此服务 |
| 404 | ImageNotFound | The specified image does not exist. | 指定的镜像不存在,请您检查该参数是否正确。 |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 请求失败,服务暂时不可用 |
| 406 | EcsError | An error occurred while calling the ECS API operation. | ECS API调用出错 |
| 406 | AliyunError | An Alibaba Cloud product error occurred. | 阿里云产品错误. %s |
| 406 | DbError | A database error occurred. | 数据库错误 |
| 407 | NotAuthorized | No authorization is granted. | 未授权 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。