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

This operation is applicable to the following instances:

  • 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 API Explorer to perform debugging.

API Explorer provides various functions to simplify API usage. For example, you can search 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 the value 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

View error codes