describe_db_log_files

describe_db_log_files(**kwargs)

Returns a list of DB log files for the DB instance.

This command doesn't apply to RDS Custom.

See also: AWS API Documentation

Request Syntax

response = client.describe_db_log_files(
    DBInstanceIdentifier='string',
    FilenameContains='string',
    FileLastWritten=123,
    FileSize=123,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxRecords=123,
    Marker='string'
)
Parameters
  • DBInstanceIdentifier (string) --

    [REQUIRED]

    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.
  • FilenameContains (string) -- Filters the available log files for log file names that contain the specified string.
  • FileLastWritten (integer) -- Filters the available log files for files written since the specified date, in POSIX timestamp format with milliseconds.
  • FileSize (integer) -- Filters the available log files for files larger than the specified size.
  • Filters (list) --

    This parameter isn't currently supported.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as IDs. The filters supported by a describe operation are documented with the describe operation.

      Note

      Currently, wildcards are not supported in filters.

      The following actions can be filtered:

      • DescribeDBClusterBacktracks
      • DescribeDBClusterEndpoints
      • DescribeDBClusters
      • DescribeDBInstances
      • DescribePendingMaintenanceActions
      • Name (string) -- [REQUIRED]

        The name of the filter. Filter names are case-sensitive.

      • Values (list) -- [REQUIRED]

        One or more filter values. Filter values are case-sensitive.

        • (string) --
  • 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.
  • 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.
Return type

dict

Returns

Response Syntax

{
    'DescribeDBLogFiles': [
        {
            'LogFileName': 'string',
            'LastWritten': 123,
            'Size': 123
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    The response from a call to DescribeDBLogFiles .

    • DescribeDBLogFiles (list) --

      The DB log files returned.

      • (dict) --

        This data type is used as a response element to DescribeDBLogFiles .

        • LogFileName (string) --

          The name of the log file for the specified DB instance.

        • LastWritten (integer) --

          A POSIX timestamp when the last log entry was written.

        • Size (integer) --

          The size, in bytes, of the log file for the specified DB instance.

    • Marker (string) --

      A pagination token that can be used in a later DescribeDBLogFiles request.

Exceptions

  • RDS.Client.exceptions.DBInstanceNotFoundFault

Examples

This example lists matching log file names for the specified DB instance, file name pattern, last write date in POSIX time with milleseconds, and minimum file size.

response = client.describe_db_log_files(
    DBInstanceIdentifier='mymysqlinstance',
    FileLastWritten=1470873600000,
    FileSize=0,
    FilenameContains='error',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}