Class: AWSCDK::Lambda::EventInvokeConfigOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::EventInvokeConfigOptions
- Defined in:
- lambda/event_invoke_config_options.rb
Overview
Options to add an EventInvokeConfig to a function.
Direct Known Subclasses
AliasOptions, EventInvokeConfigProps, FunctionOptions, VersionOptions
Instance Attribute Summary collapse
-
#max_event_age ⇒ AWSCDK::Duration?
readonly
The maximum age of a request that Lambda sends to a function for processing.
-
#on_failure ⇒ AWSCDK::Lambda::IDestination?
readonly
The destination for failed invocations.
-
#on_success ⇒ AWSCDK::Lambda::IDestination?
readonly
The destination for successful invocations.
-
#retry_attempts ⇒ Numeric?
readonly
The maximum number of times to retry when the function returns an error.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_event_age: nil, on_failure: nil, on_success: nil, retry_attempts: nil) ⇒ EventInvokeConfigOptions
constructor
A new instance of EventInvokeConfigOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_event_age: nil, on_failure: nil, on_success: nil, retry_attempts: nil) ⇒ EventInvokeConfigOptions
Returns a new instance of EventInvokeConfigOptions.
11 12 13 14 15 16 17 18 19 20 |
# File 'lambda/event_invoke_config_options.rb', line 11 def initialize(max_event_age: nil, on_failure: nil, on_success: nil, retry_attempts: 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? @on_failure = on_failure Jsii::Type.check_type(@on_failure, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklEZXN0aW5hdGlvbiJ9")), "onFailure") unless @on_failure.nil? @on_success = on_success Jsii::Type.check_type(@on_success, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklEZXN0aW5hdGlvbiJ9")), "onSuccess") unless @on_success.nil? @retry_attempts = retry_attempts Jsii::Type.check_type(@retry_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retryAttempts") unless @retry_attempts.nil? end |
Instance Attribute Details
#max_event_age ⇒ AWSCDK::Duration? (readonly)
Default: Duration.hours(6)
The maximum age of a request that Lambda sends to a function for processing.
Minimum: 60 seconds Maximum: 6 hours
29 30 31 |
# File 'lambda/event_invoke_config_options.rb', line 29 def max_event_age @max_event_age end |
#on_failure ⇒ AWSCDK::Lambda::IDestination? (readonly)
Default: - no destination
The destination for failed invocations.
34 35 36 |
# File 'lambda/event_invoke_config_options.rb', line 34 def on_failure @on_failure end |
#on_success ⇒ AWSCDK::Lambda::IDestination? (readonly)
Default: - no destination
The destination for successful invocations.
39 40 41 |
# File 'lambda/event_invoke_config_options.rb', line 39 def on_success @on_success end |
#retry_attempts ⇒ Numeric? (readonly)
Default: 2
The maximum number of times to retry when the function returns an error.
Minimum: 0 Maximum: 2
47 48 49 |
# File 'lambda/event_invoke_config_options.rb', line 47 def retry_attempts @retry_attempts end |
Class Method Details
.jsii_properties ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lambda/event_invoke_config_options.rb', line 49 def self.jsii_properties { :max_event_age => "maxEventAge", :on_failure => "onFailure", :on_success => "onSuccess", :retry_attempts => "retryAttempts", } end |
Instance Method Details
#to_jsii ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'lambda/event_invoke_config_options.rb', line 58 def to_jsii result = {} result.merge!({ "maxEventAge" => @max_event_age, "onFailure" => @on_failure, "onSuccess" => @on_success, "retryAttempts" => @retry_attempts, }) result.compact end |