MetricFilterMetricTransformationArgs

data class MetricFilterMetricTransformationArgs(val defaultValue: Output<Double>? = null, val dimensions: Output<List<MetricFilterDimensionArgs>>? = null, val metricName: Output<String>, val metricNamespace: Output<String>, val metricValue: Output<String>, val unit: Output<MetricFilterMetricTransformationUnit>? = null) : ConvertibleToJava<MetricFilterMetricTransformationArgs>

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

Constructors

Link copied to clipboard
constructor(defaultValue: Output<Double>? = null, dimensions: Output<List<MetricFilterDimensionArgs>>? = null, metricName: Output<String>, metricNamespace: Output<String>, metricValue: Output<String>, unit: Output<MetricFilterMetricTransformationUnit>? = null)

Properties

Link copied to clipboard
val defaultValue: Output<Double>? = null

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

Link copied to clipboard

The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions. Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as `IPAddress` or `requestID` 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 Charges.

Link copied to clipboard
val metricName: Output<String>

The name of the CloudWatch metric.

Link copied to clipboard
val metricNamespace: Output<String>

A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.

Link copied to clipboard
val metricValue: Output<String>

The value that is published to the CloudWatch metric. 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 `$.size`.

Link copied to clipboard

The unit to assign to the metric. If you omit this, the unit is set as `None`.

Functions

Link copied to clipboard
open override fun toJava(): MetricFilterMetricTransformationArgs