Package io.github.cdklabs.projen.awscdk
Class LambdaFunctionCommonOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.awscdk.LambdaFunctionCommonOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<LambdaFunctionCommonOptions>
- Enclosing interface:
- LambdaFunctionCommonOptions
@Stability(Experimental) public static final class LambdaFunctionCommonOptions.Builder extends Object implements software.amazon.jsii.Builder<LambdaFunctionCommonOptions>
A builder forLambdaFunctionCommonOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LambdaFunctionCommonOptions.BuilderawsSdkConnectionReuse(Boolean awsSdkConnectionReuse)Sets the value ofLambdaFunctionCommonOptions.getAwsSdkConnectionReuse()LambdaFunctionCommonOptionsbuild()Builds the configured instance.LambdaFunctionCommonOptions.BuilderbundlingOptions(BundlingOptions bundlingOptions)Sets the value ofLambdaFunctionCommonOptions.getBundlingOptions()LambdaFunctionCommonOptions.BuilderedgeLambda(Boolean edgeLambda)Sets the value ofLambdaFunctionCommonOptions.getEdgeLambda()LambdaFunctionCommonOptions.Builderruntime(LambdaRuntime runtime)Sets the value ofLambdaFunctionCommonOptions.getRuntime()
-
-
-
Method Detail
-
awsSdkConnectionReuse
@Stability(Experimental) public LambdaFunctionCommonOptions.Builder awsSdkConnectionReuse(Boolean awsSdkConnectionReuse)
Sets the value ofLambdaFunctionCommonOptions.getAwsSdkConnectionReuse()- Parameters:
awsSdkConnectionReuse- Whether to automatically reuse TCP connections when working with the AWS SDK for JavaScript. This sets theAWS_NODEJS_CONNECTION_REUSE_ENABLEDenvironment variable to1.Not applicable when
edgeLambdais set totruebecause environment variables are not supported in Lambda@Edge.- Returns:
this
-
bundlingOptions
@Stability(Experimental) public LambdaFunctionCommonOptions.Builder bundlingOptions(BundlingOptions bundlingOptions)
Sets the value ofLambdaFunctionCommonOptions.getBundlingOptions()- Parameters:
bundlingOptions- Bundling options for this AWS Lambda function. If not specified the default bundling options specified for the projectBundlerinstance will be used.- Returns:
this
-
edgeLambda
@Stability(Experimental) public LambdaFunctionCommonOptions.Builder edgeLambda(Boolean edgeLambda)
Sets the value ofLambdaFunctionCommonOptions.getEdgeLambda()- Parameters:
edgeLambda- Whether to create acloudfront.experimental.EdgeFunctioninstead of alambda.Function.- Returns:
this
-
runtime
@Stability(Experimental) public LambdaFunctionCommonOptions.Builder runtime(LambdaRuntime runtime)
Sets the value ofLambdaFunctionCommonOptions.getRuntime()- Parameters:
runtime- The node.js version to target.- Returns:
this
-
build
@Stability(Experimental) public LambdaFunctionCommonOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LambdaFunctionCommonOptions>- Returns:
- a new instance of
LambdaFunctionCommonOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-