Enables or modifies the audit log settings for a Tair (Redis® OSS-Compatible) database instance.
Operation description
Before calling this operation, make sure that you fully understand the billing methods and pricing of audit logs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:ModifyAuditLogConfig |
update |
*DBInstance
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Instance ID of the instance. You can call the DescribeInstances operation to query instance ID. |
r-bp1zxszhcgatnx**** |
| Retention |
integer |
No |
The number of days for which audit logs are retained. Valid values: 1 to 365. Note
|
10 |
| DbAudit |
boolean |
No |
Specifies whether to enable the audit log feature. Valid values:
Note
If the instance uses the cluster architecture or read/write splitting architecture, the audit logs of data nodes and proxy nodes are enabled or disabled at the same time. You cannot enable the audit logs for data nodes or proxy nodes separately. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
8D0C0AFC-E9CD-47A4-8395-5C31BF9B**** |
Examples
Success response
JSON format
{
"RequestId": "8D0C0AFC-E9CD-47A4-8395-5C31BF9B****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidRetention | The Retention is invalid. | |
| 400 | ResourceConfigError | The request processing has failed due to resource config error. | |
| 403 | TaskHasExist | The task already exists. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.