Queries the SQL audit configuration of an AnalyticDB for MySQL cluster.

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
DBClusterId String Yes am-t4nj8619bz2w3****

The ID of the cluster.

RegionId String Yes cn-hangzhou

The ID of the region. You can call the DescribeRegions operation to query the most recent region list.

Action String Yes DescribeAuditLogConfig

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

Response parameters

Parameter Type Example Description
RequestId String F0983B43-B2EC-536A-8791-142B5CF1E9B6

The ID of the request.

AuditLogStatus String on

The status of SQL audit. Valid values:

  • on: SQL audit is enabled.
  • off: SQL audit is disabled.
DBClusterId String am-t4nj8619bz2w3****

The ID of the cluster.

Examples

Sample requests

http(s)://adb.aliyuncs.com/?Action=DescribeAuditLogConfig
&DBClusterId=am-t4nj8619bz2w3****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeAuditLogConfigResponse>
    <RequestId>F0983B43-B2EC-536A-8791-142B5CF1E9B6</RequestId>
    <AuditLogStatus>on</AuditLogStatus>
    <DBClusterId>am-t4nj8619bz2w3****</DBClusterId>
</DescribeAuditLogConfigResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "F0983B43-B2EC-536A-8791-142B5CF1E9B6",
  "AuditLogStatus" : "on",
  "DBClusterId" : "am-t4nj8619bz2w3****"
}

Error codes

HTTP status code Error code Error message Description
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified DBClusterId parameter does not exist. Check whether the cluster ID is valid.

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