@Stability(value=Stable) public static final class MetricFilter.Builder extends Object implements software.amazon.jsii.Builder<MetricFilter>
MetricFilter.| Modifier and Type | Method and Description |
|---|---|
MetricFilter |
build() |
static MetricFilter.Builder |
create(software.constructs.Construct scope,
String id) |
MetricFilter.Builder |
defaultValue(Number defaultValue)
The value to emit if the pattern does not match a particular event.
|
MetricFilter.Builder |
filterPattern(IFilterPattern filterPattern)
Pattern to search for log events.
|
MetricFilter.Builder |
logGroup(ILogGroup logGroup)
The log group to create the filter on.
|
MetricFilter.Builder |
metricName(String metricName)
The name of the metric to emit.
|
MetricFilter.Builder |
metricNamespace(String metricNamespace)
The namespace of the metric to emit.
|
MetricFilter.Builder |
metricValue(String metricValue)
The value to emit for the metric.
|
@Stability(value=Stable) public static MetricFilter.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.MetricFilter.Builder.@Stability(value=Stable) public MetricFilter.Builder filterPattern(IFilterPattern filterPattern)
filterPattern - Pattern to search for log events. This parameter is required.this@Stability(value=Stable) public MetricFilter.Builder metricName(String metricName)
metricName - The name of the metric to emit. This parameter is required.this@Stability(value=Stable) public MetricFilter.Builder metricNamespace(String metricNamespace)
metricNamespace - The namespace of the metric to emit. This parameter is required.this@Stability(value=Stable) public MetricFilter.Builder defaultValue(Number defaultValue)
Default: No metric emitted.
defaultValue - The value to emit if the pattern does not match a particular event. This parameter is required.this@Stability(value=Stable) public MetricFilter.Builder metricValue(String metricValue)
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"
metricValue - The value to emit for the metric. This parameter is required.this@Stability(value=Stable) public MetricFilter.Builder logGroup(ILogGroup logGroup)
logGroup - The log group to create the filter on. This parameter is required.this@Stability(value=Stable) public MetricFilter build()
build in interface software.amazon.jsii.Builder<MetricFilter>Copyright © 2022. All rights reserved.