Class: AWSCDK::Lambda::EventInvokeConfigProps
- Inherits:
-
EventInvokeConfigOptions
- Object
- EventInvokeConfigOptions
- AWSCDK::Lambda::EventInvokeConfigProps
- Defined in:
- lambda/event_invoke_config_props.rb
Overview
Properties for an EventInvokeConfig.
Instance Attribute Summary collapse
-
#function ⇒ AWSCDK::Lambda::IFunction
readonly
The Lambda function.
-
#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.
-
#qualifier ⇒ String?
readonly
The qualifier.
-
#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, function:, qualifier: nil) ⇒ EventInvokeConfigProps
constructor
A new instance of EventInvokeConfigProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_event_age: nil, on_failure: nil, on_success: nil, retry_attempts: nil, function:, qualifier: nil) ⇒ EventInvokeConfigProps
Returns a new instance of EventInvokeConfigProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lambda/event_invoke_config_props.rb', line 13 def initialize(max_event_age: nil, on_failure: nil, on_success: nil, retry_attempts: nil, function:, qualifier: 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? @function = function Jsii::Type.check_type(@function, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "function") @qualifier = qualifier Jsii::Type.check_type(@qualifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "qualifier") unless @qualifier.nil? end |
Instance Attribute Details
#function ⇒ AWSCDK::Lambda::IFunction (readonly)
The Lambda function.
57 58 59 |
# File 'lambda/event_invoke_config_props.rb', line 57 def function @function end |
#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
35 36 37 |
# File 'lambda/event_invoke_config_props.rb', line 35 def max_event_age @max_event_age end |
#on_failure ⇒ AWSCDK::Lambda::IDestination? (readonly)
Default: - no destination
The destination for failed invocations.
40 41 42 |
# File 'lambda/event_invoke_config_props.rb', line 40 def on_failure @on_failure end |
#on_success ⇒ AWSCDK::Lambda::IDestination? (readonly)
Default: - no destination
The destination for successful invocations.
45 46 47 |
# File 'lambda/event_invoke_config_props.rb', line 45 def on_success @on_success end |
#qualifier ⇒ String? (readonly)
Default: - latest version
The qualifier.
62 63 64 |
# File 'lambda/event_invoke_config_props.rb', line 62 def qualifier @qualifier end |
#retry_attempts ⇒ Numeric? (readonly)
Default: 2
The maximum number of times to retry when the function returns an error.
Minimum: 0 Maximum: 2
53 54 55 |
# File 'lambda/event_invoke_config_props.rb', line 53 def retry_attempts @retry_attempts end |
Class Method Details
.jsii_properties ⇒ Object
64 65 66 67 68 69 70 71 72 73 |
# File 'lambda/event_invoke_config_props.rb', line 64 def self.jsii_properties { :max_event_age => "maxEventAge", :on_failure => "onFailure", :on_success => "onSuccess", :retry_attempts => "retryAttempts", :function => "function", :qualifier => "qualifier", } end |
Instance Method Details
#to_jsii ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lambda/event_invoke_config_props.rb', line 75 def to_jsii result = {} result.merge!(super) result.merge!({ "maxEventAge" => @max_event_age, "onFailure" => @on_failure, "onSuccess" => @on_success, "retryAttempts" => @retry_attempts, "function" => @function, "qualifier" => @qualifier, }) result.compact end |