All Products
Search
Document Center

Security Center:DescribeOnceTask

Last Updated:Nov 25, 2024

Queries agent tasks.

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

Request parameters

ParameterTypeRequiredDescriptionExample
TaskTypestringNo

The type of the task. Valid values:

  • CLIENT_PROBLEM_CHECK: a task of the Security Center agent
  • CLIENT_DEV_OPS: an O&M task of Cloud Assistant
  • ASSET_SECURITY_CHECK: a task of asset information collection
Note You must specify at least one of the TaskType and RootTaskId parameters.
CLIENT_PROBLEM_CHECK
RootTaskIdstringNo

The ID of the root task.

Note You must specify at least one of the TaskType and RootTaskId parameters.
bb5d657479bba5e1d308b6c9e85c9174
StartTimeQuerylongNo

The timestamp when the root task starts. Unit: milliseconds.

1651737301000
EndTimeQuerylongNo

The timestamp when the root task ends. Unit: milliseconds.

1651766520000
CurrentPageintegerNo

The number of the page to return. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Default value: 20.

20
SourcestringNo

The source of the task. Valid values include the following values:

  • schedule: automatic scheduling of Cloud Security Scanner.
  • console: one-click detection in the Cloud Security Scanner console.
console
TaskIdstringNo

The ID of the task.

d7b2acf8d362742123e4a84e1bf8****

Response parameters

ParameterTypeDescriptionExample
object

The data returned.

RequestIdstring

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

7E0618A9-D5EF-4220-9471-C42B5E92719F
PageInfoobject

The pagination information.

CurrentPageinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries returned per page. Default value: 20.

20
TotalCountinteger

The total number of entries returned.

100
Countinteger

The number of entries returned on the current page.

2
TaskManageResponseListarray<object>

An array that consists of the tasks.

TaskManageResponseobject

The information about the task.

TaskTypestring

The type of the task. Valid values:

  • CLIENT_PROBLEM_CHECK: a task of the Security Center client
  • CLIENT_DEV_OPS: an O&M task of Cloud Assistant
  • ASSET_SECURITY_CHECK: a task for asset information collection
CLIENT_PROBLEM_CHECK
Progressstring

The progress of the task. Unit: percent (%).

10%
TaskStatusinteger

The status of the task. Valid values:

  • 1: The task is started.
  • 2: The task is complete.
  • 3: The task fails.
  • 4: The task times out.
1
DetailDatastring

The execution details of the task. The value of this parameter is in the JSON format.

  • causeCode: the returned code for the cause.
  • causeMsg: the returned message for the cause.
  • resCode: the returned code for troubleshooting.
  • resMsg: the returned message for troubleshooting.
  • problemType: the type of the issue.
  • dispatchType: the task delivery method.
  • uuid: the UUID of the server.
  • instanceId: the instance ID of the server.
  • internetIp: the public IP address of the server.
  • intranetIp: the private IP address of the server.
  • instanceName: the instance name of the server.
  • url: the download URL of the troubleshooting log.
[ { "dispatchType": "manual", "causeMsg": [], "causeCode": [], "resCode": [ "1003" ], "resMsg": [ "powershell -executionpolicy bypass -c \"(New-Object Net.WebClient).DownloadFile('http://aegis.alicdn.com/download/aegis_client_self_check/win32/aegis_checker.exe', $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('.\\\\aegis_checker.exe'))\"; \"./aegis_checker.exe -b eyJtb2RlIjoxLCJqc3J2X2RvbWFpbiI6W10sImlzc3VlIjoib2ZmbGluZSIsInVwZGF0ZV9kb21haW4iOltdLCJ1dWlkIjoiaW5ldC1lYWUwNDg2Ny0wMDJmLTQyM2QtYWYwMC1jNzJjZDYyOWIyNDgiLCJjbWRfaWR4IjoiNDRjZThiZWI3ZGYyYTQxMjQ1NGM4ZDc5OTE1ODI1MzMifQ==\"" ], "problemType": "offline", "uuid": "inet-eae04867-002f-423d-af00-c72cd629****" } ]
TaskStatusTextstring

The text description of the status for the task. Valid values:

  • INIT: The task is pending start.
  • START: The task is started.
  • DISPATCH: The self-check command is issued.
  • SUCCESS: The self-check is complete.
  • FAIL: The task fails.
  • TIMEOUT: The task times out.
INIT
TaskNamestring

The name of the task.

CLIENT_PROBLEM_CHECK
TaskStartTimelong

The timestamp that indicates the time when the task starts. Unit: milliseconds.

1649732012000
TaskEndTimelong

The timestamp that indicates the time when the task ends. Unit: milliseconds.

1650267989000
TaskIdstring

The task ID.

e900f528f5a6229bb640ca27cb44c98e
SuccessCountinteger

The number of tasks that are executed.

7
FailCountinteger

The number of tasks that fail to be executed.

2
ResultInfostring

The execution result of the task.

successful

Examples

Sample success responses

JSONformat

{
  "RequestId": "7E0618A9-D5EF-4220-9471-C42B5E92719F",
  "PageInfo": {
    "CurrentPage": 1,
    "PageSize": 20,
    "TotalCount": 100,
    "Count": 2
  },
  "TaskManageResponseList": [
    {
      "TaskType": "CLIENT_PROBLEM_CHECK",
      "Progress": "10%",
      "TaskStatus": 1,
      "DetailData": "[\n      {\n            \"dispatchType\": \"manual\",\n            \"causeMsg\": [],\n            \"causeCode\": [],\n            \"resCode\": [\n                  \"1003\"\n            ],\n            \"resMsg\": [\n                  \"powershell -executionpolicy bypass -c \\\"(New-Object Net.WebClient).DownloadFile('http://aegis.alicdn.com/download/aegis_client_self_check/win32/aegis_checker.exe', $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('.\\\\\\\\aegis_checker.exe'))\\\"; \\\"./aegis_checker.exe -b eyJtb2RlIjoxLCJqc3J2X2RvbWFpbiI6W10sImlzc3VlIjoib2ZmbGluZSIsInVwZGF0ZV9kb21haW4iOltdLCJ1dWlkIjoiaW5ldC1lYWUwNDg2Ny0wMDJmLTQyM2QtYWYwMC1jNzJjZDYyOWIyNDgiLCJjbWRfaWR4IjoiNDRjZThiZWI3ZGYyYTQxMjQ1NGM4ZDc5OTE1ODI1MzMifQ==\\\"\"\n            ],\n            \"problemType\": \"offline\",\n            \"uuid\": \"inet-eae04867-002f-423d-af00-c72cd629****\"\n      }\n]",
      "TaskStatusText": "INIT",
      "TaskName": "CLIENT_PROBLEM_CHECK",
      "TaskStartTime": 1649732012000,
      "TaskEndTime": 1650267989000,
      "TaskId": "e900f528f5a6229bb640ca27cb44c98e",
      "SuccessCount": 7,
      "FailCount": 2,
      "ResultInfo": "successful"
    }
  ]
}

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
2024-10-08The request parameters of the API has changedView Change Details