get_relational_database_log_events

get_relational_database_log_events(**kwargs)

Returns a list of log events for a database in Amazon Lightsail.

See also: AWS API Documentation

Request Syntax

response = client.get_relational_database_log_events(
    relationalDatabaseName='string',
    logStreamName='string',
    startTime=datetime(2015, 1, 1),
    endTime=datetime(2015, 1, 1),
    startFromHead=True|False,
    pageToken='string'
)
Parameters
  • relationalDatabaseName (string) --

    [REQUIRED]

    The name of your database for which to get log events.

  • logStreamName (string) --

    [REQUIRED]

    The name of the log stream.

    Use the get relational database log streams operation to get a list of available log streams.

  • startTime (datetime) --

    The start of the time interval from which to get log events.

    Constraints:

    • Specified in Coordinated Universal Time (UTC).
    • Specified in the Unix time format. For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the start time.
  • endTime (datetime) --

    The end of the time interval from which to get log events.

    Constraints:

    • Specified in Coordinated Universal Time (UTC).
    • Specified in the Unix time format. For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the end time.
  • startFromHead (boolean) --

    Parameter to specify if the log should start from head or tail. If true is specified, the log event starts from the head of the log. If false is specified, the log event starts from the tail of the log.

    Note

    For PostgreSQL, the default value of false is the only option available.

  • pageToken (string) --

    The token to advance to the next or previous page of results from your request.

    To get a page token, perform an initial GetRelationalDatabaseLogEvents request. If your results are paginated, the response will return a next forward token and/or next backward token that you can specify as the page token in a subsequent request.

Return type

dict

Returns

Response Syntax

{
    'resourceLogEvents': [
        {
            'createdAt': datetime(2015, 1, 1),
            'message': 'string'
        },
    ],
    'nextBackwardToken': 'string',
    'nextForwardToken': 'string'
}

Response Structure

  • (dict) --

    • resourceLogEvents (list) --

      An object describing the result of your get relational database log events request.

      • (dict) --

        Describes a database log event.

        • createdAt (datetime) --

          The timestamp when the database log event was created.

        • message (string) --

          The message of the database log event.

    • nextBackwardToken (string) --

      A token used for advancing to the previous page of results from your get relational database log events request.

    • nextForwardToken (string) --

      A token used for advancing to the next page of results from your get relational database log events request.

Exceptions

  • Lightsail.Client.exceptions.ServiceException
  • Lightsail.Client.exceptions.InvalidInputException
  • Lightsail.Client.exceptions.NotFoundException
  • Lightsail.Client.exceptions.OperationFailureException
  • Lightsail.Client.exceptions.AccessDeniedException
  • Lightsail.Client.exceptions.AccountSetupInProgressException
  • Lightsail.Client.exceptions.UnauthenticatedException