Class: AWSCDK::StepFunctions::RetryProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::StepFunctions::RetryProps
- Defined in:
- step_functions/retry_props.rb
Overview
Retry details.
Instance Attribute Summary collapse
-
#backoff_rate ⇒ Numeric?
readonly
Multiplication for how much longer the wait interval gets on every retry.
-
#errors ⇒ Array<String>?
readonly
Errors to retry.
-
#interval ⇒ AWSCDK::Duration?
readonly
How many seconds to wait initially before retrying.
-
#jitter_strategy ⇒ AWSCDK::StepFunctions::JitterType?
readonly
Introduces a randomization over the retry interval.
-
#max_attempts ⇒ Numeric?
readonly
How many times to retry this particular error.
-
#max_delay ⇒ AWSCDK::Duration?
readonly
Maximum limit on retry interval growth during exponential backoff.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(backoff_rate: nil, errors: nil, interval: nil, jitter_strategy: nil, max_attempts: nil, max_delay: nil) ⇒ RetryProps
constructor
A new instance of RetryProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(backoff_rate: nil, errors: nil, interval: nil, jitter_strategy: nil, max_attempts: nil, max_delay: nil) ⇒ RetryProps
Returns a new instance of RetryProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'step_functions/retry_props.rb', line 13 def initialize(backoff_rate: nil, errors: nil, interval: nil, jitter_strategy: nil, max_attempts: nil, max_delay: nil) @backoff_rate = backoff_rate Jsii::Type.check_type(@backoff_rate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "backoffRate") unless @backoff_rate.nil? @errors = errors Jsii::Type.check_type(@errors, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "errors") unless @errors.nil? @interval = interval Jsii::Type.check_type(@interval, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "interval") unless @interval.nil? @jitter_strategy = jitter_strategy Jsii::Type.check_type(@jitter_strategy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9ucy5KaXR0ZXJUeXBlIn0=")), "jitterStrategy") unless @jitter_strategy.nil? @max_attempts = max_attempts Jsii::Type.check_type(@max_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxAttempts") unless @max_attempts.nil? @max_delay = max_delay Jsii::Type.check_type(@max_delay, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "maxDelay") unless @max_delay.nil? end |
Instance Attribute Details
#backoff_rate ⇒ Numeric? (readonly)
Default: 2
Multiplication for how much longer the wait interval gets on every retry.
32 33 34 |
# File 'step_functions/retry_props.rb', line 32 def backoff_rate @backoff_rate end |
#errors ⇒ Array<String>? (readonly)
Default: All errors
Errors to retry.
A list of error strings to retry, which can be either predefined errors (for example Errors.NoChoiceMatched) or a self-defined error.
40 41 42 |
# File 'step_functions/retry_props.rb', line 40 def errors @errors end |
#interval ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(1)
How many seconds to wait initially before retrying.
45 46 47 |
# File 'step_functions/retry_props.rb', line 45 def interval @interval end |
#jitter_strategy ⇒ AWSCDK::StepFunctions::JitterType? (readonly)
Default: - No jitter strategy
Introduces a randomization over the retry interval.
50 51 52 |
# File 'step_functions/retry_props.rb', line 50 def jitter_strategy @jitter_strategy end |
#max_attempts ⇒ Numeric? (readonly)
Default: 3
How many times to retry this particular error.
May be 0 to disable retry for specific errors (in case you have a catch-all retry policy).
58 59 60 |
# File 'step_functions/retry_props.rb', line 58 def max_attempts @max_attempts end |
#max_delay ⇒ AWSCDK::Duration? (readonly)
Default: - No max delay
Maximum limit on retry interval growth during exponential backoff.
63 64 65 |
# File 'step_functions/retry_props.rb', line 63 def max_delay @max_delay end |
Class Method Details
.jsii_properties ⇒ Object
65 66 67 68 69 70 71 72 73 74 |
# File 'step_functions/retry_props.rb', line 65 def self.jsii_properties { :backoff_rate => "backoffRate", :errors => "errors", :interval => "interval", :jitter_strategy => "jitterStrategy", :max_attempts => "maxAttempts", :max_delay => "maxDelay", } end |
Instance Method Details
#to_jsii ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'step_functions/retry_props.rb', line 76 def to_jsii result = {} result.merge!({ "backoffRate" => @backoff_rate, "errors" => @errors, "interval" => @interval, "jitterStrategy" => @jitter_strategy, "maxAttempts" => @max_attempts, "maxDelay" => @max_delay, }) result.compact end |