@Stability(value=Stable)
public static interface CfnMetricFilter.MetricTransformationProperty
extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.logs.*;
MetricTransformationProperty metricTransformationProperty = MetricTransformationProperty.builder()
.metricName("metricName")
.metricNamespace("metricNamespace")
.metricValue("metricValue")
// the properties below are optional
.defaultValue(123)
.dimensions(List.of(DimensionProperty.builder()
.key("key")
.value("value")
.build()))
.unit("unit")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnMetricFilter.MetricTransformationProperty.Builder
A builder for
CfnMetricFilter.MetricTransformationProperty |
static class |
CfnMetricFilter.MetricTransformationProperty.Jsii$Proxy
An implementation for
CfnMetricFilter.MetricTransformationProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnMetricFilter.MetricTransformationProperty.Builder |
builder() |
default Number |
getDefaultValue()
(Optional) The value to emit when a filter pattern does not match a log event.
|
default Object |
getDimensions()
`CfnMetricFilter.MetricTransformationProperty.Dimensions`.
|
String |
getMetricName()
The name of the CloudWatch metric.
|
String |
getMetricNamespace()
A custom namespace to contain your metric in CloudWatch.
|
String |
getMetricValue()
The value that is published to the CloudWatch metric.
|
default String |
getUnit()
`CfnMetricFilter.MetricTransformationProperty.Unit`.
|
@Stability(value=Stable) @NotNull String getMetricName()
@Stability(value=Stable) @NotNull String getMetricNamespace()
Use namespaces to group together metrics that are similar. For more information, see Namespaces .
@Stability(value=Stable) @NotNull String getMetricValue()
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 .
@Stability(value=Stable) @Nullable default Number getDefaultValue()
This value can be null.
@Stability(value=Stable) @Nullable default Object getDimensions()
@Stability(value=Stable) @Nullable default String getUnit()
@Stability(value=Stable) static CfnMetricFilter.MetricTransformationProperty.Builder builder()
Copyright © 2022. All rights reserved.