Package io.github.cdklabs.projen.awscdk
Class LambdaFunctionOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.awscdk.LambdaFunctionOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<LambdaFunctionOptions>
- Enclosing interface:
- LambdaFunctionOptions
@Stability(Experimental) public static final class LambdaFunctionOptions.Builder extends Object implements software.amazon.jsii.Builder<LambdaFunctionOptions>
A builder forLambdaFunctionOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
cdkDeps
@Stability(Experimental) public LambdaFunctionOptions.Builder cdkDeps(AwsCdkDeps cdkDeps)
Sets the value ofLambdaFunctionOptions.getCdkDeps()- Parameters:
cdkDeps- AWS CDK dependency manager. This parameter is required.- Returns:
this
-
entrypoint
@Stability(Experimental) public LambdaFunctionOptions.Builder entrypoint(String entrypoint)
Sets the value ofLambdaFunctionOptions.getEntrypoint()- Parameters:
entrypoint- A path from the project root directory to a TypeScript file which contains the AWS Lambda handler entrypoint (exports ahandlerfunction). This parameter is required. This is relative to the root directory of the project.- Returns:
this
-
constructFile
@Stability(Experimental) public LambdaFunctionOptions.Builder constructFile(String constructFile)
Sets the value ofLambdaFunctionOptions.getConstructFile()- Parameters:
constructFile- The name of the generated TypeScript source file. This file should also be under the source tree.- Returns:
this
-
constructName
@Stability(Experimental) public LambdaFunctionOptions.Builder constructName(String constructName)
Sets the value ofLambdaFunctionOptions.getConstructName()- Parameters:
constructName- The name of the generatedlambda.Functionsubclass.- Returns:
this
-
awsSdkConnectionReuse
@Stability(Experimental) public LambdaFunctionOptions.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 LambdaFunctionOptions.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 LambdaFunctionOptions.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 LambdaFunctionOptions.Builder runtime(LambdaRuntime runtime)
Sets the value ofLambdaFunctionCommonOptions.getRuntime()- Parameters:
runtime- The node.js version to target.- Returns:
this
-
build
@Stability(Experimental) public LambdaFunctionOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LambdaFunctionOptions>- Returns:
- a new instance of
LambdaFunctionOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-