Queries the audit log configurations of an ApsaraDB for Redis instance. The configurations include whether to enable the audit log feature and the retention period of audit logs.

Note You can call the ModifyAuditLogConfig operation to enable or disable the audit log feature for an ApsaraDB for Redis instance. For more information, see Enable the new version of the audit log feature.

Before you call this operation, make sure that the instance meets the following requirements:

  • The instance is an instance of ApsaraDB for Redis Community Edition or a performance-enhanced instance of ApsaraDB for Redis Enhanced Edition (Tair).

  • The major version of the ApsaraDB for Redis instance is Redis 4.0 or later, and the latest minor version is used. You can call the DescribeEngineVersion operation to query the major version and minor version of an ApsaraDB for Redis instance.

Debugging

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 DescribeAuditLogConfig

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

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the ApsaraDB for Redis instance. You can call the DescribeInstances operation to query instance IDs.

RegionId String Yes cn-hanghzou

The region ID of the instance. You can call the DescribeInstanceAttribute operation to query the region ID of the instance.

Response parameters

Parameter Type Example Description
DbAudit String true

Indicates whether the audit log feature is enabled. Valid values:

  • true: enabled
  • false: disabled
Note You can call the ModifyAuditLogConfig operation to enable or disable the audit log feature for an ApsaraDB for Redis instance.
RequestId String 2BE6E619-A657-42E3-AD2D-18F8428A****

The ID of the request.

Retention String 5

The retention period of audit logs. Unit: day.

Examples

Sample requests

http(s)://r-kvstore.aliyuncs.com/?Action=DescribeAuditLogConfig
&InstanceId=r-bp1zxszhcgatnx****
&RegionId=cn-hanghzou
&<Common request parameters>

Sample success responses

XML format

<DescribeAuditLogConfigResponse>
      <DbAudit>true</DbAudit>
      <RequestId>2BE6E619-A657-42E3-AD2D-18F8428A****</RequestId>
      <Retention>5</Retention>
</DescribeAuditLogConfigResponse>

JSON format

{
    "DbAudit": true,
    "RequestId": "2BE6E619-A657-42E3-AD2D-18F8428A****",
    "Retention": "5"
}

Error codes

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