You need to enable JavaScript to run this app.
导航
DetectImage - 检测镜像
最近更新时间:2024.05.21 10:26:16首次发布时间:2024.03.22 16:45:45

调用 DetectImage 接口,发起镜像检测流程。

注意事项

本功能正在邀测中,如需试用,请联系客户经理申请。

请求说明

检测结果请使用DescribeImages接口,并传入目标镜像的ImageId查询获取。

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

DetectImage

要执行的操作,取值:DetectImage。

Version
String

2020-04-01

API的版本,取值:2020-04-01。

ImageId
String

image-yczf9rotssgh*****

镜像ID。您可以调用DescribeImages接口查询获取。

返回参数

本接口无特有的返回参数。更多信息请见返回结构

请求示例

GET /?Action=DetectImage&Version=2020-04-01&ImageId=image-yczf9rotssgh***** HTTP/1.1
Host: open.volcengineapi.com
Region: cn-beijing
ServiceName: ecs

返回示例

{
    "ResponseMetadata": {
        "RequestId": "2022061517394001022514606307*****",
        "Action": "DetectImage",
        "Version": "2020-04-01",
        "Service": "ecs",
        "Region": "cn-beijing"
    },
    "Result": {}
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
InvalidImageStatus
The specified image is not in the correct status for the request.

当前镜像的状态不支持此操作。

400
InvalidPlatformForDetect.UnSupported
The specified image platform cannot be used for detect.

指定的镜像平台不支持检测。

400
MissingParameter.ImageId
The required parameter ImageId is not supplied.

镜像ID不能为空。

404
InvalidImage.NotFound
The specified image does not exist.

指定的镜像不存在。

412
OperationDenied.ImageIsDetecting
The specified operation is denied as your image is detecting.

指定的操作被拒绝,因为该镜像正在检测。

500
InternalError
An internal error has occurred.

内部错误,请重试。如果多次尝试失败,请提交工单。