Class: AWSCDK::APS::CfnAnomalyDetector::RandomCutForestConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APS::CfnAnomalyDetector::RandomCutForestConfigurationProperty
- Defined in:
- aps/cfn_anomaly_detector.rb
Overview
Configuration for the Random Cut Forest algorithm used for anomaly detection in time-series data.
Instance Attribute Summary collapse
-
#ignore_near_expected_from_above ⇒ AWSCDK::IResolvable, ...
readonly
Configuration for ignoring values that are near expected values from above during anomaly detection.
-
#ignore_near_expected_from_below ⇒ AWSCDK::IResolvable, ...
readonly
Configuration for ignoring values that are near expected values from below during anomaly detection.
-
#query ⇒ String
readonly
The Prometheus query used to retrieve the time-series data for anomaly detection.
-
#sample_size ⇒ Numeric?
readonly
The number of data points sampled from the input stream for the Random Cut Forest algorithm.
-
#shingle_size ⇒ Numeric?
readonly
The number of consecutive data points used to create a shingle for the Random Cut Forest algorithm.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(query:, ignore_near_expected_from_above: nil, ignore_near_expected_from_below: nil, sample_size: nil, shingle_size: nil) ⇒ RandomCutForestConfigurationProperty
constructor
A new instance of RandomCutForestConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(query:, ignore_near_expected_from_above: nil, ignore_near_expected_from_below: nil, sample_size: nil, shingle_size: nil) ⇒ RandomCutForestConfigurationProperty
Returns a new instance of RandomCutForestConfigurationProperty.
765 766 767 768 769 770 771 772 773 774 775 776 |
# File 'aps/cfn_anomaly_detector.rb', line 765 def initialize(query:, ignore_near_expected_from_above: nil, ignore_near_expected_from_below: nil, sample_size: nil, shingle_size: nil) @query = query Jsii::Type.check_type(@query, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "query") @ignore_near_expected_from_above = ignore_near_expected_from_above.is_a?(Hash) ? ::AWSCDK::APS::CfnAnomalyDetector::IgnoreNearExpectedProperty.new(**ignore_near_expected_from_above.transform_keys(&:to_sym)) : ignore_near_expected_from_above Jsii::Type.check_type(@ignore_near_expected_from_above, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuQW5vbWFseURldGVjdG9yLklnbm9yZU5lYXJFeHBlY3RlZFByb3BlcnR5In1dfX0=")), "ignoreNearExpectedFromAbove") unless @ignore_near_expected_from_above.nil? @ignore_near_expected_from_below = ignore_near_expected_from_below.is_a?(Hash) ? ::AWSCDK::APS::CfnAnomalyDetector::IgnoreNearExpectedProperty.new(**ignore_near_expected_from_below.transform_keys(&:to_sym)) : ignore_near_expected_from_below Jsii::Type.check_type(@ignore_near_expected_from_below, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuQW5vbWFseURldGVjdG9yLklnbm9yZU5lYXJFeHBlY3RlZFByb3BlcnR5In1dfX0=")), "ignoreNearExpectedFromBelow") unless @ignore_near_expected_from_below.nil? @sample_size = sample_size Jsii::Type.check_type(@sample_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "sampleSize") unless @sample_size.nil? @shingle_size = shingle_size Jsii::Type.check_type(@shingle_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "shingleSize") unless @shingle_size.nil? end |
Instance Attribute Details
#ignore_near_expected_from_above ⇒ AWSCDK::IResolvable, ... (readonly)
Configuration for ignoring values that are near expected values from above during anomaly detection.
791 792 793 |
# File 'aps/cfn_anomaly_detector.rb', line 791 def ignore_near_expected_from_above @ignore_near_expected_from_above end |
#ignore_near_expected_from_below ⇒ AWSCDK::IResolvable, ... (readonly)
Configuration for ignoring values that are near expected values from below during anomaly detection.
796 797 798 |
# File 'aps/cfn_anomaly_detector.rb', line 796 def ignore_near_expected_from_below @ignore_near_expected_from_below end |
#query ⇒ String (readonly)
The Prometheus query used to retrieve the time-series data for anomaly detection.
Random Cut Forest queries must be wrapped by a supported PromQL aggregation operator. For more information, see Aggregation operators on the Prometheus docs website.
Supported PromQL aggregation operators :
avg,count,group,max,min,quantile,stddev,stdvar, andsum.
786 787 788 |
# File 'aps/cfn_anomaly_detector.rb', line 786 def query @query end |
#sample_size ⇒ Numeric? (readonly)
Default: - 256
The number of data points sampled from the input stream for the Random Cut Forest algorithm.
The default number is 256 consecutive data points.
804 805 806 |
# File 'aps/cfn_anomaly_detector.rb', line 804 def sample_size @sample_size end |
#shingle_size ⇒ Numeric? (readonly)
Default: - 8
The number of consecutive data points used to create a shingle for the Random Cut Forest algorithm.
The default number is 8 consecutive data points.
812 813 814 |
# File 'aps/cfn_anomaly_detector.rb', line 812 def shingle_size @shingle_size end |
Class Method Details
.jsii_properties ⇒ Object
814 815 816 817 818 819 820 821 822 |
# File 'aps/cfn_anomaly_detector.rb', line 814 def self.jsii_properties { :query => "query", :ignore_near_expected_from_above => "ignoreNearExpectedFromAbove", :ignore_near_expected_from_below => "ignoreNearExpectedFromBelow", :sample_size => "sampleSize", :shingle_size => "shingleSize", } end |
Instance Method Details
#to_jsii ⇒ Object
824 825 826 827 828 829 830 831 832 833 834 |
# File 'aps/cfn_anomaly_detector.rb', line 824 def to_jsii result = {} result.merge!({ "query" => @query, "ignoreNearExpectedFromAbove" => @ignore_near_expected_from_above, "ignoreNearExpectedFromBelow" => @ignore_near_expected_from_below, "sampleSize" => @sample_size, "shingleSize" => @shingle_size, }) result.compact end |