Class: AWSCDK::CloudWatch::CfnAlarm::AlarmPromQLCriteriaProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::CfnAlarm::AlarmPromQLCriteriaProperty
- Defined in:
- cloud_watch/cfn_alarm.rb
Overview
Contains the configuration that determines how a PromQL alarm evaluates its contributors, including the query to run and the durations that define when contributors transition between states.
Instance Attribute Summary collapse
-
#pending_period ⇒ Numeric?
readonly
The duration, in seconds, that a contributor must be continuously breaching before it transitions to the
ALARMstate. -
#query ⇒ String?
readonly
The PromQL query that the alarm evaluates.
-
#recovery_period ⇒ Numeric?
readonly
The duration, in seconds, that a contributor must continuously not be breaching before it transitions back to the
OKstate.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pending_period: nil, query: nil, recovery_period: nil) ⇒ AlarmPromQLCriteriaProperty
constructor
A new instance of AlarmPromQLCriteriaProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(pending_period: nil, query: nil, recovery_period: nil) ⇒ AlarmPromQLCriteriaProperty
Returns a new instance of AlarmPromQLCriteriaProperty.
853 854 855 856 857 858 859 860 |
# File 'cloud_watch/cfn_alarm.rb', line 853 def initialize(pending_period: nil, query: nil, recovery_period: nil) @pending_period = pending_period Jsii::Type.check_type(@pending_period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "pendingPeriod") unless @pending_period.nil? @query = query Jsii::Type.check_type(@query, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "query") unless @query.nil? @recovery_period = recovery_period Jsii::Type.check_type(@recovery_period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "recoveryPeriod") unless @recovery_period.nil? end |
Instance Attribute Details
#pending_period ⇒ Numeric? (readonly)
The duration, in seconds, that a contributor must be continuously breaching before it transitions to the ALARM state.
866 867 868 |
# File 'cloud_watch/cfn_alarm.rb', line 866 def pending_period @pending_period end |
#query ⇒ String? (readonly)
The PromQL query that the alarm evaluates.
The query must return a result of vector type. Each entry in the vector result represents an alarm contributor.
873 874 875 |
# File 'cloud_watch/cfn_alarm.rb', line 873 def query @query end |
#recovery_period ⇒ Numeric? (readonly)
The duration, in seconds, that a contributor must continuously not be breaching before it transitions back to the OK state.
878 879 880 |
# File 'cloud_watch/cfn_alarm.rb', line 878 def recovery_period @recovery_period end |
Class Method Details
.jsii_properties ⇒ Object
880 881 882 883 884 885 886 |
# File 'cloud_watch/cfn_alarm.rb', line 880 def self.jsii_properties { :pending_period => "pendingPeriod", :query => "query", :recovery_period => "recoveryPeriod", } end |
Instance Method Details
#to_jsii ⇒ Object
888 889 890 891 892 893 894 895 896 |
# File 'cloud_watch/cfn_alarm.rb', line 888 def to_jsii result = {} result.merge!({ "pendingPeriod" => @pending_period, "query" => @query, "recoveryPeriod" => @recovery_period, }) result.compact end |