getLogRecord method
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
.
May throw InvalidParameterException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ServiceUnavailableException.
Parameter logRecordPointer
:
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.
Implementation
Future<GetLogRecordResponse> getLogRecord({
required String logRecordPointer,
}) async {
ArgumentError.checkNotNull(logRecordPointer, 'logRecordPointer');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Logs_20140328.GetLogRecord'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'logRecordPointer': logRecordPointer,
},
);
return GetLogRecordResponse.fromJson(jsonResponse.body);
}