Class CfnFunction.CodeProperty.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.CfnFunction.CodeProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFunction.CodeProperty>
- Enclosing interface:
CfnFunction.CodeProperty
@Stability(Stable)
public static final class CfnFunction.CodeProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnFunction.CodeProperty>
A builder for
CfnFunction.CodeProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnFunction.CodeProperty.getImageUri()
Sets the value ofCfnFunction.CodeProperty.getS3Bucket()
Sets the value ofCfnFunction.CodeProperty.getS3Key()
s3ObjectVersion
(String s3ObjectVersion) Sets the value ofCfnFunction.CodeProperty.getS3ObjectVersion()
Sets the value ofCfnFunction.CodeProperty.getZipFile()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
imageUri
Sets the value ofCfnFunction.CodeProperty.getImageUri()
- Parameters:
imageUri
- URI of a container image in the Amazon ECR registry.- Returns:
this
-
s3Bucket
Sets the value ofCfnFunction.CodeProperty.getS3Bucket()
- Parameters:
s3Bucket
- An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account .- Returns:
this
-
s3Key
Sets the value ofCfnFunction.CodeProperty.getS3Key()
- Parameters:
s3Key
- The Amazon S3 key of the deployment package.- Returns:
this
-
s3ObjectVersion
Sets the value ofCfnFunction.CodeProperty.getS3ObjectVersion()
- Parameters:
s3ObjectVersion
- For versioned objects, the version of the deployment package object to use.- Returns:
this
-
zipFile
Sets the value ofCfnFunction.CodeProperty.getZipFile()
- Parameters:
zipFile
- (Node.js and Python) The source code of your Lambda function. If you include your function source inline with this parameter, AWS CloudFormation places it in a file namedindex
and zips it to create a deployment package . This zip file cannot exceed 4MB. For theHandler
property, the first part of the handler identifier must beindex
. For example,index.handler
. For JSON, you must escape quotes and special characters such as newline (\n
) with a backslash.If you specify a function that interacts with an AWS CloudFormation custom resource, you don't have to write your own functions to send responses to the custom resource that invoked the function. AWS CloudFormation provides a response module ( cfn-response ) that simplifies sending responses. See Using AWS Lambda with AWS CloudFormation for details.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnFunction.CodeProperty>
- Returns:
- a new instance of
CfnFunction.CodeProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-