Interface MetricFilterProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,MetricFilterOptions
- All Known Implementing Classes:
MetricFilterProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.133.0 (build 0f43e37)",
date="2026-07-02T13:32:42.372Z")
@Stability(Stable)
public interface MetricFilterProps
extends software.amazon.jsii.JsiiSerializable, MetricFilterOptions
Properties for a MetricFilter.
Example:
Repository repository = new Repository(this, "TestRepository");
Runtime runtime = Runtime.Builder.create(this, "Runtime")
.agentRuntimeArtifact(AgentRuntimeArtifact.fromEcrRepository(repository, "v1.0.0"))
.build();
MetricFilter.Builder.create(this, "ToolErrors")
.logGroup(runtime.getApplicationLogGroup())
.filterPattern(FilterPattern.stringValue("$.tool_status", "=", "error"))
.metricNamespace("MyApp")
.metricName("ToolExecutionErrors")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forMetricFilterPropsstatic final classAn implementation forMetricFilterProps -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricFilterProps.Builderbuilder()The log group to create the filter on.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.logs.MetricFilterOptions
getApplyOnTransformedLogs, getDefaultValue, getDimensions, getFilterName, getFilterPattern, getMetricName, getMetricNamespace, getMetricValue, getUnit
-
Method Details
-
getLogGroup
The log group to create the filter on. -
builder
- Returns:
- a
MetricFilterProps.BuilderofMetricFilterProps
-