Class: AWSCDK::CloudWatch::CfnAnomalyDetector::ConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::CfnAnomalyDetector::ConfigurationProperty
- Defined in:
- cloud_watch/cfn_anomaly_detector.rb
Overview
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.
Instance Attribute Summary collapse
-
#excluded_time_ranges ⇒ AWSCDK::IResolvable, ...
readonly
Specifies an array of time ranges to exclude from use when the anomaly detection model is trained and updated.
-
#metric_time_zone ⇒ String?
readonly
The time zone to use for the metric.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(excluded_time_ranges: nil, metric_time_zone: nil) ⇒ ConfigurationProperty
constructor
A new instance of ConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(excluded_time_ranges: nil, metric_time_zone: nil) ⇒ ConfigurationProperty
Returns a new instance of ConfigurationProperty.
600 601 602 603 604 605 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 600 def initialize(excluded_time_ranges: nil, metric_time_zone: nil) @excluded_time_ranges = excluded_time_ranges Jsii::Type.check_type(@excluded_time_ranges, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5DZm5Bbm9tYWx5RGV0ZWN0b3IuUmFuZ2VQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "excludedTimeRanges") unless @excluded_time_ranges.nil? @metric_time_zone = metric_time_zone Jsii::Type.check_type(@metric_time_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricTimeZone") unless @metric_time_zone.nil? end |
Instance Attribute Details
#excluded_time_ranges ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies an array of time ranges to exclude from use when the anomaly detection model is trained and updated.
Use this to make sure that events that could cause unusual values for the metric, such as deployments, aren't used when CloudWatch creates or updates the model.
613 614 615 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 613 def excluded_time_ranges @excluded_time_ranges end |
#metric_time_zone ⇒ String? (readonly)
The time zone to use for the metric.
This is useful to enable the model to automatically account for daylight savings time changes if the metric is sensitive to such time changes.
To specify a time zone, use the name of the time zone as specified in the standard tz database. For more information, see tz database .
622 623 624 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 622 def metric_time_zone @metric_time_zone end |
Class Method Details
.jsii_properties ⇒ Object
624 625 626 627 628 629 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 624 def self.jsii_properties { :excluded_time_ranges => "excludedTimeRanges", :metric_time_zone => "metricTimeZone", } end |
Instance Method Details
#to_jsii ⇒ Object
631 632 633 634 635 636 637 638 |
# File 'cloud_watch/cfn_anomaly_detector.rb', line 631 def to_jsii result = {} result.merge!({ "excludedTimeRanges" => @excluded_time_ranges, "metricTimeZone" => @metric_time_zone, }) result.compact end |