CfnMetricFilterProps¶
-
class
aws_cdk.aws_logs.
CfnMetricFilterProps
(*, filter_pattern, log_group_name, metric_transformations, filter_name=None)¶ Bases:
object
Properties for defining a
CfnMetricFilter
.- Parameters
filter_pattern (
str
) – A filter pattern for extracting metric data out of ingested log events. For more information, see Filter and Pattern Syntax .log_group_name (
str
) – The name of an existing log group that you want to associate with this metric filter.metric_transformations (
Union
[IResolvable
,Sequence
[Union
[MetricTransformationProperty
,Dict
[str
,Any
],IResolvable
]]]) – The metric transformations.filter_name (
Optional
[str
]) –AWS::Logs::MetricFilter.FilterName
.
- Link
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html
- ExampleMetadata
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_logs as logs cfn_metric_filter_props = logs.CfnMetricFilterProps( filter_pattern="filterPattern", log_group_name="logGroupName", metric_transformations=[logs.CfnMetricFilter.MetricTransformationProperty( metric_name="metricName", metric_namespace="metricNamespace", metric_value="metricValue", # the properties below are optional default_value=123, dimensions=[logs.CfnMetricFilter.DimensionProperty( key="key", value="value" )], unit="unit" )], # the properties below are optional filter_name="filterName" )
Attributes
-
filter_name
¶ AWS::Logs::MetricFilter.FilterName
.
-
filter_pattern
¶ A filter pattern for extracting metric data out of ingested log events.
For more information, see Filter and Pattern Syntax .
-
log_group_name
¶ The name of an existing log group that you want to associate with this metric filter.
-
metric_transformations
¶ The metric transformations.