Performs a virus scan task on a server or multiple servers.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes StartVirusScanTask

The operation that you want to perform.

Set the value to StartVirusScanTask.

TargetInfo String Yes [{"type":"uuid","name":"Host001","target":"503201a7-14c6-4280-801b-1169ed42****"}]

The asset on which you want to perform a virus scan task. You can select server groups or servers to scan for viruses. This parameter is a string that consists of JSON arrays. Each element in a JSON array is a JSON struct that includes the following fields:

  • type: the type of the asset on which you want to perform a virus scan task. Valid values:
    • groupId: server group
    • uuid: server
  • name: the name of a server group or server
  • target: the asset on which you want to perform a virus scan task.
    • If type is set to groupId, the value of this field is the ID of the server group. You can call the DescribeAllGroups operation to query the IDs of server groups.
    • If type is set to uuid, the value of this field is the universally unique identifier (UUID) of the server. You can call the DescribeCloudCenterInstances operation to query the UUIDs of servers.

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

Parameter Type Example Description
RequestId String DAE17926-4ABE-4DBD-9600-DDCB9B200F35

The ID of the request.

ScanTaskId Long 282832

The ID of the virus scan task.

Examples

Sample requests

http(s)://[Endpoint]/?Action=StartVirusScanTask
&TargetInfo=[{"type":"uuid","name":"Host001","target":"503201a7-14c6-4280-801b-1169ed42****"}]
&<Common request parameters>

Sample success responses

XML format

<StartVirusScanTaskResponse>
      <RequestId>DAE17926-4ABE-4DBD-9600-DDCB9B200F35</RequestId>
      <ScanTaskId>282832</ScanTaskId>
</StartVirusScanTaskResponse>

JSON format

{
	"RequestId": "DAE17926-4ABE-4DBD-9600-DDCB9B200F35",
	"ScanTaskId": 282832
}

Error codes

For a list of error codes, visit the API Error Center.