Class: AWSCDK::CloudWatch::CfnLogAlarm::ScheduleConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_watch/cfn_log_alarm.rb

Overview

The schedule configuration for the scheduled query.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(schedule_expression:, end_time_offset: nil, start_time_offset: nil) ⇒ ScheduleConfigurationProperty

Returns a new instance of ScheduleConfigurationProperty.

Parameters:

  • schedule_expression (String)

    The expression that defines when the scheduled query runs, e.g. rate(1 minute).

  • end_time_offset (Numeric, nil) (defaults to: nil)

    The number of seconds into the past to end the query window.

  • start_time_offset (Numeric, nil) (defaults to: nil)

    The number of seconds into the past to start the query window.



704
705
706
707
708
709
710
711
# File 'cloud_watch/cfn_log_alarm.rb', line 704

def initialize(schedule_expression:, end_time_offset: nil, start_time_offset: nil)
  @schedule_expression = schedule_expression
  Jsii::Type.check_type(@schedule_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scheduleExpression")
  @end_time_offset = end_time_offset
  Jsii::Type.check_type(@end_time_offset, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "endTimeOffset") unless @end_time_offset.nil?
  @start_time_offset = start_time_offset
  Jsii::Type.check_type(@start_time_offset, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "startTimeOffset") unless @start_time_offset.nil?
end

Instance Attribute Details

#end_time_offsetNumeric? (readonly)

The number of seconds into the past to end the query window.



722
723
724
# File 'cloud_watch/cfn_log_alarm.rb', line 722

def end_time_offset
  @end_time_offset
end

#schedule_expressionString (readonly)

The expression that defines when the scheduled query runs, e.g. rate(1 minute).



717
718
719
# File 'cloud_watch/cfn_log_alarm.rb', line 717

def schedule_expression
  @schedule_expression
end

#start_time_offsetNumeric? (readonly)

The number of seconds into the past to start the query window.



727
728
729
# File 'cloud_watch/cfn_log_alarm.rb', line 727

def start_time_offset
  @start_time_offset
end

Class Method Details

.jsii_propertiesObject



729
730
731
732
733
734
735
# File 'cloud_watch/cfn_log_alarm.rb', line 729

def self.jsii_properties
  {
    :schedule_expression => "scheduleExpression",
    :end_time_offset => "endTimeOffset",
    :start_time_offset => "startTimeOffset",
  }
end

Instance Method Details

#to_jsiiObject



737
738
739
740
741
742
743
744
745
# File 'cloud_watch/cfn_log_alarm.rb', line 737

def to_jsii
  result = {}
  result.merge!({
    "scheduleExpression" => @schedule_expression,
    "endTimeOffset" => @end_time_offset,
    "startTimeOffset" => @start_time_offset,
  })
  result.compact
end