amazonka-cloudwatch-logs-1.3.1: Amazon CloudWatch Logs SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <>
Portabilitynon-portable (GHC extensions)
Safe HaskellNone




Creates or updates a metric filter and associates it with the specified log group. Metric filters allow you to configure rules to extract metric data from log events ingested through PutLogEvents requests.

The maximum number of metric filters that can be associated with a log group is 100.

See: AWS API Reference for PutMetricFilter.


Creating a Request

putMetricFilter Source

Creates a value of PutMetricFilter with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

pmfLogGroupName :: Lens' PutMetricFilter Text Source

The name of the log group to associate the metric filter with.

pmfFilterName :: Lens' PutMetricFilter Text Source

A name for the metric filter.

pmfFilterPattern :: Lens' PutMetricFilter Text Source

A valid CloudWatch Logs filter pattern for extracting metric data out of ingested log events.

pmfMetricTransformations :: Lens' PutMetricFilter (NonEmpty MetricTransformation) Source

A collection of information needed to define how metric data gets emitted.

Destructuring the Response

putMetricFilterResponse :: PutMetricFilterResponse Source

Creates a value of PutMetricFilterResponse with the minimum fields required to make a request.