@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.711Z") @Stability(value=Stable) public interface MetricFilterOptions 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.*;
IFilterPattern filterPattern;
MetricFilterOptions metricFilterOptions = MetricFilterOptions.builder()
.filterPattern(filterPattern)
.metricName("metricName")
.metricNamespace("metricNamespace")
// the properties below are optional
.defaultValue(123)
.metricValue("metricValue")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
MetricFilterOptions.Builder
A builder for
MetricFilterOptions |
static class |
MetricFilterOptions.Jsii$Proxy
An implementation for
MetricFilterOptions |
| Modifier and Type | Method and Description |
|---|---|
static MetricFilterOptions.Builder |
builder() |
default Number |
getDefaultValue()
The value to emit if the pattern does not match a particular event.
|
IFilterPattern |
getFilterPattern()
Pattern to search for log events.
|
String |
getMetricName()
The name of the metric to emit.
|
String |
getMetricNamespace()
The namespace of the metric to emit.
|
default String |
getMetricValue()
The value to emit for the metric.
|
@Stability(value=Stable) @NotNull IFilterPattern getFilterPattern()
@Stability(value=Stable) @NotNull String getMetricName()
@Stability(value=Stable) @NotNull String getMetricNamespace()
@Stability(value=Stable) @Nullable default Number getDefaultValue()
Default: No metric emitted.
@Stability(value=Stable) @Nullable default String getMetricValue()
Can either be a literal number (typically "1"), or the name of a field in the structure to take the value from the matched event. If you are using a field value, the field value must have been matched using the pattern.
If you want to specify a field from a matched JSON structure, use '$.fieldName', and make sure the field is in the pattern (if only as '$.fieldName = *').
If you want to specify a field from a matched space-delimited structure, use '$fieldName'.
Default: "1"
@Stability(value=Stable) static MetricFilterOptions.Builder builder()
MetricFilterOptions.Builder of MetricFilterOptionsCopyright © 2022. All rights reserved.