All Products
Search
Document Center

Security Center:GetLastOnceTaskInfo

Last Updated:Nov 25, 2024

Queries information about the latest scan task to determine whether the task is complete.

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-aegis:GetLastOnceTaskInfoget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TaskTypestringYes

The type of the task. Valid values:

  • CLIENT_PROBLEM_CHECK: client diagnosis task
  • CLIENT_DEV_OPS: O&M task of Cloud Assistant
  • ASSETS_COLLECTION: asset collection task
ASSETS_COLLECTION
TaskNamestringYes

The name of the task. Valid values:

  • CLIENT_PROBLEM_CHECK: client diagnosis task
  • CLIENT_DEV_OPS: O&M task of Cloud Assistant
  • ASSETS_COLLECTION: asset collection task
ASSETS_COLLECTION
SourcestringNo

The source of the task.

console_batch

Response parameters

ParameterTypeDescriptionExample
object
CollectTimelong

The time at which the task was run.

1671184531000
RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

BE120DAB-F4E7-4C53-ADC3-A97578AB****
TotalCountinteger

The total number of entries returned.

44
TaskIdlong

The ID of the latest scan task.

3f65e1f1bb13118891a889d569a3****
FinishCountinteger

The number of tasks that have been completed.

67
TaskInfoobject

The information about the latest task.

Statusstring

The status of the task. Valid values:

  • INIT: The task is not started.
  • START: The task is started.
  • SUCCESS: The task is complete.
  • TIMEOUT: The task timed out.
SUCCESS
Progressinteger

The progress of the task in percentage.

69
Resultstring

The result of the scan task. Valid values:

  • SUCCESS: The task is successful.
  • TASK_NOT_SUPPORT_REGION: The images are deployed in a region that is not supported by container image scan.
  • TASK_NOT_EXISTS: The task does not exist.
SUCCESS

Examples

Sample success responses

JSONformat

{
  "CollectTime": 1671184531000,
  "RequestId": "BE120DAB-F4E7-4C53-ADC3-A97578AB****",
  "TotalCount": 44,
  "TaskId": 0,
  "FinishCount": 67,
  "TaskInfo": {
    "Status": "SUCCESS",
    "Progress": 69,
    "Result": "SUCCESS"
  }
}

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.