aws-cdk-lib.aws_cloudwatch.CfnAnomalyDetectorProps

interface CfnAnomalyDetectorProps

LanguageType name
.NETAmazon.CDK.AWS.CloudWatch.CfnAnomalyDetectorProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#CfnAnomalyDetectorProps
Javasoftware.amazon.awscdk.services.cloudwatch.CfnAnomalyDetectorProps
Pythonaws_cdk.aws_cloudwatch.CfnAnomalyDetectorProps
TypeScript aws-cdk-lib » aws_cloudwatch » CfnAnomalyDetectorProps

Properties for defining a CfnAnomalyDetector.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const cfnAnomalyDetectorProps: cloudwatch.CfnAnomalyDetectorProps = {
  configuration: {
    excludedTimeRanges: [{
      endTime: 'endTime',
      startTime: 'startTime',
    }],
    metricTimeZone: 'metricTimeZone',
  },
  dimensions: [{
    name: 'name',
    value: 'value',
  }],
  metricMathAnomalyDetector: {
    metricDataQueries: [{
      id: 'id',

      // the properties below are optional
      accountId: 'accountId',
      expression: 'expression',
      label: 'label',
      metricStat: {
        metric: {
          metricName: 'metricName',
          namespace: 'namespace',

          // the properties below are optional
          dimensions: [{
            name: 'name',
            value: 'value',
          }],
        },
        period: 123,
        stat: 'stat',

        // the properties below are optional
        unit: 'unit',
      },
      period: 123,
      returnData: false,
    }],
  },
  metricName: 'metricName',
  namespace: 'namespace',
  singleMetricAnomalyDetector: {
    dimensions: [{
      name: 'name',
      value: 'value',
    }],
    metricName: 'metricName',
    namespace: 'namespace',
    stat: 'stat',
  },
  stat: 'stat',
};

Properties

NameTypeDescription
configuration?IResolvable | ConfigurationPropertySpecifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model.
dimensions?IResolvable | IResolvable | DimensionProperty[]The dimensions of the metric associated with the anomaly detection band.
metricMathAnomalyDetector?IResolvable | MetricMathAnomalyDetectorPropertyThe CloudWatch metric math expression for this anomaly detector.
metricName?stringThe name of the metric associated with the anomaly detection band.
namespace?stringThe namespace of the metric associated with the anomaly detection band.
singleMetricAnomalyDetector?IResolvable | SingleMetricAnomalyDetectorPropertyThe CloudWatch metric and statistic for this anomaly detector.
stat?stringThe statistic of the metric associated with the anomaly detection band.

configuration?

Type: IResolvable | ConfigurationProperty (optional)

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.


dimensions?

Type: IResolvable | IResolvable | DimensionProperty[] (optional)

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


metricMathAnomalyDetector?

Type: IResolvable | MetricMathAnomalyDetectorProperty (optional)

The CloudWatch metric math expression for this anomaly detector.


metricName?

Type: string (optional)

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


namespace?

Type: string (optional)

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


singleMetricAnomalyDetector?

Type: IResolvable | SingleMetricAnomalyDetectorProperty (optional)

The CloudWatch metric and statistic for this anomaly detector.


stat?

Type: string (optional)

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