All Products
Search
Document Center

Security Center:ListUnfinishedOnceTask

Last Updated:Nov 25, 2024

Queries tasks that are not complete by task type.

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

Request parameters

ParameterTypeRequiredDescriptionExample
TaskTypestringYes

The type of the task. Valid values:

  • ASSETS_COLLECTION: asset information collection task
  • IMAGE_SCAN: image scan task
IMAGE_SCAN
TargetstringNo

The value of the object on which the task runs. If you set TaskType to IMAGE_SCAN, set this parameter to the UUID of the image that you want to scan. If you set TaskType to ASSETS_COLLECTION, set this parameter to the UUID of the server whose information you want to collect.

4fe8e1cd-3c37-4851-b9de-124da32c****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

F5CF78A7-30AA-59DB-847F-13EE3AE7****
OnceTasksarray<object>

The details of the tasks.

OnceTasksobject
Statusinteger

The status.

1
StatusTextstring

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
Progresslong

The progress percentage of the task.

75
RealRunTimelong

The execution duration of the task.

1670307567000
TaskNamestring

The name of the task.

IMAGE_SCAN
Finishinteger

Indicates whether the task is complete. Valid values:

  • 0: no
  • 1: yes
1
TotalCountinteger

The total number of entries returned.

30
EndTimelong

The time when the task ends.

1670307567000
TaskTypestring

The type of the task.

IMAGE_SCAN
StartTimelong

The time when the task is started.

1640102400000
ResultInfostring

The execution result of the task.

TASK_NOT_SUPPORT_REGION
Targetstring

The objective of the task.

238cf050a7270dd6940602e70f1e5a11eeaf4e02035f445b7f613ff5e064****
TaskIdstring

The ID of the task.

9fb50f2af8bb67c9fdb684194c83****
FinishCountinteger

The number of assets on which the task is complete.

67
TargetTypestring

The type of the assets that are scanned. Valid values:

  • IMAGE_REPO: image repository
  • IMAGE: image
IMAGE
TaskImageInfoobject

The information about the image scan task.

RepoIdstring

The ID of the image repository.

crr-r88w2vryp8m****
Digeststring

The image digest.

default_digest
Tagstring

The image tag.

v1.20-002-a2*****
RepoRegionIdstring

The region ID of the image repository.

cn-hangzhou
RepoNamestring

The name of the image repository.

testyyy
RepoNamespacestring

The namespace to which the image repository belongs.

bitn***
RegionIdstring

The region ID of the server image.

cn-hangzhou
Imagestring

The container image.

***s.com/sas_test/baseli***
Podstring

The pod of the image.

expoit-law-****
AppNamestring

The name of the application.

ack-jenkins-****
NodeNamestring

The name of the node.

pztest****
NodeIpstring

The IP address of the node.

172.18.XXX.XXX
NodeInstanceIdstring

The instance ID of the node.

i-0xi5mxvtmfw9****
ClusterIdstring

The ID of the cluster.

a765ba1435e7f9446065370e9a41****
ClusterNamestring

The name of the cluster.

ACK-test-****

Examples

Sample success responses

JSONformat

{
  "RequestId": "F5CF78A7-30AA-59DB-847F-13EE3AE7****",
  "OnceTasks": [
    {
      "Status": 1,
      "StatusText": "SUCCESS",
      "Progress": 75,
      "RealRunTime": 1670307567000,
      "TaskName": "IMAGE_SCAN",
      "Finish": 1,
      "TotalCount": 30,
      "EndTime": 1670307567000,
      "TaskType": "IMAGE_SCAN",
      "StartTime": 1640102400000,
      "ResultInfo": "TASK_NOT_SUPPORT_REGION",
      "Target": "238cf050a7270dd6940602e70f1e5a11eeaf4e02035f445b7f613ff5e064****",
      "TaskId": "9fb50f2af8bb67c9fdb684194c83****",
      "FinishCount": 67,
      "TargetType": "IMAGE",
      "TaskImageInfo": {
        "RepoId": "crr-r88w2vryp8m****",
        "Digest": "default_digest",
        "Tag": "v1.20-002-a2*****",
        "RepoRegionId": "cn-hangzhou",
        "RepoName": "testyyy",
        "RepoNamespace": "bitn***",
        "RegionId": "cn-hangzhou",
        "Image": "***s.com/sas_test/baseli***",
        "Pod": "expoit-law-****",
        "AppName": "ack-jenkins-****",
        "NodeName": "pztest****",
        "NodeIp": "172.18.XXX.XXX",
        "NodeInstanceId": "i-0xi5mxvtmfw9****",
        "ClusterId": "a765ba1435e7f9446065370e9a41****",
        "ClusterName": "ACK-test-****"
      }
    }
  ]
}

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.