GetAgentlessTaskCountBatch

Updated at:

Retrieves the risk statistics of resources for agentless detection in batches, querying 1 to 100 resources at a time.

Operation description

Only Alibaba Cloud accounts that have activated the pay-as-you-go billing method for the agentless detection feature of Security Center can call this operation. The UuidList parameter can contain up to 100 UUIDs. Duplicate UUIDs are deduplicated based on the order of their first appearance. The returned Data uses UUIDs as keys and does not aggregate the results of multiple resources. RiskMachine, ScanMachine, and LastTaskTime are account-level statistics, and the results for each resource in the same request remain consistent.

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:GetAgentlessTaskCountBatch

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TargetType

integer

No

The object type for detection. Valid values:

  • 1: host snapshot

  • 2: host image

  • 3: user snapshot

  • 4: user image

  • 5: NAS file system

  • 6: parallel sandbox

  • 7: security fix

3

UuidList

array

Yes

The list of UUIDs of the resources to query. You can specify 1 to 100 UUIDs.

["3bb30859-b3b5-4f28-868f-b0892c98****"]

string

Yes

The UUID of the resource.

3bb30859-b3b5-4f28-868f-b0892c98****

Response elements

Element

Type

Description

Example

object

RequestId

string

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

D03DD0FD-6041-5107-AC00-383E28F1****

Data

object

The statistics grouped by resource UUID. The keys of the map are resource UUIDs.

{"3bb30859-b3b5-4f28-868f-b0892c98****":{"RiskMachine":1,"ScanMachine":1}}

object

The agentless detection statistics for the specified resource.

{"RiskMachine":1,"ScanMachine":1}

RiskMachine

integer

The number of at-risk servers.

1

ScanMachine

integer

The number of scanned servers.

1

MaliciousFile

integer

The total number of malicious sample files.

1

Vulnerability

integer

The number of vulnerabilities.

1

LastTaskTime

integer

The timestamp of the last scan, in milliseconds.

1682577532318

BaselineCheckCount

integer

The total number of baseline check items.

1

ScaVulCount

integer

The total number of application vulnerabilities.

1

CveVulCount

integer

The total number of system vulnerability records.

1

SysVulCount

integer

The total number of Windows system vulnerability records.

1

SensitiveFileCount

integer

The total number of sensitive files.

1

EstimateUsedSize

integer

The estimated detection size, in GB. This field is not returned by the batch statistics operation.

10

Examples

Success response

JSON format

{
  "RequestId": "D03DD0FD-6041-5107-AC00-383E28F1****",
  "Data": {
    "key": {
      "RiskMachine": 1,
      "ScanMachine": 1,
      "MaliciousFile": 1,
      "Vulnerability": 1,
      "LastTaskTime": 1682577532318,
      "BaselineCheckCount": 1,
      "ScaVulCount": 1,
      "CveVulCount": 1,
      "SysVulCount": 1,
      "SensitiveFileCount": 1,
      "EstimateUsedSize": 10
    }
  }
}

Error codes

HTTP status code

Error code

Error message

Description

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.