public static interface CfnMetricFilter.MetricTransformationProperty
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 java.lang.Number |
getDefaultValue()
(Optional) The value to emit when a filter pattern does not match a log event.
|
default java.lang.Object |
getDimensions()
`CfnMetricFilter.MetricTransformationProperty.Dimensions`.
|
java.lang.String |
getMetricName()
The name of the CloudWatch metric.
|
java.lang.String |
getMetricNamespace()
A custom namespace to contain your metric in CloudWatch.
|
java.lang.String |
getMetricValue()
The value that is published to the CloudWatch metric.
|
default java.lang.String |
getUnit()
`CfnMetricFilter.MetricTransformationProperty.Unit`.
|
java.lang.String getMetricName()
java.lang.String getMetricNamespace()
Use namespaces to group together metrics that are similar. For more information, see Namespaces .
java.lang.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
.
default java.lang.Number getDefaultValue()
This value can be null.
default java.lang.Object getDimensions()
default java.lang.String getUnit()
static CfnMetricFilter.MetricTransformationProperty.Builder builder()