CloudWatchLogs / Client / get_log_record

get_log_record#

CloudWatchLogs.Client.get_log_record(**kwargs)#

Retrieves all of the fields and values of a single log event. All fields are retrieved, even if the original query that produced the logRecordPointer retrieved only a subset of fields. Fields are returned as field name/field value pairs.

The full unparsed log event is returned within @message.

See also: AWS API Documentation

Request Syntax

response = client.get_log_record(
    logRecordPointer='string',
    unmask=True|False
)
Parameters:
  • logRecordPointer (string) –

    [REQUIRED]

    The pointer corresponding to the log event record you want to retrieve. You get this from the response of a GetQueryResults operation. In that response, the value of the @ptr field for a log event is the value to use as logRecordPointer to retrieve that complete log event record.

  • unmask (boolean) –

    Specify true to display the log event fields with all sensitive data unmasked and visible. The default is false.

    To use this operation with this parameter, you must be signed into an account with the logs:Unmask permission.

Return type:

dict

Returns:

Response Syntax

{
    'logRecord': {
        'string': 'string'
    }
}

Response Structure

  • (dict) –

    • logRecord (dict) –

      The requested log event, as a JSON string.

      • (string) –

        • (string) –

Exceptions