All Products
Search
Document Center

Security Center:GenerateOnceTask

Last Updated:May 22, 2025

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

There is currently no authorization information disclosed in the API.

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-11-25The Error code has changedView Change Details
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