You can call this operation to enable or disable the SQL audit feature of an instance.

This operation is applicable to the following database engine versions:

  • MySQL 5.5
  • MySQL 5.6
  • MySQL 5.7 High-availability Edition (based on local SSDs)
  • SQL Server 2008 R2
  • PostgreSQL
  • PPAS


You can use OpenAPI Explorer to perform debugging.

OpenAPI Explorer provides various functions to simplify API usage. For example, you can retrieve APIs, call APIs, and generate SDK sample code.

Request parameters

Parameter Type Required? Example Description
Action String Yes ModifySQLCollectorPolicy

The operation that you want to perform. Set this parameter to ModifySQLCollectorPolicy.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

SQLCollectorStatus String Yes Enable

Indicates whether to enable or disable the SQL audit feature. Valid values: Enable | Disable.

AccessKeyId String No LTAIfCxxxxxxx

The AccessKey ID issued by Alibaba Cloud for users to access services.

Response parameters

Parameter Type Example Description
RequestId String 1AD222E9-E606-4A42-BF6D-8A4442913CEF

The ID of the request.


Request example

&<Common request parameters>

Normal response example

XML format


JSON format


Error codes

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