interface MetricMathAnomalyDetectorProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CloudWatch.CfnAnomalyDetector.MetricMathAnomalyDetectorProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#CfnAnomalyDetector_MetricMathAnomalyDetectorProperty |
Java | software.amazon.awscdk.services.cloudwatch.CfnAnomalyDetector.MetricMathAnomalyDetectorProperty |
Python | aws_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
Name | Type | Description |
---|---|---|
metric | IResolvable | IResolvable | Metric [] | 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
|
Metric
[]
(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.