# Copyright (c) 2012-2022, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
from . import AWSObject, AWSProperty, PropsDictType, Tags
from .validators import boolean, double, integer
from .validators.cloudwatch import (
dict_or_string,
validate_alarm,
validate_dashboard,
validate_treat_missing_data,
validate_unit,
)
[docs]class MetricDimension(AWSProperty):
"""
`MetricDimension <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-dimension.html>`__
"""
props: PropsDictType = {
"Name": (str, True),
"Value": (str, True),
}
[docs]class Metric(AWSProperty):
"""
`Metric <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-anomalydetector-metric.html>`__
"""
props: PropsDictType = {
"Dimensions": ([MetricDimension], False),
"MetricName": (str, True),
"Namespace": (str, True),
}
[docs]class MetricStat(AWSProperty):
"""
`MetricStat <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-anomalydetector-metricstat.html>`__
"""
props: PropsDictType = {
"Metric": (Metric, True),
"Period": (integer, True),
"Stat": (str, True),
"Unit": (validate_unit, False),
}
[docs]class MetricDataQuery(AWSProperty):
"""
`MetricDataQuery <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-anomalydetector-metricdataquery.html>`__
"""
props: PropsDictType = {
"AccountId": (str, False),
"Expression": (str, False),
"Id": (str, True),
"Label": (str, False),
"MetricStat": (MetricStat, False),
"Period": (integer, False),
"ReturnData": (boolean, False),
}
[docs]class Alarm(AWSObject):
"""
`Alarm <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-alarm.html>`__
"""
resource_type = "AWS::CloudWatch::Alarm"
props: PropsDictType = {
"ActionsEnabled": (boolean, False),
"AlarmActions": ([str], False),
"AlarmDescription": (str, False),
"AlarmName": (str, False),
"ComparisonOperator": (str, True),
"DatapointsToAlarm": (integer, False),
"Dimensions": ([MetricDimension], False),
"EvaluateLowSampleCountPercentile": (str, False),
"EvaluationPeriods": (integer, True),
"ExtendedStatistic": (str, False),
"InsufficientDataActions": ([str], False),
"MetricName": (str, False),
"Metrics": ([MetricDataQuery], False),
"Namespace": (str, False),
"OKActions": ([str], False),
"Period": (integer, False),
"Statistic": (str, False),
"Threshold": (double, False),
"ThresholdMetricId": (str, False),
"TreatMissingData": (validate_treat_missing_data, False),
"Unit": (str, False),
}
[docs] def validate(self):
validate_alarm(self)
[docs]class Range(AWSProperty):
"""
`Range <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-anomalydetector-range.html>`__
"""
props: PropsDictType = {
"EndTime": (str, True),
"StartTime": (str, True),
}
[docs]class Configuration(AWSProperty):
"""
`Configuration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-anomalydetector-configuration.html>`__
"""
props: PropsDictType = {
"ExcludedTimeRanges": ([Range], False),
"MetricTimeZone": (str, False),
}
[docs]class MetricMathAnomalyDetector(AWSProperty):
"""
`MetricMathAnomalyDetector <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-anomalydetector-metricmathanomalydetector.html>`__
"""
props: PropsDictType = {
"MetricDataQueries": ([MetricDataQuery], False),
}
[docs]class SingleMetricAnomalyDetector(AWSProperty):
"""
`SingleMetricAnomalyDetector <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-anomalydetector-singlemetricanomalydetector.html>`__
"""
props: PropsDictType = {
"AccountId": (str, False),
"Dimensions": ([MetricDimension], False),
"MetricName": (str, False),
"Namespace": (str, False),
"Stat": (str, False),
}
[docs]class AnomalyDetector(AWSObject):
"""
`AnomalyDetector <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-anomalydetector.html>`__
"""
resource_type = "AWS::CloudWatch::AnomalyDetector"
props: PropsDictType = {
"Configuration": (Configuration, False),
"Dimensions": ([MetricDimension], False),
"MetricMathAnomalyDetector": (MetricMathAnomalyDetector, False),
"MetricName": (str, False),
"Namespace": (str, False),
"SingleMetricAnomalyDetector": (SingleMetricAnomalyDetector, False),
"Stat": (str, False),
}
[docs]class CompositeAlarm(AWSObject):
"""
`CompositeAlarm <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-compositealarm.html>`__
"""
resource_type = "AWS::CloudWatch::CompositeAlarm"
props: PropsDictType = {
"ActionsEnabled": (boolean, False),
"ActionsSuppressor": (str, False),
"ActionsSuppressorExtensionPeriod": (integer, False),
"ActionsSuppressorWaitPeriod": (integer, False),
"AlarmActions": ([str], False),
"AlarmDescription": (str, False),
"AlarmName": (str, False),
"AlarmRule": (str, True),
"InsufficientDataActions": ([str], False),
"OKActions": ([str], False),
}
[docs]class Dashboard(AWSObject):
"""
`Dashboard <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-dashboard.html>`__
"""
resource_type = "AWS::CloudWatch::Dashboard"
props: PropsDictType = {
"DashboardBody": (dict_or_string, True),
"DashboardName": (str, False),
}
[docs] def validate(self):
validate_dashboard(self)
[docs]class InsightRule(AWSObject):
"""
`InsightRule <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-insightrule.html>`__
"""
resource_type = "AWS::CloudWatch::InsightRule"
props: PropsDictType = {
"RuleBody": (str, True),
"RuleName": (str, True),
"RuleState": (str, True),
"Tags": (Tags, False),
}
[docs]class MetricStreamFilter(AWSProperty):
"""
`MetricStreamFilter <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamfilter.html>`__
"""
props: PropsDictType = {
"MetricNames": ([str], False),
"Namespace": (str, True),
}
[docs]class MetricStreamStatisticsMetric(AWSProperty):
"""
`MetricStreamStatisticsMetric <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamstatisticsmetric.html>`__
"""
props: PropsDictType = {
"MetricName": (str, True),
"Namespace": (str, True),
}
[docs]class MetricStreamStatisticsConfiguration(AWSProperty):
"""
`MetricStreamStatisticsConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-metricstream-metricstreamstatisticsconfiguration.html>`__
"""
props: PropsDictType = {
"AdditionalStatistics": ([str], True),
"IncludeMetrics": ([MetricStreamStatisticsMetric], True),
}
[docs]class MetricStream(AWSObject):
"""
`MetricStream <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html>`__
"""
resource_type = "AWS::CloudWatch::MetricStream"
props: PropsDictType = {
"ExcludeFilters": ([MetricStreamFilter], False),
"FirehoseArn": (str, True),
"IncludeFilters": ([MetricStreamFilter], False),
"IncludeLinkedAccountsMetrics": (boolean, False),
"Name": (str, False),
"OutputFormat": (str, True),
"RoleArn": (str, True),
"StatisticsConfigurations": ([MetricStreamStatisticsConfiguration], False),
"Tags": (Tags, False),
}