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 node type. Valid values:

  • CLIENT_PROBLEM_CHECK: Client troubleshooting node.

  • CLIENT_DEV_OPS: Cloud O&M node.

  • ASSET_SECURITY_CHECK: Asset collection node.

  • ASSETS_COLLECTION: Asset Fingerprints collection node.

  • IMAGE_SCAN: Container image scan node.

  • AI_SECURITY_CHECK: AI asset synchronization node.

  • IDC_PROBE_SCAN: IDC probe scan node.

  • ATTACK_SURFACE_SCAN: Attack surface border asset scan node.

  • ASSET_EXPOSURE_SCAN: Asset exposure scan node.

  • VUL_CHECK_TASK: Vulnerability scanning node.

CLIENT_PROBLEM_CHECK

TaskName

string

Yes

The node name. Valid values:

  • CLIENT_PROBLEM_CHECK: Client troubleshooting node.

  • CLIENT_DEV_OPS: Cloud O&M node.

  • ASSET_SECURITY_CHECK: Asset collection node.

  • ASSETS_COLLECTION: Asset Fingerprints collection node.

  • IMAGE_SCAN: Container image scan node.

  • AI_SECURITY_CHECK: AI asset synchronization node.

  • IDC_PROBE_SCAN: IDC probe scan node.

  • ATTACK_SURFACE_SCAN: Attack surface border asset scan node.

  • ASSET_EXPOSURE_SCAN: Asset exposure scan node.

  • VUL_CHECK_TASK: Vulnerability scanning node.

CLIENT_PROBLEM_CHECK

Param

string

Yes

The extended information field.

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

Source

string

No

The source of the task.

Manual

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request. This is a unique identifier generated by Alibaba Cloud for the request and can be used to troubleshoot and locate issues.

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

CanCreate

boolean

Indicates whether you can continue to create scan tasks. Valid values:

  • true: You can continue to create scan tasks.

  • false: You cannot continue to create scan tasks.

Note

By default, up to 10 scan tasks can run concurrently. If the number of concurrent scan tasks exceeds 10, calls to this operation to create a scan task will fail. You must wait for at least one of the existing 10 scan tasks to complete before you can create a new scan task.

true

LastTask

string

The ID of the last task.

38730bb078f4a1461d4ed283994c****

CollectTime

integer

The collection time. The value is a UNIX timestamp in milliseconds.

1670307567000

TotalCount

integer

The total number of tasks.

100

TaskId

string

The ID of the detection 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.