CfnAnomalyDetectorProps

class aws_cdk.aws_cloudwatch.CfnAnomalyDetectorProps(*, configuration=None, dimensions=None, metric_characteristics=None, metric_math_anomaly_detector=None, metric_name=None, namespace=None, single_metric_anomaly_detector=None, stat=None)

Bases: object

Properties for defining a CfnAnomalyDetector.

Parameters:
  • configuration (Union[IResolvable, ConfigurationProperty, Dict[str, Any], None]) – 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 (Union[IResolvable, Sequence[Union[IResolvable, DimensionProperty, Dict[str, Any]]], None]) – The dimensions of the metric associated with the anomaly detection band.

  • metric_characteristics (Union[IResolvable, MetricCharacteristicsProperty, Dict[str, Any], None]) – 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.

  • metric_math_anomaly_detector (Union[IResolvable, MetricMathAnomalyDetectorProperty, Dict[str, Any], None]) – The CloudWatch metric math expression for this anomaly detector.

  • metric_name (Optional[str]) – The name of the metric associated with the anomaly detection band.

  • namespace (Optional[str]) – The namespace of the metric associated with the anomaly detection band.

  • single_metric_anomaly_detector (Union[IResolvable, SingleMetricAnomalyDetectorProperty, Dict[str, Any], None]) – The CloudWatch metric and statistic for this anomaly detector.

  • stat (Optional[str]) – The statistic of the metric associated with the anomaly detection band.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch

cfn_anomaly_detector_props = cloudwatch.CfnAnomalyDetectorProps(
    configuration=cloudwatch.CfnAnomalyDetector.ConfigurationProperty(
        excluded_time_ranges=[cloudwatch.CfnAnomalyDetector.RangeProperty(
            end_time="endTime",
            start_time="startTime"
        )],
        metric_time_zone="metricTimeZone"
    ),
    dimensions=[cloudwatch.CfnAnomalyDetector.DimensionProperty(
        name="name",
        value="value"
    )],
    metric_characteristics=cloudwatch.CfnAnomalyDetector.MetricCharacteristicsProperty(
        periodic_spikes=False
    ),
    metric_math_anomaly_detector=cloudwatch.CfnAnomalyDetector.MetricMathAnomalyDetectorProperty(
        metric_data_queries=[cloudwatch.CfnAnomalyDetector.MetricDataQueryProperty(
            id="id",

            # the properties below are optional
            account_id="accountId",
            expression="expression",
            label="label",
            metric_stat=cloudwatch.CfnAnomalyDetector.MetricStatProperty(
                metric=cloudwatch.CfnAnomalyDetector.MetricProperty(
                    metric_name="metricName",
                    namespace="namespace",

                    # the properties below are optional
                    dimensions=[cloudwatch.CfnAnomalyDetector.DimensionProperty(
                        name="name",
                        value="value"
                    )]
                ),
                period=123,
                stat="stat",

                # the properties below are optional
                unit="unit"
            ),
            period=123,
            return_data=False
        )]
    ),
    metric_name="metricName",
    namespace="namespace",
    single_metric_anomaly_detector=cloudwatch.CfnAnomalyDetector.SingleMetricAnomalyDetectorProperty(
        account_id="accountId",
        dimensions=[cloudwatch.CfnAnomalyDetector.DimensionProperty(
            name="name",
            value="value"
        )],
        metric_name="metricName",
        namespace="namespace",
        stat="stat"
    ),
    stat="stat"
)

Attributes

configuration

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html#cfn-cloudwatch-anomalydetector-configuration

dimensions

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html#cfn-cloudwatch-anomalydetector-dimensions

metric_characteristics

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html#cfn-cloudwatch-anomalydetector-metriccharacteristics

metric_math_anomaly_detector

The CloudWatch metric math expression for this anomaly detector.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html#cfn-cloudwatch-anomalydetector-metricmathanomalydetector

metric_name

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html#cfn-cloudwatch-anomalydetector-metricname

namespace

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html#cfn-cloudwatch-anomalydetector-namespace

single_metric_anomaly_detector

The CloudWatch metric and statistic for this anomaly detector.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html#cfn-cloudwatch-anomalydetector-singlemetricanomalydetector

stat

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html#cfn-cloudwatch-anomalydetector-stat