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 or server groups 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 or server group.
  • 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 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
ScanTaskId Long 282832

The ID of the virus scan task.

RequestId String DAE17926-4ABE-4DBD-9600-DDCB9B200F35

The ID of the request, which is used to locate and troubleshoot issues.

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

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

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