Show / Hide Table of Contents

Class CfnMetricFilterPropsMixin.MetricTransformationProperty

MetricTransformation is a property of the AWS::Logs::MetricFilter resource that describes how to transform log streams into a CloudWatch metric.

Inheritance
object
CfnMetricFilterPropsMixin.MetricTransformationProperty
Implements
CfnMetricFilterPropsMixin.IMetricTransformationProperty
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.CfnPropertyMixins.AWS.Logs
Assembly: Amazon.CDK.CfnPropertyMixins.dll
Syntax (csharp)
public class CfnMetricFilterPropsMixin.MetricTransformationProperty : CfnMetricFilterPropsMixin.IMetricTransformationProperty
Syntax (vb)
Public Class CfnMetricFilterPropsMixin.MetricTransformationProperty Implements CfnMetricFilterPropsMixin.IMetricTransformationProperty
Remarks

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

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.CfnPropertyMixins.AWS.Logs;

             var metricTransformationProperty = new MetricTransformationProperty {
                 DefaultValue = 123,
                 Dimensions = new [] { new DimensionProperty {
                     Key = "key",
                     Value = "value"
                 } },
                 MetricName = "metricName",
                 MetricNamespace = "metricNamespace",
                 MetricValue = "metricValue",
                 Unit = "unit"
             };

Synopsis

Constructors

MetricTransformationProperty()

MetricTransformation is a property of the AWS::Logs::MetricFilter resource that describes how to transform log streams into a CloudWatch metric.

Properties

DefaultValue

(Optional) The value to emit when a filter pattern does not match a log event.

Dimensions

The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.

MetricName

The name of the CloudWatch metric.

MetricNamespace

A custom namespace to contain your metric in CloudWatch.

MetricValue

The value that is published to the CloudWatch metric.

Unit

The unit to assign to the metric.

Constructors

MetricTransformationProperty()

MetricTransformation is a property of the AWS::Logs::MetricFilter resource that describes how to transform log streams into a CloudWatch metric.

public MetricTransformationProperty()
Remarks

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

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.CfnPropertyMixins.AWS.Logs;

             var metricTransformationProperty = new MetricTransformationProperty {
                 DefaultValue = 123,
                 Dimensions = new [] { new DimensionProperty {
                     Key = "key",
                     Value = "value"
                 } },
                 MetricName = "metricName",
                 MetricNamespace = "metricNamespace",
                 MetricValue = "metricValue",
                 Unit = "unit"
             };

Properties

DefaultValue

(Optional) The value to emit when a filter pattern does not match a log event.

public double? DefaultValue { get; set; }
Property Value

double?

Remarks

This value can be null.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-defaultvalue

Dimensions

The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.

public object? Dimensions { get; set; }
Property Value

object

Remarks
Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as <code>IPAddress</code> or <code>requestID</code> as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric.

CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.

You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated AWS Charges .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-dimensions

Type union: either IResolvable or (either IResolvable or CfnMetricFilterPropsMixin.IDimensionProperty)[]

MetricName

The name of the CloudWatch metric.

public string? MetricName { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricname

MetricNamespace

A custom namespace to contain your metric in CloudWatch.

public string? MetricNamespace { get; set; }
Property Value

string

Remarks

Use namespaces to group together metrics that are similar. For more information, see Namespaces .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricnamespace

MetricValue

The value that is published to the CloudWatch metric.

public string? MetricValue { get; set; }
Property Value

string

Remarks

For example, if you're counting the occurrences of a particular term like Error , specify 1 for the metric value. If you're counting the number of bytes transferred, reference the value that is in the log event by using \(. followed by the name of the field that you specified in the filter pattern, such as <code>\).size .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-metricvalue

Unit

The unit to assign to the metric.

public string? Unit { get; set; }
Property Value

string

Remarks

If you omit this, the unit is set as None .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-metricfilter-metrictransformation.html#cfn-logs-metricfilter-metrictransformation-unit

Implements

CfnMetricFilterPropsMixin.IMetricTransformationProperty
Back to top Generated by DocFX