db_log_files
Creates, updates, deletes, gets or lists a db_log_files resource.
Overview
| Name | db_log_files |
| Type | Resource |
| Id | aws.rds.db_log_files |
Fields
The following fields are returned by SELECT queries:
- describe_db_log_files
| Name | Datatype | Description |
|---|---|---|
last_written | integer | A POSIX timestamp when the last log entry was written. |
log_file_name | string | The name of the log file for the specified DB instance. |
size | integer | The size, in bytes, of the log file for the specified DB instance. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_db_log_files | select | DBInstanceIdentifier, region | FilenameContains, FileLastWritten, FileSize, Filters, MaxRecords, Marker | Returns 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.
| Name | Datatype | Description |
|---|---|---|
DBInstanceIdentifier | string | The 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. |
region | string | AWS region (default: us-east-1) |
FileLastWritten | integer (int64) | Filters the available log files for files written since the specified date, in POSIX timestamp format with milliseconds. |
FileSize | integer (int64) | Filters the available log files for files larger than the specified size. |
FilenameContains | string | Filters the available log files for log file names that contain the specified string. |
Filters | array | This parameter isn't currently supported. |
Marker | string | The pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords. |
MaxRecords | integer | The 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
- describe_db_log_files
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 }}'
;