Show / Hide Table of Contents

Class CfnMetricFilter

The AWS::Logs::MetricFilter resource specifies a metric filter that describes how CloudWatch Logs extracts information from logs and transforms it into Amazon CloudWatch metrics.

Inheritance
System.Object
CfnElement
CfnRefElement
CfnResource
CfnMetricFilter
Implements
IInspectable
Inherited Members
CfnResource.IsCfnResource(Object)
CfnResource.AddDeletionOverride(String)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(String, Object)
CfnResource.AddOverride(String, Object)
CfnResource.AddPropertyDeletionOverride(String)
CfnResource.AddPropertyOverride(String, Object)
CfnResource.ApplyRemovalPolicy(Nullable<RemovalPolicy>, IRemovalPolicyOptions)
CfnResource.GetAtt(String, Nullable<ResolutionTypeHint>)
CfnResource.GetMetadata(String)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(Object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(Object)
CfnElement.OverrideLogicalId(String)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnMetricFilter : CfnResource, IInspectable
Syntax (vb)
Public Class CfnMetricFilter
    Inherits CfnResource
    Implements IInspectable
Remarks

If you have multiple metric filters that are associated with a log group, all the filters are applied to the log streams in that group.

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

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-metricfilter.html

CloudformationResource: AWS::Logs::MetricFilter

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Logs;

var cfnMetricFilter = new CfnMetricFilter(this, "MyCfnMetricFilter", new CfnMetricFilterProps {
    FilterPattern = "filterPattern",
    LogGroupName = "logGroupName",
    MetricTransformations = new [] { new MetricTransformationProperty {
        MetricName = "metricName",
        MetricNamespace = "metricNamespace",
        MetricValue = "metricValue",

        // the properties below are optional
        DefaultValue = 123,
        Dimensions = new [] { new DimensionProperty {
            Key = "key",
            Value = "value"
        } },
        Unit = "unit"
    } },

    // the properties below are optional
    ApplyOnTransformedLogs = false,
    FilterName = "filterName"
});

Synopsis

Constructors

CfnMetricFilter(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

CfnMetricFilter(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

CfnMetricFilter(Construct, String, ICfnMetricFilterProps)

Properties

ApplyOnTransformedLogs

This parameter is valid only for log groups that have an active log transformer.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties
FilterName

The name of the metric filter.

FilterPattern

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

LogGroupName

The name of an existing log group that you want to associate with this metric filter.

MetricTransformations

The metric transformations.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

RenderProperties(IDictionary<String, Object>)

Constructors

CfnMetricFilter(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected CfnMetricFilter(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

CfnMetricFilter(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected CfnMetricFilter(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

CfnMetricFilter(Construct, String, ICfnMetricFilterProps)

public CfnMetricFilter(Construct scope, string id, ICfnMetricFilterProps props)
Parameters
scope Constructs.Construct

Scope in which this resource is defined.

id System.String

Construct identifier for this resource (unique in its scope).

props ICfnMetricFilterProps

Resource properties.

Properties

ApplyOnTransformedLogs

This parameter is valid only for log groups that have an active log transformer.

public virtual object ApplyOnTransformedLogs { get; set; }
Property Value

System.Object

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

System.String

CfnProperties

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

System.Collections.Generic.IDictionary<System.String, System.Object>

Overrides
CfnResource.CfnProperties

FilterName

The name of the metric filter.

public virtual string FilterName { get; set; }
Property Value

System.String

FilterPattern

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

public virtual string FilterPattern { get; set; }
Property Value

System.String

LogGroupName

The name of an existing log group that you want to associate with this metric filter.

public virtual string LogGroupName { get; set; }
Property Value

System.String

MetricTransformations

The metric transformations.

public virtual object MetricTransformations { get; set; }
Property Value

System.Object

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

public virtual void Inspect(TreeInspector inspector)
Parameters
inspector TreeInspector

tree inspector to collect and process attributes.

RenderProperties(IDictionary<String, Object>)

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns

System.Collections.Generic.IDictionary<System.String, System.Object>

Overrides
CfnResource.RenderProperties(IDictionary<String, Object>)

Implements

IInspectable
Back to top Generated by DocFX