检查桌面镜像是否存在
功能介绍
用于校验指定桌面列表的桌面镜像,当前是否存在,如果存在返回对应的imageId,不存在就不返回。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
POST /v2/{project_id}/desktops/check-images
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
否 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
|
Content-Type |
否 |
String |
发送的实体的MIME类型。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
desktop_ids |
否 |
Array of strings |
操作的桌面ID列表。 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
image_infos |
Array of DesktopImageInfo objects |
桌面镜像信息。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
desktop_id |
String |
桌面id。 |
|
image_id |
String |
镜像ID。 |
|
image_name |
String |
镜像名称。 |
|
image_type |
String |
镜像类型。 |
|
os_type |
String |
镜像系统类型。 |
状态码:400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码,失败时返回。 |
|
error_msg |
String |
错误描述。 |
|
error_detail |
String |
错误详情。 |
|
encoded_authorization_message |
String |
加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:401
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码,失败时返回。 |
|
error_msg |
String |
错误描述。 |
|
error_detail |
String |
错误详情。 |
|
encoded_authorization_message |
String |
加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:403
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码,失败时返回。 |
|
error_msg |
String |
错误描述。 |
|
error_detail |
String |
错误详情。 |
|
encoded_authorization_message |
String |
加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:404
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码,失败时返回。 |
|
error_msg |
String |
错误描述。 |
|
error_detail |
String |
错误详情。 |
|
encoded_authorization_message |
String |
加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码,失败时返回。 |
|
error_msg |
String |
错误描述。 |
|
error_detail |
String |
错误详情。 |
|
encoded_authorization_message |
String |
加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
请求示例
{
"desktop_ids" : [ "f77db5cd-c020-47d4-bbbe-9b979a38d18c", "f77db5cd-c020-47d4-bbbe-9b979a38d18b" ]
}
响应示例
状态码:200
检查云桌面响应。
{
"image_infos" : [ {
"desktop_id" : "0730042a-b9c7-4279-bb24-d3fd299a2efe",
"image_id" : "b669106a-1395-4f24-92af-d884c227e558",
"image_type" : "market",
"os_type" : "Windows"
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
检查云桌面响应。 |
|
400 |
由于包含语法错误,当前请求无法被服务器理解。 |
|
401 |
鉴权失败。 |
|
403 |
没有操作权限。 |
|
404 |
找不到资源。 |
|
500 |
服务内部错误,具体返回错误码请参见错误码说明。 |
错误码
请参见错误码。