GenerateOnceTask

Updated at:

Creates a one-time scan task.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-aegis:GenerateOnceTask

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TaskType

string

Yes

The type of the scan task. Valid values:

  • CLIENT_PROBLEM_CHECK: a client troubleshooting task

  • CLIENT_DEV_OPS: a cloud DevOps task

  • ASSET_SECURITY_CHECK: an asset collection task

  • ASSETS_COLLECTION: an asset fingerprinting task

  • IMAGE_SCAN: a container image scan task

  • AI_SECURITY_CHECK: an AI asset synchronization task

  • IDC_PROBE_SCAN: an IDC probe scan task

  • ATTACK_SURFACE_SCAN: an attack surface scan task

  • ASSET_EXPOSURE_SCAN: an asset exposure scan task

  • VUL_CHECK_TASK: a vulnerability scan task

CLIENT_PROBLEM_CHECK

TaskName

string

Yes

The name of the scan task.

CLIENT_PROBLEM_CHECK

Param

string

Yes

A JSON string that contains additional parameters for the task.

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

Source

string

No

The source that initiated the task.

Manual

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID. This unique identifier is generated by Alibaba Cloud and can be used for troubleshooting.

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

CanCreate

boolean

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

  • true: You can create more scan tasks.

  • false: You cannot create more scan tasks.

Note

You can run up to 10 concurrent scan tasks. Requests to create a new task fail if this limit is exceeded. Wait for an existing task to complete before creating a new one.

true

LastTask

string

The ID of the last task.

38730bb078f4a1461d4ed283994c****

CollectTime

integer

The collection time.

1670307567000

TotalCount

integer

The total number of tasks.

100

TaskId

string

The ID of the scan task.

38730bb078f4a1461d4ed283994c****

FinishCount

integer

The number of completed tasks.

61

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 AssetsCollectionFrequencyLimit Collection task frequency limit. Acquisition task frequency limit.
400 IllegalParameter Illegal parameter, please check the param. Parameter error, please check the input parameters.
400 UnsupportedOperation This operation is not supported. The operation is not supported.
400 TaskProcessing The baseline repair task is in progress. The baseline repair task is in progress.
400 -101 Invalid parameter value. Invalid parameter.
400 -120 The maximum number of quota is exceeded. Maximum quantity limit exceeded.
400 TaskRepeat Please wait last task finish.
400 BeyondQuata Please check the scan quota Check the quota of the assets that can be scanned.
400 TaskDependencyPending The previous task is not completed. The previous task did not complete.
500 ServerError ServerError
403 NoPermission caller has no permission You are not authorized to do this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.