All Products
Search
Document Center

Security Center:CreateAgentlessScanTask

Last Updated:Sep 15, 2026

Creates an agentless detection 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-sas:CreateAgentlessScanTask

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TargetType

integer

Yes

The target type. Valid values:

  • 1: Host detection - detection by snapshot.

  • 2: Host detection - detection by image.

  • 3: User snapshot detection.

  • 2: User custom image detection.

2

UuidList

array

No

The UUIDs of the assets to be detected.

Note

You can call the DescribeCloudCenterInstances operation to obtain the UUIDs of servers.

string

No

The UUID of the asset to be detected.

66a9c708-d4a4-4feb-aa00-61006556****

AutoDeleteDays

integer

No

The image retention period, in days. This parameter takes effect only for host detection. It does not take effect for user snapshot detection or user custom image detection.

1

ScanDataDisk

boolean

No

Specifies whether to detect data cloud disks. Valid values:

  • true: Detected.

  • false: Not detected.

true

ReleaseAfterScan

boolean

No

Specifies whether to enable the cost-saving mode. Valid values:

  • true: Enabled.

  • false: Disabled.

true

AssetSelectionType

string

No

The asset selection identifier.

AGENTLESS_SCAN_ONCE_TASK_1720145******

RegionId

string

No

The region ID, which is usually automatically populated by the gateway.

cn-shanghai

ClientToken

string

No

The region ID of the resource to be detected, such as cn-hangzhou.

cn-hangzhou

Targets

array<object>

No

The source of the API call, which is used to collect statistics on scan task volume and scan data volume by source. If this parameter is not specified, the value is empty.

image-console

object

No

ImageId

string

No

The ID of the source ECS custom image to be remediated. The image must be located in the region specified by RegionId of this target.

m-bp1example123456789

OriginImageName

string

No

The name of the source ECS custom image to be remediated.

source-image

OutputImageName

string

No

The name of the ECS image generated after remediation.

patched-image-20260909

RegionId

string

No

The region ID of the source image to be remediated, such as cn-hangzhou.

cn-hangzhou

VulnerabilityIds

array

No

The list of vulnerability identifiers to be fixed. At least one vulnerability identifier must be specified. Each identifier must be unique and non-empty.

string

No

The identifier of a single vulnerability to be fixed, such as a CVE ID.

CVE-2023-38408

No

The idempotency key.

66a9c708-d4a4-4fe

No

The list of targets for image security remediation. Each target specifies the source image, the region, the name of the remediated image, and the vulnerability identifiers to be fixed.

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID, which is a unique identifier generated by Alibaba Cloud for this request. You can use this ID to troubleshoot issues.

E90DE229-9FC6-58F6-BF4B-03AD6179****

TaskId

string

The task ID.

66561899963532d9db8a14124f46f3a0

Examples

Success response

JSON format

{
  "RequestId": "E90DE229-9FC6-58F6-BF4B-03AD6179****",
  "TaskId": "66561899963532d9db8a14124f46f3a0"
}

Error codes

HTTP status code

Error code

Error message

Description

400 TaskIsProcessing Task Is Processing. Task is processing.
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.