Skip to main content

db_log_files

Creates, updates, deletes, gets or lists a db_log_files resource.

Overview

Namedb_log_files
TypeResource
Idaws.rds.db_log_files

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
last_writtenintegerA POSIX timestamp when the last log entry was written.
log_file_namestringThe name of the log file for the specified DB instance.
sizeintegerThe size, in bytes, of the log file for the specified DB instance.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_db_log_filesselectDBInstanceIdentifier, regionFilenameContains, FileLastWritten, FileSize, Filters, MaxRecords, MarkerReturns a list of DB log files for the DB instance. This command doesn't apply to RDS Custom.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
DBInstanceIdentifierstringThe customer-assigned name of the DB instance that contains the log files you want to list. Constraints: Must match the identifier of an existing DBInstance.
regionstringAWS region (default: us-east-1)
FileLastWritteninteger (int64)Filters the available log files for files written since the specified date, in POSIX timestamp format with milliseconds.
FileSizeinteger (int64)Filters the available log files for files larger than the specified size.
FilenameContainsstringFilters the available log files for log file names that contain the specified string.
FiltersarrayThis parameter isn't currently supported.
MarkerstringThe pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords.
MaxRecordsintegerThe maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so you can retrieve the remaining results.

SELECT examples

Returns a list of DB log files for the DB instance. This command doesn't apply to RDS Custom.

SELECT
last_written,
log_file_name,
size
FROM aws.rds.db_log_files
WHERE DBInstanceIdentifier = '{{ DBInstanceIdentifier }}' -- required
AND region = '{{ region }}' -- required
AND FilenameContains = '{{ FilenameContains }}'
AND FileLastWritten = '{{ FileLastWritten }}'
AND FileSize = '{{ FileSize }}'
AND Filters = '{{ Filters }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
;