You can call this operation to configure virus detection.

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 OperateSuspiciousTargetConfig

The operation that you want to perform.

Set the value to: OperateSuspiciousTargetConfig.

TargetOperations String Yes "[{\"targetType\":\"uuid\",\"target\":\"0585f81a-dd84-4ddf-9971-f59d12345678\",\"flag\":\"add\"},{\"targetType\":\"uuid\",\"target\":\"01acfd9d-e6a4-4e61-b9eb-aae012345678\",\"flag\":\"add\"},{\"targetType\":\"uuid\",\"target\":\"04a0e735-ad32-4835-b635-045812345678\",\"flag\":\"add\"}]"

The parameters required to configure virus detection for the server. Set the following parameters:

  • targetType: the dimension on which viruses are blocked. Currently, UUID is supported. Set the value to uuid.
  • target: the UUID of the server on which you want to run virus detections.
  • flag: Enables or disables virus detection for the server. Valid values:add (enables virus detection) ordel (disables virus detection).
TargetType String Yes uuid

The operating dimension on which you manage virus detection. Currently, only UUIDs are supported.

Set the value to Uuid.

Type String  Yes auto_breaking

The action performed on detected viruses.

Set the value to auto_breaking, which indicates that the system automatically blocks viruses.

SourceIp String No 1.2.3.4

The source IP address of the request.

Lang String No zh

The language of the request and response. Valid values: Valid values:

  • zh: Chinese
  • en: English

Response parameters

Parameter Type Example Description
RequestId String ABCD-PSD2-5256-1DSA-4222-JHBN

The ID of the request.

Examples

Sample request

http(s)://[Endpoint]/? Action=OperateSuspiciousTargetConfig
&TargetOperations="[{\"targetType\":\"uuid\",\"target\":\"0585f81a-dd84-4ddf-9971-f59d12345678\",\"flag\":\"add\"},{\"targetType\":\"uuid\",\"target\":\"01acfd9d-e6a4-4e61-b9eb-aae012345678\",\"flag\":\"add\"},{\"targetType\":\"uuid\",\"target\":\"04a0e735-ad32-4835-b635-045812345678\",\"flag\":\"add\"}]"
&TargetType=uuid
&Type=auto_breaking
&<Common request parameters>

Sample success responses

XML format

<OperateSuspiciousTargetConfigResponse>
  <RequestId>ABCD-PSD2-5256-1DSA-4222-JHBN</RequestId>
</OperateSuspiciousTargetConfigResponse>

JSON format

{
    "RequestId":"ABCD-PSD2-5256-1DSA-4222-JHBN"
}

Error codes

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