Class: AWSCDK::CloudWatch::CfnAnomalyDetectorProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::CfnAnomalyDetectorProps
- Defined in:
- cloud_watch/cfn_anomaly_detector_props.rb
Overview
Properties for defining a CfnAnomalyDetector.
Instance Attribute Summary collapse
-
#configuration ⇒ AWSCDK::IResolvable, ...
readonly
Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model.
-
#dimensions ⇒ AWSCDK::IResolvable, ...
readonly
The dimensions of the metric associated with the anomaly detection band.
-
#metric_characteristics ⇒ AWSCDK::IResolvable, ...
readonly
Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models.
-
#metric_math_anomaly_detector ⇒ AWSCDK::IResolvable, ...
readonly
The CloudWatch metric math expression for this anomaly detector.
-
#metric_name ⇒ String?
readonly
The name of the metric associated with the anomaly detection band.
-
#namespace ⇒ String?
readonly
The namespace of the metric associated with the anomaly detection band.
-
#single_metric_anomaly_detector ⇒ AWSCDK::IResolvable, ...
readonly
The CloudWatch metric and statistic for this anomaly detector.
-
#stat ⇒ String?
readonly
The statistic of the metric associated with the anomaly detection band.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(configuration: nil, dimensions: nil, metric_characteristics: nil, metric_math_anomaly_detector: nil, metric_name: nil, namespace: nil, single_metric_anomaly_detector: nil, stat: nil) ⇒ CfnAnomalyDetectorProps
constructor
A new instance of CfnAnomalyDetectorProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(configuration: nil, dimensions: nil, metric_characteristics: nil, metric_math_anomaly_detector: nil, metric_name: nil, namespace: nil, single_metric_anomaly_detector: nil, stat: nil) ⇒ CfnAnomalyDetectorProps
Returns a new instance of CfnAnomalyDetectorProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 17 def initialize(configuration: nil, dimensions: nil, metric_characteristics: nil, metric_math_anomaly_detector: nil, metric_name: nil, namespace: nil, single_metric_anomaly_detector: nil, stat: nil) @configuration = configuration.is_a?(Hash) ? ::AWSCDK::CloudWatch::CfnAnomalyDetector::ConfigurationProperty.new(**configuration.transform_keys(&:to_sym)) : configuration Jsii::Type.check_type(@configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHdhdGNoLkNmbkFub21hbHlEZXRlY3Rvci5Db25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "configuration") unless @configuration.nil? @dimensions = dimensions Jsii::Type.check_type(@dimensions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5DZm5Bbm9tYWx5RGV0ZWN0b3IuRGltZW5zaW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "dimensions") unless @dimensions.nil? @metric_characteristics = metric_characteristics.is_a?(Hash) ? ::AWSCDK::CloudWatch::CfnAnomalyDetector::MetricCharacteristicsProperty.new(**metric_characteristics.transform_keys(&:to_sym)) : metric_characteristics Jsii::Type.check_type(@metric_characteristics, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHdhdGNoLkNmbkFub21hbHlEZXRlY3Rvci5NZXRyaWNDaGFyYWN0ZXJpc3RpY3NQcm9wZXJ0eSJ9XX19")), "metricCharacteristics") unless @metric_characteristics.nil? @metric_math_anomaly_detector = metric_math_anomaly_detector.is_a?(Hash) ? ::AWSCDK::CloudWatch::CfnAnomalyDetector::MetricMathAnomalyDetectorProperty.new(**metric_math_anomaly_detector.transform_keys(&:to_sym)) : metric_math_anomaly_detector Jsii::Type.check_type(@metric_math_anomaly_detector, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHdhdGNoLkNmbkFub21hbHlEZXRlY3Rvci5NZXRyaWNNYXRoQW5vbWFseURldGVjdG9yUHJvcGVydHkifV19fQ==")), "metricMathAnomalyDetector") unless @metric_math_anomaly_detector.nil? @metric_name = metric_name Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") unless @metric_name.nil? @namespace = namespace Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") unless @namespace.nil? @single_metric_anomaly_detector = single_metric_anomaly_detector.is_a?(Hash) ? ::AWSCDK::CloudWatch::CfnAnomalyDetector::SingleMetricAnomalyDetectorProperty.new(**single_metric_anomaly_detector.transform_keys(&:to_sym)) : single_metric_anomaly_detector Jsii::Type.check_type(@single_metric_anomaly_detector, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHdhdGNoLkNmbkFub21hbHlEZXRlY3Rvci5TaW5nbGVNZXRyaWNBbm9tYWx5RGV0ZWN0b3JQcm9wZXJ0eSJ9XX19")), "singleMetricAnomalyDetector") unless @single_metric_anomaly_detector.nil? @stat = stat Jsii::Type.check_type(@stat, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stat") unless @stat.nil? end |
Instance Attribute Details
#configuration ⇒ AWSCDK::IResolvable, ... (readonly)
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.
42 43 44 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 42 def configuration @configuration end |
#dimensions ⇒ AWSCDK::IResolvable, ... (readonly)
The dimensions of the metric associated with the anomaly detection band.
47 48 49 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 47 def dimensions @dimensions end |
#metric_characteristics ⇒ AWSCDK::IResolvable, ... (readonly)
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.
54 55 56 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 54 def metric_characteristics @metric_characteristics end |
#metric_math_anomaly_detector ⇒ AWSCDK::IResolvable, ... (readonly)
The CloudWatch metric math expression for this anomaly detector.
59 60 61 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 59 def metric_math_anomaly_detector @metric_math_anomaly_detector end |
#metric_name ⇒ String? (readonly)
The name of the metric associated with the anomaly detection band.
64 65 66 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 64 def metric_name @metric_name end |
#namespace ⇒ String? (readonly)
The namespace of the metric associated with the anomaly detection band.
69 70 71 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 69 def namespace @namespace end |
#single_metric_anomaly_detector ⇒ AWSCDK::IResolvable, ... (readonly)
The CloudWatch metric and statistic for this anomaly detector.
74 75 76 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 74 def single_metric_anomaly_detector @single_metric_anomaly_detector end |
#stat ⇒ String? (readonly)
The statistic of the metric associated with the anomaly detection band.
79 80 81 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 79 def stat @stat end |
Class Method Details
.jsii_properties ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 81 def self.jsii_properties { :configuration => "configuration", :dimensions => "dimensions", :metric_characteristics => "metricCharacteristics", :metric_math_anomaly_detector => "metricMathAnomalyDetector", :metric_name => "metricName", :namespace => "namespace", :single_metric_anomaly_detector => "singleMetricAnomalyDetector", :stat => "stat", } end |
Instance Method Details
#to_jsii ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'cloud_watch/cfn_anomaly_detector_props.rb', line 94 def to_jsii result = {} result.merge!({ "configuration" => @configuration, "dimensions" => @dimensions, "metricCharacteristics" => @metric_characteristics, "metricMathAnomalyDetector" => @metric_math_anomaly_detector, "metricName" => @metric_name, "namespace" => @namespace, "singleMetricAnomalyDetector" => @single_metric_anomaly_detector, "stat" => @stat, }) result.compact end |