Class: AWSCDK::APS::CfnAnomalyDetectorProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
aps/cfn_anomaly_detector_props.rb

Overview

Properties for defining a CfnAnomalyDetector.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_alias:, configuration:, workspace:, evaluation_interval_in_seconds: nil, labels: nil, missing_data_action: nil, tags: nil) ⇒ CfnAnomalyDetectorProps

Returns a new instance of CfnAnomalyDetectorProps.

Parameters:



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'aps/cfn_anomaly_detector_props.rb', line 16

def initialize(_alias:, configuration:, workspace:, evaluation_interval_in_seconds: nil, labels: nil, missing_data_action: nil, tags: nil)
  @_alias = _alias
  Jsii::Type.check_type(@_alias, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alias")
  @configuration = configuration.is_a?(Hash) ? ::AWSCDK::APS::CfnAnomalyDetector::AnomalyDetectorConfigurationProperty.new(**configuration.transform_keys(&:to_sym)) : configuration
  Jsii::Type.check_type(@configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuQW5vbWFseURldGVjdG9yLkFub21hbHlEZXRlY3RvckNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "configuration")
  @workspace = workspace
  Jsii::Type.check_type(@workspace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "workspace")
  @evaluation_interval_in_seconds = evaluation_interval_in_seconds
  Jsii::Type.check_type(@evaluation_interval_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "evaluationIntervalInSeconds") unless @evaluation_interval_in_seconds.nil?
  @labels = labels
  Jsii::Type.check_type(@labels, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBzLkNmbkFub21hbHlEZXRlY3Rvci5MYWJlbFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "labels") unless @labels.nil?
  @missing_data_action = missing_data_action.is_a?(Hash) ? ::AWSCDK::APS::CfnAnomalyDetector::MissingDataActionProperty.new(**missing_data_action.transform_keys(&:to_sym)) : missing_data_action
  Jsii::Type.check_type(@missing_data_action, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuQW5vbWFseURldGVjdG9yLk1pc3NpbmdEYXRhQWN0aW9uUHJvcGVydHkifV19fQ==")), "missingDataAction") unless @missing_data_action.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#_aliasString (readonly)

The user-friendly name of the anomaly detector.



37
38
39
# File 'aps/cfn_anomaly_detector_props.rb', line 37

def _alias
  @_alias
end

#configurationAWSCDK::IResolvable, AWSCDK::APS::CfnAnomalyDetector::AnomalyDetectorConfigurationProperty (readonly)

The algorithm configuration of the anomaly detector.



42
43
44
# File 'aps/cfn_anomaly_detector_props.rb', line 42

def configuration
  @configuration
end

#evaluation_interval_in_secondsNumeric? (readonly)

Note:

Default: - 60

The frequency, in seconds, at which the anomaly detector evaluates metrics.



53
54
55
# File 'aps/cfn_anomaly_detector_props.rb', line 53

def evaluation_interval_in_seconds
  @evaluation_interval_in_seconds
end

#labelsAWSCDK::IResolvable, ... (readonly)

The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.



58
59
60
# File 'aps/cfn_anomaly_detector_props.rb', line 58

def labels
  @labels
end

#missing_data_actionAWSCDK::IResolvable, ... (readonly)

The action taken when data is missing during evaluation.



63
64
65
# File 'aps/cfn_anomaly_detector_props.rb', line 63

def missing_data_action
  @missing_data_action
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tags applied to the anomaly detector.



68
69
70
# File 'aps/cfn_anomaly_detector_props.rb', line 68

def tags
  @tags
end

#workspaceString (readonly)

An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.



47
48
49
# File 'aps/cfn_anomaly_detector_props.rb', line 47

def workspace
  @workspace
end

Class Method Details

.jsii_propertiesObject



70
71
72
73
74
75
76
77
78
79
80
# File 'aps/cfn_anomaly_detector_props.rb', line 70

def self.jsii_properties
  {
    :_alias => "alias",
    :configuration => "configuration",
    :workspace => "workspace",
    :evaluation_interval_in_seconds => "evaluationIntervalInSeconds",
    :labels => "labels",
    :missing_data_action => "missingDataAction",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'aps/cfn_anomaly_detector_props.rb', line 82

def to_jsii
  result = {}
  result.merge!({
    "alias" => @_alias,
    "configuration" => @configuration,
    "workspace" => @workspace,
    "evaluationIntervalInSeconds" => @evaluation_interval_in_seconds,
    "labels" => @labels,
    "missingDataAction" => @missing_data_action,
    "tags" => @tags,
  })
  result.compact
end