You can call this operation to query the list of SQL audit files of an RDS instance.

This operation is applicable to the following database engine versions:

  • MySQL
  • SQL Server 2008 R2
  • PostgreSQL
  • PPAS


You can use OpenAPI Explorer to perform debugging.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeSQLLogFiles

The operation that you want to perform. Set this parameter to DescribeSQLLogFiles.

DBInstanceId String Yes rm-uf6wjk5xxxxxx

The ID of the instance.

FileName String No custinsxxxxx.csv

The name of the audit file.

PageSize Integer No 20

The number of records on each page. Value range: 1 to 50.

Default value: 20.

PageNumber Integer No 1

The page number. Value range: 1 to 100000.

Default value: 1.

AccessKeyId String No LTAIfCxxxxxxxxxx

The AccessKey ID issued by Alibaba Cloud for users to access services.

Response parameters

Parameter Type Example Description
TotalRecordCount Integer 10

The total number of records.

PageNumber Integer 1

The page number.

PageRecordCount Integer 10

The number of records on the current page.

Items N/A N/A

The list of audit files.

FileID String custinsxxxxx.csv

The name of the file.

LogStatus String Success

The status of the file. Valid values:

  • Success
  • Failed
  • Generating
LogStartTime String 2015-05-23T07:00:00Z

The SQL start time. Format: yyyy-MM-ddTHH:mm:ssZ.

LogEndTime String 2015-05-24T07:00:00Z

The SQL end time. Format: yyyy-MM-ddTHH:mm:ssZ.

LogDownloadURL String

The download link. If the download is unavailable, this parameter is null.

LogSize String 3,000

The size of the audit file. Unit: byte.

RequestId String 1AD222E9-E606-4A42-BF6D-8A4442913CEF

The ID of the request.


Request example

&<Common request parameters>

Normal response example

XML format

	  <requestId> 1AD222E9-E606-4A42-BF6D-8A4442913CEF</requestId>

JSON format

	"requestId":" 1AD222E9-E606-4A42-BF6D-8A4442913CEF",

Error codes

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