Class: AWSCDK::Lambda::DurableConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::DurableConfig
- Defined in:
- lambda/durable_config.rb
Overview
Configuration for durable functions.
Lambda durable functions allow for long-running executions with persistent state.
Instance Attribute Summary collapse
-
#execution_timeout ⇒ AWSCDK::Duration
readonly
The amount of time that Lambda allows a durable function to run before stopping it.
-
#retention_period ⇒ AWSCDK::Duration?
readonly
The number of days after a durable execution is closed that Lambda retains its history.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(execution_timeout:, retention_period: nil) ⇒ DurableConfig
constructor
A new instance of DurableConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(execution_timeout:, retention_period: nil) ⇒ DurableConfig
Returns a new instance of DurableConfig.
11 12 13 14 15 16 |
# File 'lambda/durable_config.rb', line 11 def initialize(execution_timeout:, retention_period: nil) @execution_timeout = execution_timeout Jsii::Type.check_type(@execution_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "executionTimeout") @retention_period = retention_period Jsii::Type.check_type(@retention_period, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "retentionPeriod") unless @retention_period.nil? end |
Instance Attribute Details
#execution_timeout ⇒ AWSCDK::Duration (readonly)
The amount of time that Lambda allows a durable function to run before stopping it.
Must be between 1 and 31,622,400 seconds (366 days).
23 24 25 |
# File 'lambda/durable_config.rb', line 23 def execution_timeout @execution_timeout end |
#retention_period ⇒ AWSCDK::Duration? (readonly)
Default: Duration.days(14)
The number of days after a durable execution is closed that Lambda retains its history.
Must be between 1 and 90 days.
The underlying configuration is expressed in whole numbers of days. Providing a Duration that does not represent a whole number of days will result in a runtime or deployment error.
33 34 35 |
# File 'lambda/durable_config.rb', line 33 def retention_period @retention_period end |
Class Method Details
.jsii_properties ⇒ Object
35 36 37 38 39 40 |
# File 'lambda/durable_config.rb', line 35 def self.jsii_properties { :execution_timeout => "executionTimeout", :retention_period => "retentionPeriod", } end |
Instance Method Details
#to_jsii ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lambda/durable_config.rb', line 42 def to_jsii result = {} result.merge!({ "executionTimeout" => @execution_timeout, "retentionPeriod" => @retention_period, }) result.compact end |