Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
- Service Configuration
- Errors
- Waiters
- Operations
- DescribeDestinations (Paginated)
- CreateExportTask
- PutDestination
- DescribeSubscriptionFilters (Paginated)
- GetLogEvents
- DescribeLogGroups (Paginated)
- DeleteDestination
- FilterLogEvents (Paginated)
- DeleteLogStream
- CreateLogStream
- CreateLogGroup
- DescribeExportTasks
- CancelExportTask
- PutSubscriptionFilter
- DeleteLogGroup
- DeleteSubscriptionFilter
- PutLogEvents
- DescribeMetricFilters (Paginated)
- TestMetricFilter
- PutDestinationPolicy
- PutMetricFilter
- DeleteRetentionPolicy
- DeleteMetricFilter
- PutRetentionPolicy
- DescribeLogStreams (Paginated)
- Types
Amazon CloudWatch Logs API Reference
You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon Elastic Compute Cloud (Amazon EC2) instances, Amazon CloudTrail, or other sources. You can then retrieve the associated log data from CloudWatch Logs using the Amazon CloudWatch console, the CloudWatch Logs commands in the AWS CLI, the CloudWatch Logs API, or the CloudWatch Logs SDK.
You can use CloudWatch Logs to:
- Monitor Logs from Amazon EC2 Instances in Real-time: You can use CloudWatch Logs to monitor applications and systems using log data. For example, CloudWatch Logs can track the number of errors that occur in your application logs and send you a notification whenever the rate of errors exceeds a threshold you specify. CloudWatch Logs uses your log data for monitoring; so, no code changes are required. For example, you can monitor application logs for specific literal terms (such as "NullReferenceException") or count the number of occurrences of a literal term at a particular position in log data (such as "404" status codes in an Apache access log). When the term you are searching for is found, CloudWatch Logs reports the data to a Amazon CloudWatch metric that you specify.
- Monitor Amazon CloudTrail Logged Events: You can create alarms in Amazon CloudWatch and receive notifications of particular API activity as captured by CloudTrail and use the notification to perform troubleshooting.
- Archive Log Data: You can use CloudWatch Logs to store your log data in highly durable storage. You can change the log retention setting so that any log events older than this setting are automatically deleted. The CloudWatch Logs agent makes it easy to quickly send both rotated and non-rotated log data off of a host and into the log service. You can then access the raw log data when you need it.
- cloudWatchLogs :: Service
- _InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidSequenceTokenException :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError
- _OperationAbortedException :: AsError a => Getting (First ServiceError) a ServiceError
- _ServiceUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError
- _DataAlreadyAcceptedException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidOperationException :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
- _LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- module Network.AWS.CloudWatchLogs.DescribeDestinations
- module Network.AWS.CloudWatchLogs.CreateExportTask
- module Network.AWS.CloudWatchLogs.PutDestination
- module Network.AWS.CloudWatchLogs.DescribeSubscriptionFilters
- module Network.AWS.CloudWatchLogs.GetLogEvents
- module Network.AWS.CloudWatchLogs.DescribeLogGroups
- module Network.AWS.CloudWatchLogs.DeleteDestination
- module Network.AWS.CloudWatchLogs.FilterLogEvents
- module Network.AWS.CloudWatchLogs.DeleteLogStream
- module Network.AWS.CloudWatchLogs.CreateLogStream
- module Network.AWS.CloudWatchLogs.CreateLogGroup
- module Network.AWS.CloudWatchLogs.DescribeExportTasks
- module Network.AWS.CloudWatchLogs.CancelExportTask
- module Network.AWS.CloudWatchLogs.PutSubscriptionFilter
- module Network.AWS.CloudWatchLogs.DeleteLogGroup
- module Network.AWS.CloudWatchLogs.DeleteSubscriptionFilter
- module Network.AWS.CloudWatchLogs.PutLogEvents
- module Network.AWS.CloudWatchLogs.DescribeMetricFilters
- module Network.AWS.CloudWatchLogs.TestMetricFilter
- module Network.AWS.CloudWatchLogs.PutDestinationPolicy
- module Network.AWS.CloudWatchLogs.PutMetricFilter
- module Network.AWS.CloudWatchLogs.DeleteRetentionPolicy
- module Network.AWS.CloudWatchLogs.DeleteMetricFilter
- module Network.AWS.CloudWatchLogs.PutRetentionPolicy
- module Network.AWS.CloudWatchLogs.DescribeLogStreams
- data ExportTaskStatusCode
- data OrderBy
- data Destination
- destination :: Destination
- dTargetARN :: Lens' Destination (Maybe Text)
- dCreationTime :: Lens' Destination (Maybe Natural)
- dArn :: Lens' Destination (Maybe Text)
- dAccessPolicy :: Lens' Destination (Maybe Text)
- dDestinationName :: Lens' Destination (Maybe Text)
- dRoleARN :: Lens' Destination (Maybe Text)
- data ExportTask
- exportTask :: ExportTask
- etDestinationPrefix :: Lens' ExportTask (Maybe Text)
- etDestination :: Lens' ExportTask (Maybe Text)
- etStatus :: Lens' ExportTask (Maybe ExportTaskStatus)
- etTaskName :: Lens' ExportTask (Maybe Text)
- etTaskId :: Lens' ExportTask (Maybe Text)
- etTo :: Lens' ExportTask (Maybe Natural)
- etFrom :: Lens' ExportTask (Maybe Natural)
- etLogGroupName :: Lens' ExportTask (Maybe Text)
- etExecutionInfo :: Lens' ExportTask (Maybe ExportTaskExecutionInfo)
- data ExportTaskExecutionInfo
- exportTaskExecutionInfo :: ExportTaskExecutionInfo
- eteiCreationTime :: Lens' ExportTaskExecutionInfo (Maybe Natural)
- eteiCompletionTime :: Lens' ExportTaskExecutionInfo (Maybe Natural)
- data ExportTaskStatus
- exportTaskStatus :: ExportTaskStatus
- etsCode :: Lens' ExportTaskStatus (Maybe ExportTaskStatusCode)
- etsMessage :: Lens' ExportTaskStatus (Maybe Text)
- data FilteredLogEvent
- filteredLogEvent :: FilteredLogEvent
- fleIngestionTime :: Lens' FilteredLogEvent (Maybe Natural)
- fleLogStreamName :: Lens' FilteredLogEvent (Maybe Text)
- fleMessage :: Lens' FilteredLogEvent (Maybe Text)
- fleTimestamp :: Lens' FilteredLogEvent (Maybe Natural)
- fleEventId :: Lens' FilteredLogEvent (Maybe Text)
- data InputLogEvent
- inputLogEvent :: Natural -> Text -> InputLogEvent
- ileTimestamp :: Lens' InputLogEvent Natural
- ileMessage :: Lens' InputLogEvent Text
- data LogGroup
- logGroup :: LogGroup
- lgCreationTime :: Lens' LogGroup (Maybe Natural)
- lgMetricFilterCount :: Lens' LogGroup (Maybe Int)
- lgArn :: Lens' LogGroup (Maybe Text)
- lgLogGroupName :: Lens' LogGroup (Maybe Text)
- lgRetentionInDays :: Lens' LogGroup (Maybe Int)
- lgStoredBytes :: Lens' LogGroup (Maybe Natural)
- data LogStream
- logStream :: LogStream
- lsCreationTime :: Lens' LogStream (Maybe Natural)
- lsUploadSequenceToken :: Lens' LogStream (Maybe Text)
- lsArn :: Lens' LogStream (Maybe Text)
- lsFirstEventTimestamp :: Lens' LogStream (Maybe Natural)
- lsLogStreamName :: Lens' LogStream (Maybe Text)
- lsStoredBytes :: Lens' LogStream (Maybe Natural)
- lsLastIngestionTime :: Lens' LogStream (Maybe Natural)
- lsLastEventTimestamp :: Lens' LogStream (Maybe Natural)
- data MetricFilter
- metricFilter :: MetricFilter
- mfCreationTime :: Lens' MetricFilter (Maybe Natural)
- mfFilterName :: Lens' MetricFilter (Maybe Text)
- mfFilterPattern :: Lens' MetricFilter (Maybe Text)
- mfMetricTransformations :: Lens' MetricFilter (Maybe (NonEmpty MetricTransformation))
- data MetricFilterMatchRecord
- metricFilterMatchRecord :: MetricFilterMatchRecord
- mfmrExtractedValues :: Lens' MetricFilterMatchRecord (HashMap Text Text)
- mfmrEventNumber :: Lens' MetricFilterMatchRecord (Maybe Integer)
- mfmrEventMessage :: Lens' MetricFilterMatchRecord (Maybe Text)
- data MetricTransformation
- metricTransformation :: Text -> Text -> Text -> MetricTransformation
- mtMetricName :: Lens' MetricTransformation Text
- mtMetricNamespace :: Lens' MetricTransformation Text
- mtMetricValue :: Lens' MetricTransformation Text
- data OutputLogEvent
- outputLogEvent :: OutputLogEvent
- oleIngestionTime :: Lens' OutputLogEvent (Maybe Natural)
- oleMessage :: Lens' OutputLogEvent (Maybe Text)
- oleTimestamp :: Lens' OutputLogEvent (Maybe Natural)
- data RejectedLogEventsInfo
- rejectedLogEventsInfo :: RejectedLogEventsInfo
- rleiTooOldLogEventEndIndex :: Lens' RejectedLogEventsInfo (Maybe Int)
- rleiTooNewLogEventStartIndex :: Lens' RejectedLogEventsInfo (Maybe Int)
- rleiExpiredLogEventEndIndex :: Lens' RejectedLogEventsInfo (Maybe Int)
- data SearchedLogStream
- searchedLogStream :: SearchedLogStream
- slsLogStreamName :: Lens' SearchedLogStream (Maybe Text)
- slsSearchedCompletely :: Lens' SearchedLogStream (Maybe Bool)
- data SubscriptionFilter
- subscriptionFilter :: SubscriptionFilter
- sfCreationTime :: Lens' SubscriptionFilter (Maybe Natural)
- sfFilterName :: Lens' SubscriptionFilter (Maybe Text)
- sfDestinationARN :: Lens' SubscriptionFilter (Maybe Text)
- sfLogGroupName :: Lens' SubscriptionFilter (Maybe Text)
- sfFilterPattern :: Lens' SubscriptionFilter (Maybe Text)
- sfRoleARN :: Lens' SubscriptionFilter (Maybe Text)
Service Configuration
cloudWatchLogs :: Service Source #
API version '2014-03-28' of the Amazon CloudWatch Logs SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by CloudWatchLogs
.
InvalidParameterException
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned if a parameter of the request is incorrectly specified.
InvalidSequenceTokenException
_InvalidSequenceTokenException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Prism for InvalidSequenceTokenException' errors.
ResourceAlreadyExistsException
_ResourceAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned if the specified resource already exists.
OperationAbortedException
_OperationAbortedException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned if multiple requests to update the same resource were in conflict.
ServiceUnavailableException
_ServiceUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned if the service cannot complete the request.
DataAlreadyAcceptedException
_DataAlreadyAcceptedException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Prism for DataAlreadyAcceptedException' errors.
InvalidOperationException
_InvalidOperationException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned if the operation is not valid on the specified resource
ResourceNotFoundException
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned if the specified resource does not exist.
LimitExceededException
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned if you have reached the maximum number of resources that can be created.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
DescribeDestinations (Paginated)
CreateExportTask
PutDestination
DescribeSubscriptionFilters (Paginated)
GetLogEvents
DescribeLogGroups (Paginated)
DeleteDestination
FilterLogEvents (Paginated)
DeleteLogStream
CreateLogStream
CreateLogGroup
DescribeExportTasks
CancelExportTask
PutSubscriptionFilter
DeleteLogGroup
DeleteSubscriptionFilter
PutLogEvents
DescribeMetricFilters (Paginated)
TestMetricFilter
PutDestinationPolicy
PutMetricFilter
DeleteRetentionPolicy
DeleteMetricFilter
PutRetentionPolicy
DescribeLogStreams (Paginated)
Types
ExportTaskStatusCode
data ExportTaskStatusCode Source #
OrderBy
Destination
data Destination Source #
A cross account destination that is the recipient of subscription log events.
See: destination
smart constructor.
destination :: Destination Source #
Creates a value of Destination
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dTargetARN :: Lens' Destination (Maybe Text) Source #
ARN of the physical target where the log events will be delivered (eg. ARN of a Kinesis stream).
dCreationTime :: Lens' Destination (Maybe Natural) Source #
A point in time expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC specifying when this destination was created.
dAccessPolicy :: Lens' Destination (Maybe Text) Source #
An IAM policy document that governs which AWS accounts can create subscription filters against this destination.
dDestinationName :: Lens' Destination (Maybe Text) Source #
Name of the destination.
dRoleARN :: Lens' Destination (Maybe Text) Source #
A role for impersonation for delivering log events to the target.
ExportTask
data ExportTask Source #
Represents an export task.
See: exportTask
smart constructor.
exportTask :: ExportTask Source #
Creates a value of ExportTask
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
etDestinationPrefix :: Lens' ExportTask (Maybe Text) Source #
Prefix that was used as the start of Amazon S3 key for every object exported.
etDestination :: Lens' ExportTask (Maybe Text) Source #
Name of Amazon S3 bucket to which the log data was exported.
etStatus :: Lens' ExportTask (Maybe ExportTaskStatus) Source #
Status of the export task.
etTaskName :: Lens' ExportTask (Maybe Text) Source #
The name of the export task.
etTo :: Lens' ExportTask (Maybe Natural) Source #
A point in time expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not exported.
etFrom :: Lens' ExportTask (Maybe Natural) Source #
A point in time expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC. Events with a timestamp prior to this time are not exported.
etLogGroupName :: Lens' ExportTask (Maybe Text) Source #
The name of the log group from which logs data was exported.
etExecutionInfo :: Lens' ExportTask (Maybe ExportTaskExecutionInfo) Source #
Execution info about the export task.
ExportTaskExecutionInfo
data ExportTaskExecutionInfo Source #
Represents the status of an export task.
See: exportTaskExecutionInfo
smart constructor.
exportTaskExecutionInfo :: ExportTaskExecutionInfo Source #
Creates a value of ExportTaskExecutionInfo
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
eteiCreationTime :: Lens' ExportTaskExecutionInfo (Maybe Natural) Source #
A point in time when the export task got created.
eteiCompletionTime :: Lens' ExportTaskExecutionInfo (Maybe Natural) Source #
A point in time when the export task got completed.
ExportTaskStatus
data ExportTaskStatus Source #
Represents the status of an export task.
See: exportTaskStatus
smart constructor.
exportTaskStatus :: ExportTaskStatus Source #
Creates a value of ExportTaskStatus
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
etsCode :: Lens' ExportTaskStatus (Maybe ExportTaskStatusCode) Source #
Status code of the export task.
etsMessage :: Lens' ExportTaskStatus (Maybe Text) Source #
Status message related to the code
.
FilteredLogEvent
data FilteredLogEvent Source #
Represents a matched event from a FilterLogEvents
request.
See: filteredLogEvent
smart constructor.
filteredLogEvent :: FilteredLogEvent Source #
Creates a value of FilteredLogEvent
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
fleIngestionTime :: Lens' FilteredLogEvent (Maybe Natural) Source #
Undocumented member.
fleLogStreamName :: Lens' FilteredLogEvent (Maybe Text) Source #
The name of the log stream this event belongs to.
fleMessage :: Lens' FilteredLogEvent (Maybe Text) Source #
The data contained in the log event.
fleTimestamp :: Lens' FilteredLogEvent (Maybe Natural) Source #
Undocumented member.
fleEventId :: Lens' FilteredLogEvent (Maybe Text) Source #
A unique identifier for this event.
InputLogEvent
data InputLogEvent Source #
A log event is a record of some activity that was recorded by the application or resource being monitored. The log event record that CloudWatch Logs understands contains two properties: the timestamp of when the event occurred, and the raw event message.
See: inputLogEvent
smart constructor.
Creates a value of InputLogEvent
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ileTimestamp :: Lens' InputLogEvent Natural Source #
Undocumented member.
ileMessage :: Lens' InputLogEvent Text Source #
Undocumented member.
LogGroup
See: logGroup
smart constructor.
Creates a value of LogGroup
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
LogStream
A log stream is sequence of log events from a single emitter of logs.
See: logStream
smart constructor.
logStream :: LogStream Source #
Creates a value of LogStream
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
MetricFilter
data MetricFilter Source #
Metric filters can be used to express how CloudWatch Logs would extract metric observations from ingested log events and transform them to metric data in a CloudWatch metric.
See: metricFilter
smart constructor.
metricFilter :: MetricFilter Source #
Creates a value of MetricFilter
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mfCreationTime :: Lens' MetricFilter (Maybe Natural) Source #
Undocumented member.
mfFilterName :: Lens' MetricFilter (Maybe Text) Source #
Undocumented member.
mfFilterPattern :: Lens' MetricFilter (Maybe Text) Source #
Undocumented member.
mfMetricTransformations :: Lens' MetricFilter (Maybe (NonEmpty MetricTransformation)) Source #
Undocumented member.
MetricFilterMatchRecord
data MetricFilterMatchRecord Source #
See: metricFilterMatchRecord
smart constructor.
metricFilterMatchRecord :: MetricFilterMatchRecord Source #
Creates a value of MetricFilterMatchRecord
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mfmrExtractedValues :: Lens' MetricFilterMatchRecord (HashMap Text Text) Source #
Undocumented member.
mfmrEventNumber :: Lens' MetricFilterMatchRecord (Maybe Integer) Source #
Undocumented member.
mfmrEventMessage :: Lens' MetricFilterMatchRecord (Maybe Text) Source #
Undocumented member.
MetricTransformation
data MetricTransformation Source #
See: metricTransformation
smart constructor.
Creates a value of MetricTransformation
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mtMetricName :: Lens' MetricTransformation Text Source #
Undocumented member.
mtMetricNamespace :: Lens' MetricTransformation Text Source #
Undocumented member.
mtMetricValue :: Lens' MetricTransformation Text Source #
Undocumented member.
OutputLogEvent
data OutputLogEvent Source #
See: outputLogEvent
smart constructor.
outputLogEvent :: OutputLogEvent Source #
Creates a value of OutputLogEvent
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
oleIngestionTime :: Lens' OutputLogEvent (Maybe Natural) Source #
Undocumented member.
oleMessage :: Lens' OutputLogEvent (Maybe Text) Source #
Undocumented member.
oleTimestamp :: Lens' OutputLogEvent (Maybe Natural) Source #
Undocumented member.
RejectedLogEventsInfo
data RejectedLogEventsInfo Source #
See: rejectedLogEventsInfo
smart constructor.
rejectedLogEventsInfo :: RejectedLogEventsInfo Source #
Creates a value of RejectedLogEventsInfo
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
rleiTooOldLogEventEndIndex :: Lens' RejectedLogEventsInfo (Maybe Int) Source #
Undocumented member.
rleiTooNewLogEventStartIndex :: Lens' RejectedLogEventsInfo (Maybe Int) Source #
Undocumented member.
rleiExpiredLogEventEndIndex :: Lens' RejectedLogEventsInfo (Maybe Int) Source #
Undocumented member.
SearchedLogStream
data SearchedLogStream Source #
An object indicating the search status of a log stream in a
FilterLogEvents
request.
See: searchedLogStream
smart constructor.
searchedLogStream :: SearchedLogStream Source #
Creates a value of SearchedLogStream
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
slsLogStreamName :: Lens' SearchedLogStream (Maybe Text) Source #
The name of the log stream.
slsSearchedCompletely :: Lens' SearchedLogStream (Maybe Bool) Source #
Indicates whether all the events in this log stream were searched or more data exists to search by paginating further.
SubscriptionFilter
data SubscriptionFilter Source #
See: subscriptionFilter
smart constructor.
subscriptionFilter :: SubscriptionFilter Source #
Creates a value of SubscriptionFilter
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sfCreationTime :: Lens' SubscriptionFilter (Maybe Natural) Source #
Undocumented member.
sfFilterName :: Lens' SubscriptionFilter (Maybe Text) Source #
Undocumented member.
sfDestinationARN :: Lens' SubscriptionFilter (Maybe Text) Source #
Undocumented member.
sfLogGroupName :: Lens' SubscriptionFilter (Maybe Text) Source #
Undocumented member.
sfFilterPattern :: Lens' SubscriptionFilter (Maybe Text) Source #
Undocumented member.