Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Lists log events from the specified log stream. You can list all of the log events or filter using a time range.
By default, this operation returns as many log events as can fit in a response size of 1MB (up to 10,000 log events). You can get additional log events by specifying one of the tokens in a subsequent call. This operation can return empty results while there are more log events available through the token.
If you are using CloudWatch cross-account observability, you can use this operation in a monitoring account and view data from the linked source accounts. For more information, see CloudWatch cross-account observability.
Synopsis
- data GetLogEvents = GetLogEvents' {}
- newGetLogEvents :: Text -> Text -> GetLogEvents
- getLogEvents_endTime :: Lens' GetLogEvents (Maybe Natural)
- getLogEvents_limit :: Lens' GetLogEvents (Maybe Natural)
- getLogEvents_logGroupIdentifier :: Lens' GetLogEvents (Maybe Text)
- getLogEvents_nextToken :: Lens' GetLogEvents (Maybe Text)
- getLogEvents_startFromHead :: Lens' GetLogEvents (Maybe Bool)
- getLogEvents_startTime :: Lens' GetLogEvents (Maybe Natural)
- getLogEvents_unmask :: Lens' GetLogEvents (Maybe Bool)
- getLogEvents_logGroupName :: Lens' GetLogEvents Text
- getLogEvents_logStreamName :: Lens' GetLogEvents Text
- data GetLogEventsResponse = GetLogEventsResponse' {}
- newGetLogEventsResponse :: Int -> GetLogEventsResponse
- getLogEventsResponse_events :: Lens' GetLogEventsResponse (Maybe [OutputLogEvent])
- getLogEventsResponse_nextBackwardToken :: Lens' GetLogEventsResponse (Maybe Text)
- getLogEventsResponse_nextForwardToken :: Lens' GetLogEventsResponse (Maybe Text)
- getLogEventsResponse_httpStatus :: Lens' GetLogEventsResponse Int
Creating a Request
data GetLogEvents Source #
See: newGetLogEvents
smart constructor.
GetLogEvents' | |
|
Instances
Create a value of GetLogEvents
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:endTime:GetLogEvents'
, getLogEvents_endTime
- The end of the time range, expressed as the number of milliseconds after
Jan 1, 1970 00:00:00 UTC
. Events with a timestamp equal to or later
than this time are not included.
$sel:limit:GetLogEvents'
, getLogEvents_limit
- The maximum number of log events returned. If you don't specify a
limit, the default is as many log events as can fit in a response size
of 1 MB (up to 10,000 log events).
$sel:logGroupIdentifier:GetLogEvents'
, getLogEvents_logGroupIdentifier
- Specify either the name or ARN of the log group to view events from. If
the log group is in a source account and you are using a monitoring
account, you must use the log group ARN.
If you specify values for both logGroupName
and logGroupIdentifier
,
the action returns an InvalidParameterException
error.
$sel:nextToken:GetLogEvents'
, getLogEvents_nextToken
- The token for the next set of items to return. (You received this token
from a previous call.)
$sel:startFromHead:GetLogEvents'
, getLogEvents_startFromHead
- If the value is true, the earliest log events are returned first. If the
value is false, the latest log events are returned first. The default
value is false.
If you are using a previous nextForwardToken
value as the nextToken
in this operation, you must specify true
for startFromHead
.
$sel:startTime:GetLogEvents'
, getLogEvents_startTime
- The start of the time range, expressed as the number of milliseconds
after Jan 1, 1970 00:00:00 UTC
. Events with a timestamp equal to this
time or later than this time are included. Events with a timestamp
earlier than this time are not included.
$sel:unmask:GetLogEvents'
, getLogEvents_unmask
- 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.
GetLogEvents
, getLogEvents_logGroupName
- The name of the log group.
If you specify values for both logGroupName
and logGroupIdentifier
,
the action returns an InvalidParameterException
error.
GetLogEvents
, getLogEvents_logStreamName
- The name of the log stream.
Request Lenses
getLogEvents_endTime :: Lens' GetLogEvents (Maybe Natural) Source #
The end of the time range, expressed as the number of milliseconds after
Jan 1, 1970 00:00:00 UTC
. Events with a timestamp equal to or later
than this time are not included.
getLogEvents_limit :: Lens' GetLogEvents (Maybe Natural) Source #
The maximum number of log events returned. If you don't specify a limit, the default is as many log events as can fit in a response size of 1 MB (up to 10,000 log events).
getLogEvents_logGroupIdentifier :: Lens' GetLogEvents (Maybe Text) Source #
Specify either the name or ARN of the log group to view events from. If the log group is in a source account and you are using a monitoring account, you must use the log group ARN.
If you specify values for both logGroupName
and logGroupIdentifier
,
the action returns an InvalidParameterException
error.
getLogEvents_nextToken :: Lens' GetLogEvents (Maybe Text) Source #
The token for the next set of items to return. (You received this token from a previous call.)
getLogEvents_startFromHead :: Lens' GetLogEvents (Maybe Bool) Source #
If the value is true, the earliest log events are returned first. If the value is false, the latest log events are returned first. The default value is false.
If you are using a previous nextForwardToken
value as the nextToken
in this operation, you must specify true
for startFromHead
.
getLogEvents_startTime :: Lens' GetLogEvents (Maybe Natural) Source #
The start of the time range, expressed as the number of milliseconds
after Jan 1, 1970 00:00:00 UTC
. Events with a timestamp equal to this
time or later than this time are included. Events with a timestamp
earlier than this time are not included.
getLogEvents_unmask :: Lens' GetLogEvents (Maybe Bool) Source #
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.
getLogEvents_logGroupName :: Lens' GetLogEvents Text Source #
The name of the log group.
If you specify values for both logGroupName
and logGroupIdentifier
,
the action returns an InvalidParameterException
error.
getLogEvents_logStreamName :: Lens' GetLogEvents Text Source #
The name of the log stream.
Destructuring the Response
data GetLogEventsResponse Source #
See: newGetLogEventsResponse
smart constructor.
GetLogEventsResponse' | |
|
Instances
newGetLogEventsResponse Source #
Create a value of GetLogEventsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:events:GetLogEventsResponse'
, getLogEventsResponse_events
- The events.
$sel:nextBackwardToken:GetLogEventsResponse'
, getLogEventsResponse_nextBackwardToken
- The token for the next set of items in the backward direction. The token
expires after 24 hours. This token is not null. If you have reached the
end of the stream, it returns the same token you passed in.
$sel:nextForwardToken:GetLogEventsResponse'
, getLogEventsResponse_nextForwardToken
- The token for the next set of items in the forward direction. The token
expires after 24 hours. If you have reached the end of the stream, it
returns the same token you passed in.
$sel:httpStatus:GetLogEventsResponse'
, getLogEventsResponse_httpStatus
- The response's http status code.
Response Lenses
getLogEventsResponse_events :: Lens' GetLogEventsResponse (Maybe [OutputLogEvent]) Source #
The events.
getLogEventsResponse_nextBackwardToken :: Lens' GetLogEventsResponse (Maybe Text) Source #
The token for the next set of items in the backward direction. The token expires after 24 hours. This token is not null. If you have reached the end of the stream, it returns the same token you passed in.
getLogEventsResponse_nextForwardToken :: Lens' GetLogEventsResponse (Maybe Text) Source #
The token for the next set of items in the forward direction. The token expires after 24 hours. If you have reached the end of the stream, it returns the same token you passed in.
getLogEventsResponse_httpStatus :: Lens' GetLogEventsResponse Int Source #
The response's http status code.