Enables or disables the SQL Explorer (SQL audit) feature of an ApsaraDB for RDS instance.

Before you call this operation, make sure that the RDS instance runs one of the following database engines and versions:

  • MySQL
  • PostgreSQL
  • PPAS


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 ModifySQLCollectorPolicy

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

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the RDS instance.

SQLCollectorStatus String Yes Enable

Specifies whether to enable or disable the SQL Explorer (SQL audit) feature. Valid values:Enable | Disabled.

Response parameters

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

The ID of the request.


Sample requests

http(s)://rds.aliyuncs.com/? Action=ModifySQLCollectorPolicy
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

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