# AWS::Logs::MetricFilter Specifies a metric filter that describes how CloudWatch Logs extracts information from logs and transforms it into Amazon CloudWatch metrics. ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{
    "Type" : "AWS::Logs::MetricFilter",
    "Properties" : {
        "FilterName" : String,
        "FilterPattern" : String,
        "LogGroupName" : String,
        "MetricTransformations" : [ MetricTransformation, ... ]
    }
}
### YAML
Type: AWS::Logs::MetricFilter
Properties:
    FilterName: String
    FilterPattern: String
    LogGroupName: String
    MetricTransformations: 
      - MetricTransformation
## Properties #### FilterName A name for the metric filter. _Required_: No _Type_: String _Minimum_: 1 _Maximum_: 512 _Pattern_: ^[^:*]{1,512} _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### FilterPattern Pattern that Logs follows to interpret each entry in a log. _Required_: Yes _Type_: String _Maximum_: 1024 _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### LogGroupName Existing log group that you want to associate with this filter. _Required_: Yes _Type_: String _Minimum_: 1 _Maximum_: 512 _Pattern_: ^[.\-_/#A-Za-z0-9]{1,512} _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### MetricTransformations A collection of information that defines how metric data gets emitted. _Required_: Yes _Type_: List of MetricTransformation _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)