Class CfnFunctionPropsMixin.CodeProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFunctionPropsMixin.CodeProperty>
- Enclosing interface:
CfnFunctionPropsMixin.CodeProperty
CfnFunctionPropsMixin.CodeProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnFunctionPropsMixin.CodeProperty.getImageUri()Sets the value ofCfnFunctionPropsMixin.CodeProperty.getS3Bucket()s3Bucket(IBucketRef s3Bucket) Sets the value ofCfnFunctionPropsMixin.CodeProperty.getS3Bucket()Sets the value ofCfnFunctionPropsMixin.CodeProperty.getS3Key()s3ObjectVersion(String s3ObjectVersion) Sets the value ofCfnFunctionPropsMixin.CodeProperty.getS3ObjectVersion()sourceKmsKeyArn(String sourceKmsKeyArn) Sets the value ofCfnFunctionPropsMixin.CodeProperty.getSourceKmsKeyArn()Sets the value ofCfnFunctionPropsMixin.CodeProperty.getZipFile()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
imageUri
Sets the value ofCfnFunctionPropsMixin.CodeProperty.getImageUri()- Parameters:
imageUri- URI of a container image in the Amazon ECR registry.- Returns:
this
-
s3Bucket
Sets the value ofCfnFunctionPropsMixin.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
-
s3Bucket
Sets the value ofCfnFunctionPropsMixin.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 ofCfnFunctionPropsMixin.CodeProperty.getS3Key()- Parameters:
s3Key- The Amazon S3 key of the deployment package.- Returns:
this
-
s3ObjectVersion
@Stability(Stable) public CfnFunctionPropsMixin.CodeProperty.Builder s3ObjectVersion(String s3ObjectVersion) Sets the value ofCfnFunctionPropsMixin.CodeProperty.getS3ObjectVersion()- Parameters:
s3ObjectVersion- For versioned objects, the version of the deployment package object to use.- Returns:
this
-
sourceKmsKeyArn
@Stability(Stable) public CfnFunctionPropsMixin.CodeProperty.Builder sourceKmsKeyArn(String sourceKmsKeyArn) Sets the value ofCfnFunctionPropsMixin.CodeProperty.getSourceKmsKeyArn()- Parameters:
sourceKmsKeyArn- The ARN of the AWS Key Management Service ( AWS ) customer managed key that's used to encrypt your function's .zip deployment package. If you don't provide a customer managed key, Lambda uses an AWS owned key .- Returns:
this
-
zipFile
Sets the value ofCfnFunctionPropsMixin.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, CloudFormation places it in a file namedindexand zips it to create a deployment package . This zip file cannot exceed 4MB. For theHandlerproperty, the first part of the handler identifier must beindex. For example,index.handler.When you specify source code inline for a Node.js function, the
indexfile that CloudFormation creates uses the extension.js. This means that Node.js treats the file as a CommonJS module.When using Node.js 24 or later, Node.js can automatically detect if a
.jsfile should be treated as CommonJS or as an ES module. To enable auto-detection, add the--experimental-detect-moduleflag to theNODE_OPTIONSenvironment variable. For more information, see Experimental Node.js features .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:
buildin interfacesoftware.amazon.jsii.Builder<CfnFunctionPropsMixin.CodeProperty>- Returns:
- a new instance of
CfnFunctionPropsMixin.CodeProperty - Throws:
NullPointerException- if any required attribute was not provided
-