Class: AWSCDK::LookoutMetrics::CfnAlertProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::LookoutMetrics::CfnAlertProps
- Defined in:
- lookout_metrics/cfn_alert_props.rb
Overview
Properties for defining a CfnAlert.
Instance Attribute Summary collapse
-
#action ⇒ AWSCDK::IResolvable, AWSCDK::LookoutMetrics::CfnAlert::ActionProperty
readonly
Action that will be triggered when there is an alert.
-
#alert_description ⇒ String?
readonly
A description of the alert.
-
#alert_name ⇒ String?
readonly
The name of the alert.
-
#alert_sensitivity_threshold ⇒ Numeric
readonly
An integer from 0 to 100 specifying the alert sensitivity threshold.
-
#anomaly_detector_arn ⇒ String
readonly
The ARN of the detector to which the alert is attached.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action:, alert_sensitivity_threshold:, anomaly_detector_arn:, alert_description: nil, alert_name: nil) ⇒ CfnAlertProps
constructor
A new instance of CfnAlertProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action:, alert_sensitivity_threshold:, anomaly_detector_arn:, alert_description: nil, alert_name: nil) ⇒ CfnAlertProps
Returns a new instance of CfnAlertProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lookout_metrics/cfn_alert_props.rb', line 14 def initialize(action:, alert_sensitivity_threshold:, anomaly_detector_arn:, alert_description: nil, alert_name: nil) @action = action.is_a?(Hash) ? ::AWSCDK::LookoutMetrics::CfnAlert::ActionProperty.new(**action.transform_keys(&:to_sym)) : action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sb29rb3V0bWV0cmljcy5DZm5BbGVydC5BY3Rpb25Qcm9wZXJ0eSJ9XX19")), "action") @alert_sensitivity_threshold = alert_sensitivity_threshold Jsii::Type.check_type(@alert_sensitivity_threshold, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "alertSensitivityThreshold") @anomaly_detector_arn = anomaly_detector_arn Jsii::Type.check_type(@anomaly_detector_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "anomalyDetectorArn") @alert_description = alert_description Jsii::Type.check_type(@alert_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alertDescription") unless @alert_description.nil? @alert_name = alert_name Jsii::Type.check_type(@alert_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alertName") unless @alert_name.nil? end |
Instance Attribute Details
#action ⇒ AWSCDK::IResolvable, AWSCDK::LookoutMetrics::CfnAlert::ActionProperty (readonly)
Action that will be triggered when there is an alert.
31 32 33 |
# File 'lookout_metrics/cfn_alert_props.rb', line 31 def action @action end |
#alert_description ⇒ String? (readonly)
A description of the alert.
46 47 48 |
# File 'lookout_metrics/cfn_alert_props.rb', line 46 def alert_description @alert_description end |
#alert_name ⇒ String? (readonly)
The name of the alert.
51 52 53 |
# File 'lookout_metrics/cfn_alert_props.rb', line 51 def alert_name @alert_name end |
#alert_sensitivity_threshold ⇒ Numeric (readonly)
An integer from 0 to 100 specifying the alert sensitivity threshold.
36 37 38 |
# File 'lookout_metrics/cfn_alert_props.rb', line 36 def alert_sensitivity_threshold @alert_sensitivity_threshold end |
#anomaly_detector_arn ⇒ String (readonly)
The ARN of the detector to which the alert is attached.
41 42 43 |
# File 'lookout_metrics/cfn_alert_props.rb', line 41 def anomaly_detector_arn @anomaly_detector_arn end |
Class Method Details
.jsii_properties ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'lookout_metrics/cfn_alert_props.rb', line 53 def self.jsii_properties { :action => "action", :alert_sensitivity_threshold => "alertSensitivityThreshold", :anomaly_detector_arn => "anomalyDetectorArn", :alert_description => "alertDescription", :alert_name => "alertName", } end |
Instance Method Details
#to_jsii ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lookout_metrics/cfn_alert_props.rb', line 63 def to_jsii result = {} result.merge!({ "action" => @action, "alertSensitivityThreshold" => @alert_sensitivity_threshold, "anomalyDetectorArn" => @anomaly_detector_arn, "alertDescription" => @alert_description, "alertName" => @alert_name, }) result.compact end |