Class: AWSCDK::EventsTargets::SfnStateMachineProps
- Inherits:
-
TargetBaseProps
- Object
- TargetBaseProps
- AWSCDK::EventsTargets::SfnStateMachineProps
- Defined in:
- events_targets/sfn_state_machine_props.rb
Overview
Customize the Step Functions State Machine target.
Instance Attribute Summary collapse
-
#dead_letter_queue ⇒ AWSCDK::SQS::IQueue?
readonly
The SQS queue to be used as deadLetterQueue.
-
#input ⇒ AWSCDK::Events::RuleTargetInput?
readonly
The input to the state machine execution.
-
#max_event_age ⇒ AWSCDK::Duration?
readonly
The maximum age of a request that Lambda sends to a function for processing.
-
#retry_attempts ⇒ Numeric?
readonly
The maximum number of times to retry when the function returns an error.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
The IAM role to be assumed to execute the State Machine.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, input: nil, role: nil) ⇒ SfnStateMachineProps
constructor
A new instance of SfnStateMachineProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, input: nil, role: nil) ⇒ SfnStateMachineProps
Returns a new instance of SfnStateMachineProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'events_targets/sfn_state_machine_props.rb', line 12 def initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, input: nil, role: nil) @dead_letter_queue = dead_letter_queue Jsii::Type.check_type(@dead_letter_queue, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3FzLklRdWV1ZSJ9")), "deadLetterQueue") unless @dead_letter_queue.nil? @max_event_age = max_event_age Jsii::Type.check_type(@max_event_age, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "maxEventAge") unless @max_event_age.nil? @retry_attempts = retry_attempts Jsii::Type.check_type(@retry_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retryAttempts") unless @retry_attempts.nil? @input = input Jsii::Type.check_type(@input, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLlJ1bGVUYXJnZXRJbnB1dCJ9")), "input") unless @input.nil? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? end |
Instance Attribute Details
#dead_letter_queue ⇒ AWSCDK::SQS::IQueue? (readonly)
Default: - no dead-letter queue
The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue.
The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.
33 34 35 |
# File 'events_targets/sfn_state_machine_props.rb', line 33 def dead_letter_queue @dead_letter_queue end |
#input ⇒ AWSCDK::Events::RuleTargetInput? (readonly)
Default: the entire EventBridge event
The input to the state machine execution.
54 55 56 |
# File 'events_targets/sfn_state_machine_props.rb', line 54 def input @input end |
#max_event_age ⇒ AWSCDK::Duration? (readonly)
Default: Duration.hours(24)
The maximum age of a request that Lambda sends to a function for processing.
Minimum value of 60. Maximum value of 86400.
41 42 43 |
# File 'events_targets/sfn_state_machine_props.rb', line 41 def max_event_age @max_event_age end |
#retry_attempts ⇒ Numeric? (readonly)
Default: 185
The maximum number of times to retry when the function returns an error.
Minimum value of 0. Maximum value of 185.
49 50 51 |
# File 'events_targets/sfn_state_machine_props.rb', line 49 def retry_attempts @retry_attempts end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - a new role will be created
The IAM role to be assumed to execute the State Machine.
59 60 61 |
# File 'events_targets/sfn_state_machine_props.rb', line 59 def role @role end |
Class Method Details
.jsii_properties ⇒ Object
61 62 63 64 65 66 67 68 69 |
# File 'events_targets/sfn_state_machine_props.rb', line 61 def self.jsii_properties { :dead_letter_queue => "deadLetterQueue", :max_event_age => "maxEventAge", :retry_attempts => "retryAttempts", :input => "input", :role => "role", } end |
Instance Method Details
#to_jsii ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'events_targets/sfn_state_machine_props.rb', line 71 def to_jsii result = {} result.merge!(super) result.merge!({ "deadLetterQueue" => @dead_letter_queue, "maxEventAge" => @max_event_age, "retryAttempts" => @retry_attempts, "input" => @input, "role" => @role, }) result.compact end |