Class: AWSCDK::IoTEvents::CfnDetectorModel::SetTimerProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_events/cfn_detector_model.rb

Overview

Information needed to set the timer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(timer_name:, duration_expression: nil, seconds: nil) ⇒ SetTimerProperty

Returns a new instance of SetTimerProperty.

Parameters:

  • timer_name (String)

    The name of the timer.

  • duration_expression (String, nil) (defaults to: nil)

    The duration of the timer, in seconds.

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

    The number of seconds until the timer expires.



1823
1824
1825
1826
1827
1828
1829
1830
# File 'io_t_events/cfn_detector_model.rb', line 1823

def initialize(timer_name:, duration_expression: nil, seconds: nil)
  @timer_name = timer_name
  Jsii::Type.check_type(@timer_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timerName")
  @duration_expression = duration_expression
  Jsii::Type.check_type(@duration_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "durationExpression") unless @duration_expression.nil?
  @seconds = seconds
  Jsii::Type.check_type(@seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "seconds") unless @seconds.nil?
end

Instance Attribute Details

#duration_expressionString? (readonly)

The duration of the timer, in seconds.

You can use a string expression that includes numbers, variables ( $variable.<variable-name> ), and input values ( $input.<input-name>.<path-to-datum> ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.



1843
1844
1845
# File 'io_t_events/cfn_detector_model.rb', line 1843

def duration_expression
  @duration_expression
end

#secondsNumeric? (readonly)

The number of seconds until the timer expires.

The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.



1850
1851
1852
# File 'io_t_events/cfn_detector_model.rb', line 1850

def seconds
  @seconds
end

#timer_nameString (readonly)

The name of the timer.



1836
1837
1838
# File 'io_t_events/cfn_detector_model.rb', line 1836

def timer_name
  @timer_name
end

Class Method Details

.jsii_propertiesObject



1852
1853
1854
1855
1856
1857
1858
# File 'io_t_events/cfn_detector_model.rb', line 1852

def self.jsii_properties
  {
    :timer_name => "timerName",
    :duration_expression => "durationExpression",
    :seconds => "seconds",
  }
end

Instance Method Details

#to_jsiiObject



1860
1861
1862
1863
1864
1865
1866
1867
1868
# File 'io_t_events/cfn_detector_model.rb', line 1860

def to_jsii
  result = {}
  result.merge!({
    "timerName" => @timer_name,
    "durationExpression" => @duration_expression,
    "seconds" => @seconds,
  })
  result.compact
end