Class: AWSCDK::CustomResources::WaiterStateMachineProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
custom_resources/waiter_state_machine_props.rb

Overview

Initialization properties for the WaiterStateMachine construct.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • backoff_rate (Numeric)

    Backoff between attempts.

  • interval (AWSCDK::Duration)

    The interval to wait between attempts.

  • is_complete_handler (AWSCDK::Lambda::IFunction)

    The main handler that notifies if the waiter to decide 'complete' or 'incomplete'.

  • max_attempts (Numeric)

    Number of attempts.

  • timeout_handler (AWSCDK::Lambda::IFunction)

    The handler to call if the waiter times out and is incomplete.

  • disable_logging (Boolean, nil) (defaults to: nil)

    Whether logging for the state machine is disabled.

  • log_options (AWSCDK::CustomResources::LogOptions, nil) (defaults to: nil)

    Defines what execution history events are logged and where they are logged.



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 = log_options.is_a?(Hash) ? ::AWSCDK::CustomResources::LogOptions.new(**log_options.transform_keys(&:to_sym)) : log_options
  Jsii::Type.check_type(@log_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jdXN0b21fcmVzb3VyY2VzLkxvZ09wdGlvbnMifQ==")), "logOptions") unless @log_options.nil?
end

Instance Attribute Details

#backoff_rateNumeric (readonly)

Backoff between attempts.

Returns:

  • (Numeric)


34
35
36
# File 'custom_resources/waiter_state_machine_props.rb', line 34

def backoff_rate
  @backoff_rate
end

#disable_loggingBoolean? (readonly)

Note:

Default: - false

Whether logging for the state machine is disabled.

Returns:

  • (Boolean, nil)


55
56
57
# File 'custom_resources/waiter_state_machine_props.rb', line 55

def disable_logging
  @disable_logging
end

#intervalAWSCDK::Duration (readonly)

The interval to wait between attempts.

Returns:



38
39
40
# File 'custom_resources/waiter_state_machine_props.rb', line 38

def interval
  @interval
end

#is_complete_handlerAWSCDK::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_optionsAWSCDK::CustomResources::LogOptions? (readonly)

Note:

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
  @log_options
end

#max_attemptsNumeric (readonly)

Number of attempts.

Returns:

  • (Numeric)


46
47
48
# File 'custom_resources/waiter_state_machine_props.rb', line 46

def max_attempts
  @max_attempts
end

#timeout_handlerAWSCDK::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_propertiesObject



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_jsiiObject



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