All Products
Search
Document Center

Security Center:GenerateOnceTask

Last Updated:Nov 14, 2024

Creates a one-time scan task.

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

Request parameters

ParameterTypeRequiredDescriptionExample
TaskTypestringYes

The type of the scan task. Valid values:

  • CLIENT_PROBLEM_CHECK: a client diagnosis task
  • CLIENT_DEV_OPS: an O&M task of Cloud Assistant
  • ASSET_SECURITY_CHECK: a task of asset information collection
CLIENT_PROBLEM_CHECK
TaskNamestringYes

The name of the scan task. Valid values:

  • CLIENT_PROBLEM_CHECK: a client diagnosis task
  • CLIENT_DEV_OPS: an O&M task of Cloud Assistant
  • ASSET_SECURITY_CHECK: a task of asset information collection
CLIENT_PROBLEM_CHECK
ParamstringYes

The additional information.

{"mode":1,"problemType":"offline","uuids":"inet-795dcad1-360f-49d2-b01e-b7da7f1c****"}
SourcestringNo

The source of the scan task.

Manual

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

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

8BB6B8FA-39E8-5654-A309-8EED13B1****
CanCreateboolean

Indicates whether you can create more scan tasks. Valid values:

  • true: yes
  • false: no
Note By default, a maximum of 10 scan tasks can be running at the same time. If 10 image scan tasks are running, you cannot create a scan task by calling this operation. You must wait for at least one of the 10 existing scan tasks to complete before you can create a scan task.
true
LastTaskstring

The ID of the last scan task.

38730bb078f4a1461d4ed283994c****
CollectTimelong

The collection time.

1670307567000
TotalCountinteger

The total number of scan tasks.

100
TaskIdstring

The ID of the scan task.

38730bb078f4a1461d4ed283994c****
FinishCountinteger

The number of scan tasks that are complete.

61

Examples

Sample success responses

JSONformat

{
  "RequestId": "8BB6B8FA-39E8-5654-A309-8EED13B1****",
  "CanCreate": true,
  "LastTask": "38730bb078f4a1461d4ed283994c****\n",
  "CollectTime": 1670307567000,
  "TotalCount": 100,
  "TaskId": "38730bb078f4a1461d4ed283994c****",
  "FinishCount": 61
}

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-11The Error code has changedView Change Details
2024-10-08The Error code has changedView Change Details
2024-09-25The Error code has changedView Change Details
2024-07-02The Error code has changedView Change Details
2024-05-14The Error code has changedView Change Details
2024-04-08The Error code has changedView Change Details