Class LatestPublishedScalingConfig.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.LatestPublishedScalingConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LatestPublishedScalingConfig>
- Enclosing interface:
LatestPublishedScalingConfig
@Stability(Stable)
public static final class LatestPublishedScalingConfig.Builder
extends Object
implements software.amazon.jsii.Builder<LatestPublishedScalingConfig>
A builder for
LatestPublishedScalingConfig-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.maxExecutionEnvironments(Number maxExecutionEnvironments) Sets the value ofLatestPublishedScalingConfig.getMaxExecutionEnvironments()minExecutionEnvironments(Number minExecutionEnvironments) Sets the value ofLatestPublishedScalingConfig.getMinExecutionEnvironments()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
maxExecutionEnvironments
@Stability(Stable) public LatestPublishedScalingConfig.Builder maxExecutionEnvironments(Number maxExecutionEnvironments) Sets the value ofLatestPublishedScalingConfig.getMaxExecutionEnvironments()- Parameters:
maxExecutionEnvironments- 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.- Returns:
this
-
minExecutionEnvironments
@Stability(Stable) public LatestPublishedScalingConfig.Builder minExecutionEnvironments(Number minExecutionEnvironments) Sets the value ofLatestPublishedScalingConfig.getMinExecutionEnvironments()- Parameters:
minExecutionEnvironments- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LatestPublishedScalingConfig>- Returns:
- a new instance of
LatestPublishedScalingConfig - Throws:
NullPointerException- if any required attribute was not provided
-