AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::CloudWatch::AnomalyDetector

CfnAnomalyDetector

The `AWS::CloudWatch::AnomalyDetector` type specifies an anomaly detection band for a certain metric and statistic. The band represents the expected "normal" range for the metric values. Anomaly detection bands can be used for visualization of a metric's expected values, and for alarms. For more information see [Using CloudWatch anomaly detection.](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Anomaly_Detection.html) .

Import

import { CfnAnomalyDetector } from 'aws-cdk-lib/aws-cloudwatch';

Or use the module namespace:

import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
// cloudwatch.CfnAnomalyDetector

Properties

Configuration passed to the constructor as CfnAnomalyDetectorProps.

configurationOptional
IResolvable | ConfigurationProperty

Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. The configuration can also include the time zone to use for the metric.

dimensionsOptional
IResolvable | IResolvable | DimensionProperty[]

The dimensions of the metric associated with the anomaly detection band.

metricCharacteristicsOptional
IResolvable | MetricCharacteristicsProperty

Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models. Currently, it includes the `PeriodicSpikes` parameter.

metricMathAnomalyDetectorOptional
IResolvable | MetricMathAnomalyDetectorProperty

The CloudWatch metric math expression for this anomaly detector.

metricNameOptional
string

The name of the metric associated with the anomaly detection band.

namespaceOptional
string

The namespace of the metric associated with the anomaly detection band.

singleMetricAnomalyDetectorOptional
IResolvable | SingleMetricAnomalyDetectorProperty

The CloudWatch metric and statistic for this anomaly detector.

statOptional
string

The statistic of the metric associated with the anomaly detection band.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon CloudWatch Cheat Sheet

Everything you need to know about Amazon CloudWatch on one page. HD quality, print-friendly.

Download Free Infographic