Class: AWSCDK::CustomResources::WaiterStateMachineProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CustomResources::WaiterStateMachineProps
- Defined in:
- custom_resources/waiter_state_machine_props.rb
Overview
Initialization properties for the WaiterStateMachine construct.
Instance Attribute Summary collapse
-
#backoff_rate ⇒ Numeric
readonly
Backoff between attempts.
-
#disable_logging ⇒ Boolean?
readonly
Whether logging for the state machine is disabled.
-
#interval ⇒ AWSCDK::Duration
readonly
The interval to wait between attempts.
-
#is_complete_handler ⇒ AWSCDK::Lambda::IFunction
readonly
The main handler that notifies if the waiter to decide 'complete' or 'incomplete'.
-
#log_options ⇒ AWSCDK::CustomResources::LogOptions?
readonly
Defines what execution history events are logged and where they are logged.
-
#max_attempts ⇒ Numeric
readonly
Number of attempts.
-
#timeout_handler ⇒ AWSCDK::Lambda::IFunction
readonly
The handler to call if the waiter times out and is incomplete.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(backoff_rate:, interval:, is_complete_handler:, max_attempts:, timeout_handler:, disable_logging: nil, log_options: nil) ⇒ WaiterStateMachineProps
constructor
A new instance of WaiterStateMachineProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(backoff_rate:, interval:, is_complete_handler:, max_attempts:, timeout_handler:, disable_logging: nil, log_options: nil) ⇒ WaiterStateMachineProps
Returns a new instance of WaiterStateMachineProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'custom_resources/waiter_state_machine_props.rb', line 14 def initialize(backoff_rate:, interval:, is_complete_handler:, max_attempts:, timeout_handler:, disable_logging: nil, log_options: nil) @backoff_rate = backoff_rate Jsii::Type.check_type(@backoff_rate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "backoffRate") @interval = interval Jsii::Type.check_type(@interval, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "interval") @is_complete_handler = is_complete_handler Jsii::Type.check_type(@is_complete_handler, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "isCompleteHandler") @max_attempts = max_attempts Jsii::Type.check_type(@max_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxAttempts") @timeout_handler = timeout_handler Jsii::Type.check_type(@timeout_handler, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "timeoutHandler") @disable_logging = disable_logging Jsii::Type.check_type(@disable_logging, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "disableLogging") unless @disable_logging.nil? @log_options = .is_a?(Hash) ? ::AWSCDK::CustomResources::LogOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@log_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jdXN0b21fcmVzb3VyY2VzLkxvZ09wdGlvbnMifQ==")), "logOptions") unless @log_options.nil? end |
Instance Attribute Details
#backoff_rate ⇒ Numeric (readonly)
Backoff between attempts.
34 35 36 |
# File 'custom_resources/waiter_state_machine_props.rb', line 34 def backoff_rate @backoff_rate end |
#disable_logging ⇒ Boolean? (readonly)
Default: - false
Whether logging for the state machine is disabled.
55 56 57 |
# File 'custom_resources/waiter_state_machine_props.rb', line 55 def disable_logging @disable_logging end |
#interval ⇒ AWSCDK::Duration (readonly)
The interval to wait between attempts.
38 39 40 |
# File 'custom_resources/waiter_state_machine_props.rb', line 38 def interval @interval end |
#is_complete_handler ⇒ AWSCDK::Lambda::IFunction (readonly)
The main handler that notifies if the waiter to decide 'complete' or 'incomplete'.
42 43 44 |
# File 'custom_resources/waiter_state_machine_props.rb', line 42 def is_complete_handler @is_complete_handler end |
#log_options ⇒ AWSCDK::CustomResources::LogOptions? (readonly)
Default: - A default log group will be created if logging is enabled.
Defines what execution history events are logged and where they are logged.
60 61 62 |
# File 'custom_resources/waiter_state_machine_props.rb', line 60 def @log_options end |
#max_attempts ⇒ Numeric (readonly)
Number of attempts.
46 47 48 |
# File 'custom_resources/waiter_state_machine_props.rb', line 46 def max_attempts @max_attempts end |
#timeout_handler ⇒ AWSCDK::Lambda::IFunction (readonly)
The handler to call if the waiter times out and is incomplete.
50 51 52 |
# File 'custom_resources/waiter_state_machine_props.rb', line 50 def timeout_handler @timeout_handler end |
Class Method Details
.jsii_properties ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'custom_resources/waiter_state_machine_props.rb', line 62 def self.jsii_properties { :backoff_rate => "backoffRate", :interval => "interval", :is_complete_handler => "isCompleteHandler", :max_attempts => "maxAttempts", :timeout_handler => "timeoutHandler", :disable_logging => "disableLogging", :log_options => "logOptions", } end |
Instance Method Details
#to_jsii ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'custom_resources/waiter_state_machine_props.rb', line 74 def to_jsii result = {} result.merge!({ "backoffRate" => @backoff_rate, "interval" => @interval, "isCompleteHandler" => @is_complete_handler, "maxAttempts" => @max_attempts, "timeoutHandler" => @timeout_handler, "disableLogging" => @disable_logging, "logOptions" => @log_options, }) result.compact end |