All Products
Search
Document Center

Security Center:DescribeImageLatestScanTask

Last Updated:Nov 25, 2024

Queries the most recent scan task that is created for an image.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-sas:DescribeImageLatestScanTaskget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DigeststringYes

The digest value of the image.

8f0fbdb41d3d1ade4ffdf21558443f4c03342010563bb8c43ccc09594d50****

Response parameters

ParameterTypeDescriptionExample
object

The data returned.

RequestIdstring

The ID of the request.

0B48AB3C-84FC-424D-A01D-B9270EF4****
Taskarray<object>

An array that consists of the information about the task.

ImageScanTaskobject

The information about the task.

Statusstring

The status of the task. Valid value:

  • PROCESSING: The task is running.
  • START: The task is being started.
  • MESSAGE_SEND: The scan task is sent.
  • PRE_ANALYZER: The image is in precheck.
  • SUCCESS: The task was successful.
  • FAIL: The task failed.
  • TIMOUT: The task timed out.
SUCCESS
Modifiedstring

The time when the task was last modified. The time is in the yyyy-MM-dd HH:mm:ss format.

2022-12-20 12:00:05
FinishTimelong

The end time of the task. A value is returned only when the task is in the Finished state. Otherwise, the returned value is empty.

1669693430977
Createstring

The time when the task was created. The time is in the yyyy-MM-dd HH:mm:ss format.

2022-12-20 11:59:05
Finishinteger

The number of images that are scanned.

100
Sourcestring

The method in which the task was created. A task can be created in the Security Center console or by calling an API operation. Valid values:

  • console_batch: The task was created in the Security Center console.
  • openapi: The task was created by calling an API operation.
console_batch
StartTimelong

The start time of the task.

1668614400000
TaskTypestring

The type of the task. Valid value:

  • IMAGE_SCAN
IMAGE_SCAN
Namestring

The name of the task.

IMAGE_SCAN
TaskIdstring

The ID of the scan task.

0a960b9a48b788a8689154b032bf****
Targetstring

The digest value of the image.

8f0fbdb41d3d1ade4ffdf21558443f4c03342010563bb8c43ccc09594d50****
Idlong

The task ID.

9755662
TargetTypestring

The type of the scanned asset. Valid value:

  • IMAGE
IMAGE

Examples

Sample success responses

JSONformat

{
  "RequestId": "0B48AB3C-84FC-424D-A01D-B9270EF4****",
  "Task": [
    {
      "Status": "SUCCESS",
      "Modified": "2022-12-20 12:00:05",
      "FinishTime": 1669693430977,
      "Create": "2022-12-20 11:59:05",
      "Finish": 100,
      "Source": "console_batch",
      "StartTime": 1668614400000,
      "TaskType": "IMAGE_SCAN",
      "Name": "IMAGE_SCAN",
      "TaskId": "0a960b9a48b788a8689154b032bf****",
      "Target": "8f0fbdb41d3d1ade4ffdf21558443f4c03342010563bb8c43ccc09594d50****",
      "Id": 9755662,
      "TargetType": "IMAGE"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history