Class: AWSCDK::Lambda::LatestPublishedScalingConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::LatestPublishedScalingConfig
- Defined in:
- lambda/latest_published_scaling_config.rb
Overview
The scaling configuration that will be applied to the $LATEST.PUBLISHED version.
Instance Attribute Summary collapse
-
#max_execution_environments ⇒ Numeric?
readonly
The maximum number of execution environments allowed for the $LATEST.PUBLISHED version when published into a capacity provider.
-
#min_execution_environments ⇒ Numeric?
readonly
The minimum number of execution environments to maintain for the $LATEST.PUBLISHED version when published into a capacity provider.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_execution_environments: nil, min_execution_environments: nil) ⇒ LatestPublishedScalingConfig
constructor
A new instance of LatestPublishedScalingConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_execution_environments: nil, min_execution_environments: nil) ⇒ LatestPublishedScalingConfig
Returns a new instance of LatestPublishedScalingConfig.
9 10 11 12 13 14 |
# File 'lambda/latest_published_scaling_config.rb', line 9 def initialize(max_execution_environments: nil, min_execution_environments: nil) @max_execution_environments = max_execution_environments Jsii::Type.check_type(@max_execution_environments, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxExecutionEnvironments") unless @max_execution_environments.nil? @min_execution_environments = min_execution_environments Jsii::Type.check_type(@min_execution_environments, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minExecutionEnvironments") unless @min_execution_environments.nil? end |
Instance Attribute Details
#max_execution_environments ⇒ Numeric? (readonly)
Default: - No maximum specified
The maximum number of execution environments allowed for the $LATEST.PUBLISHED version when published into a capacity provider.
This setting limits the total number of execution environments that can be created to handle concurrent invocations of this specific version.
23 24 25 |
# File 'lambda/latest_published_scaling_config.rb', line 23 def max_execution_environments @max_execution_environments end |
#min_execution_environments ⇒ Numeric? (readonly)
Default: - 3 execution environments are set to be the minimum
The minimum number of execution environments to maintain for the $LATEST.PUBLISHED version when published into a capacity provider.
This setting ensures that at least this many execution environments are always available to handle function invocations for this specific version, reducing cold start latency.
31 32 33 |
# File 'lambda/latest_published_scaling_config.rb', line 31 def min_execution_environments @min_execution_environments end |
Class Method Details
.jsii_properties ⇒ Object
33 34 35 36 37 38 |
# File 'lambda/latest_published_scaling_config.rb', line 33 def self.jsii_properties { :max_execution_environments => "maxExecutionEnvironments", :min_execution_environments => "minExecutionEnvironments", } end |
Instance Method Details
#to_jsii ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lambda/latest_published_scaling_config.rb', line 40 def to_jsii result = {} result.merge!({ "maxExecutionEnvironments" => @max_execution_environments, "minExecutionEnvironments" => @min_execution_environments, }) result.compact end |