aws-cdk-lib.aws_cloudwatch.CfnAnomalyDetector.MetricMathAnomalyDetectorProperty

interface MetricMathAnomalyDetectorProperty

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

Indicates the CloudWatch math expression that provides the time series the anomaly detector uses as input.

The designated math expression must return a single time series.

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 metricMathAnomalyDetectorProperty: cloudwatch.CfnAnomalyDetector.MetricMathAnomalyDetectorProperty = {
  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,
  }],
};

Properties

NameTypeDescription
metricDataQueries?IResolvable | IResolvable | MetricDataQueryProperty[]An array of metric data query structures that enables you to create an anomaly detector based on the result of a metric math expression.

metricDataQueries?

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

An array of metric data query structures that enables you to create an anomaly detector based on the result of a metric math expression.

Each item in MetricDataQueries gets a metric or performs a math expression. One item in MetricDataQueries is the expression that provides the time series that the anomaly detector uses as input. Designate the expression by setting ReturnData to true for this object in the array. For all other expressions and metrics, set ReturnData to false . The designated expression must return a single time series.