Enables or disables the log collection feature for a specific domain name.

Before you enable log collection, make sure that real-time log analysis is enabled for the WAF instance, and WAF has the permission to save logs to the exclusive Logstore.

For more information, see Real-time log analysis.


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 ModifyLogServiceStatus

The operation that you want to perform. Set the value to ModifyLogServiceStatus.

Domain String Yes www.example.com

The domain name that is added to WAF.

Enabled Integer Yes 1

Specifies whether to enable log collection. Valid values:

  • 0: disables log collection
  • 1: enables log collection
InstanceId String Yes waf_elasticity-cn-0xldbqt****

The ID of the WAF instance.

You can call the DescribeInstanceInfo operation to query the ID of the WAF instance.

Response parameters

Parameter Type Example Description
RequestId String D7861F61-5B61-46CE-A47C-6B19160D5EB0

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "D7861F61-5B61-46CE-A47C-6B19160D5EB0"

Error codes

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