Class: AWSCDK::IoTEvents::CfnDetectorModel::SetTimerProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnDetectorModel::SetTimerProperty
- Defined in:
- io_t_events/cfn_detector_model.rb
Overview
Information needed to set the timer.
Instance Attribute Summary collapse
-
#duration_expression ⇒ String?
readonly
The duration of the timer, in seconds.
-
#seconds ⇒ Numeric?
readonly
The number of seconds until the timer expires.
-
#timer_name ⇒ String
readonly
The name of the timer.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(timer_name:, duration_expression: nil, seconds: nil) ⇒ SetTimerProperty
constructor
A new instance of SetTimerProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(timer_name:, duration_expression: nil, seconds: nil) ⇒ SetTimerProperty
Returns a new instance of SetTimerProperty.
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_expression ⇒ String? (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 |
#seconds ⇒ Numeric? (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_name ⇒ String (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_properties ⇒ Object
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_jsii ⇒ Object
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 |