Description

Queries the SQL audit log files of an instance.

Request parameters

Parameter Type Required Description
<Common request parameters> N/A Yes For more information, see Common parameters.
Action String Yes The operation that you want to perform. Set the value to DescribeSQLLogFiles.
DBInstanceId String Yes The ID of the instance.
FileName String No The name of the file.
PageSize Integer No The number of entries to return on each page. Valid values: 30, 50, and 100. Default value: 30.
PageNumber Integer No The number of the page to return. Valid values: any non-zero positive integer. Default value: 1.

Response parameters

Parameter Type Description
<Common response parameters> For more information, see Common response parameters.
TotalRecordCount Integer The total number of entries.
PageNumber Integer The number of the returned page.
PageRecordCount Integer The number of entries returned on the current page.
Items List<LogFile> An array consisting of LogFile data.
Table 1. LogFile parameters
Parameter Type Description
FileID Integer The ID of the file.
LogStatus String The status of the file. Valid values:
  • NoStart: The file has not been generated.
  • Generating: The file is being generated.
  • Success: The file is generated.
  • Failed: The file failed to be generated.
LogStartTime String The beginning of the time range within which data was recorded in the file.
LogEndTime String The end of the time range within which data was recorded in the file.
LogDownloadURL String The URL used to download the file. If the URL is unavailable, an empty string is returned.
LogSize Long The size of the file. Unit: bytes.

Sample requests

https://gpdb.aliyuncs.com/?Action=DescribeSQLLogFiles
&DBInstanceId=gp-xxxxxxx
&<Common request parameters>

Sample responses

XML format

<DescribeSQLLogFilesResponse> 
    <Items></Items>
    <PageNumber>1</PageNumber>
    <TotalRecordCount>0</TotalRecordCount>
    <RequestId>66E164C1-D7F2-4D85-849D-E2883FCFFBA5</RequestId>
    <PageRecordCount>0</PageRecordCount>
</DescribeSQLLogFilesResponse>

JSON format

{
    "Items":{
        "LogFile":[

        ]
    },
    "PageNumber":1,
    "TotalRecordCount":0,
    "RequestId":"66E164C1-D7F2-4D85-849D-E2883FCFFBA5",
    "PageRecordCount":0
}