Enables or disables the SQL Explorer (SQL Audit) feature for an instance.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rds:ModifySQLCollectorPolicy | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The instance ID. You can call the DescribeDBInstances operation to query the instance ID. | rm-uf6wjk5xxxxxxx |
SQLCollectorStatus | string | Yes | Specifies whether to enable the SQL Explorer (SQL Audit) feature. Valid values:
| Enable |
ResourceGroupId | string | No | The resource group ID. You can call theDescribeDBInstanceAttribute operation to query the most recent region list. | rg-acfmx********** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidSqlLog.Malformed | The specified parameter SqlLog is not valid. | - |
400 | InvalidConfigName | The ConfigName is not valid. | - |
400 | InvalidConfigValue | The ConfigValue is not valid. | The operation failed. The values of some parameters are invalid. |
400 | IncorrectPerfFrequencyType | Current DB instance does not support this perf frequency. | - |
400 | InvalidParameters.Format | Specified parameter is not valid | The operation failed. The values of some parameters are invalid. |
400 | ErrorMxsServiceInsNum.Error | The Maxscale serviceIns num must be 1. | - |
400 | IncorrectSQLLogVersion | Current DB instance SQL log version does not support this operation. | This operation is not supported for the SQL log version of the current instance. |
400 | IncorrectSQLLogActiveStatus | Current DB instance SQL log active status does not support this operation. | The operation failed. The RDS instance is running. |
400 | OperationDenied.QuotaInsufficient | The DAS Enterprise Edition (V1) quota is insufficient. | The DAS Enterprise Edition (V1) quota is insufficient. |
400 | OperationDenied.OperateFrequently | The modification operation is too frequent. | The modification operation is too frequent. |
400 | Order.ComboInstanceNotAllowOperate | A package instance is not allowed to operate independently. | A package instance is not allowed to operate independently. |
400 | Price.PricingPlanResultNotFound | Pricing plan price result not found. | Pricing plan price result not found. |
400 | Order.NoRealNameAuthentication | You have not passed the real-name authentication and do not meet the purchase conditions. Please log in to the user center for real-name authentication. | You have not passed the real-name authentication and do not meet the purchase conditions. Please log in to the user center for real-name authentication. |
400 | InsufficientAvailableQuota | Your account quota limit is less than 0, please recharge before trying to purchase. | Your account available limit is less than 0, please recharge before trying to purchase. |
403 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | - |
403 | IncorrectDBType | The current DB type does not support this operation. | The operation failed. The operation is not supported by the database engine of the RDS instance. Specify a different database engine. |
403 | IncorrectDBInstanceType | Current DB instance type does not support this operation. | The operation failed. The RDS instance is not in a ready state. |
403 | IncorrectDBInstanceCharacterType | Current DB Instance character_type does not support this operation. | This operation is not supported for the character type of the current instance. |
403 | InvalidSqlRetention.Malformed | Specified sql retention is not valid. | - |
404 | InvalidDBInstanceName.NotFound | The database instance does not exist. | The name of the RDS instance cannot be found. Check the name of the RDS instance. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2024-02-20 | The Error code has changed | see changesets | ||||||||
| ||||||||||
2022-10-28 | The Error code has changed | see changesets | ||||||||
|