Class: AWSCDK::EventsTargets::BatchJobProps
- Inherits:
-
TargetBaseProps
- Object
- TargetBaseProps
- AWSCDK::EventsTargets::BatchJobProps
- Defined in:
- events_targets/batch_job_props.rb
Overview
Customize the Batch Job Event Target.
Instance Attribute Summary collapse
-
#attempts ⇒ Numeric?
readonly
The number of times to attempt to retry, if the job fails.
-
#dead_letter_queue ⇒ AWSCDK::SQS::IQueue?
readonly
The SQS queue to be used as deadLetterQueue.
-
#event ⇒ AWSCDK::Events::RuleTargetInput?
readonly
The event to send to the Lambda.
-
#job_name ⇒ String?
readonly
The name of the submitted job.
-
#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.
-
#size ⇒ Numeric?
readonly
The size of the array, if this is an array batch job.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, attempts: nil, event: nil, job_name: nil, size: nil) ⇒ BatchJobProps
constructor
A new instance of BatchJobProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, attempts: nil, event: nil, job_name: nil, size: nil) ⇒ BatchJobProps
Returns a new instance of BatchJobProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'events_targets/batch_job_props.rb', line 14 def initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, attempts: nil, event: nil, job_name: nil, size: 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? @attempts = attempts Jsii::Type.check_type(@attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "attempts") unless @attempts.nil? @event = event Jsii::Type.check_type(@event, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLlJ1bGVUYXJnZXRJbnB1dCJ9")), "event") unless @event.nil? @job_name = job_name Jsii::Type.check_type(@job_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jobName") unless @job_name.nil? @size = size Jsii::Type.check_type(@size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "size") unless @size.nil? end |
Instance Attribute Details
#attempts ⇒ Numeric? (readonly)
Default: no retryStrategy is set
The number of times to attempt to retry, if the job fails.
Valid values are 1–10.
62 63 64 |
# File 'events_targets/batch_job_props.rb', line 62 def attempts @attempts end |
#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.
39 40 41 |
# File 'events_targets/batch_job_props.rb', line 39 def dead_letter_queue @dead_letter_queue end |
#event ⇒ AWSCDK::Events::RuleTargetInput? (readonly)
Default: the entire EventBridge event
The event to send to the Lambda.
This will be the payload sent to the Lambda Function.
69 70 71 |
# File 'events_targets/batch_job_props.rb', line 69 def event @event end |
#job_name ⇒ String? (readonly)
Default: - Automatically generated
The name of the submitted job.
74 75 76 |
# File 'events_targets/batch_job_props.rb', line 74 def job_name @job_name 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.
47 48 49 |
# File 'events_targets/batch_job_props.rb', line 47 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.
55 56 57 |
# File 'events_targets/batch_job_props.rb', line 55 def retry_attempts @retry_attempts end |
#size ⇒ Numeric? (readonly)
Default: no arrayProperties are set
The size of the array, if this is an array batch job.
Valid values are integers between 2 and 10,000.
81 82 83 |
# File 'events_targets/batch_job_props.rb', line 81 def size @size end |
Class Method Details
.jsii_properties ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 |
# File 'events_targets/batch_job_props.rb', line 83 def self.jsii_properties { :dead_letter_queue => "deadLetterQueue", :max_event_age => "maxEventAge", :retry_attempts => "retryAttempts", :attempts => "attempts", :event => "event", :job_name => "jobName", :size => "size", } end |
Instance Method Details
#to_jsii ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'events_targets/batch_job_props.rb', line 95 def to_jsii result = {} result.merge!(super) result.merge!({ "deadLetterQueue" => @dead_letter_queue, "maxEventAge" => @max_event_age, "retryAttempts" => @retry_attempts, "attempts" => @attempts, "event" => @event, "jobName" => @job_name, "size" => @size, }) result.compact end |