Interface AnomalyDetectionMetricOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,MathExpressionOptions
- All Known Implementing Classes:
AnomalyDetectionMetricOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-04T09:27:36.427Z")
@Stability(Stable)
public interface AnomalyDetectionMetricOptions
extends software.amazon.jsii.JsiiSerializable, MathExpressionOptions
Properties needed to make an anomaly detection alarm from a metric.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.cloudwatch.*;
Metric metric;
AnomalyDetectionMetricOptions anomalyDetectionMetricOptions = AnomalyDetectionMetricOptions.builder()
.metric(metric)
// the properties below are optional
.color("color")
.label("label")
.period(Duration.minutes(30))
.searchAccount("searchAccount")
.searchRegion("searchRegion")
.stdDevs(123)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forAnomalyDetectionMetricOptionsstatic final classAn implementation forAnomalyDetectionMetricOptions -
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.cloudwatch.MathExpressionOptions
getColor, getLabel, getPeriod, getSearchAccount, getSearchRegion
-
Method Details
-
getMetric
The metric to add the alarm on.Metric objects can be obtained from most resources, or you can construct custom Metric objects by instantiating one.
-
getStdDevs
The number of standard deviations to use for the anomaly detection band.The higher the value, the wider the band.
- Must be greater than 0. A value of 0 or negative values would not make sense in the context of calculating standard deviations.
- There is no strict maximum value defined, as standard deviations can theoretically extend infinitely. However, in practice, values beyond 5 or 6 standard deviations are rarely used, as they would result in an extremely wide anomaly detection band, potentially missing significant anomalies.
Default: 2
-
builder
-