Interface CfnFunction.CodeProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnFunction.CodeProperty.Jsii$Proxy
- Enclosing class:
CfnFunction
@Stability(Stable)
public static interface CfnFunction.CodeProperty
extends software.amazon.jsii.JsiiSerializable
The deployment package for a Lambda function. To deploy a function defined as a container image, you specify the location of a container image in the Amazon ECR registry. For a .zip file deployment package, you can specify the location of an object in Amazon S3. For Node.js and Python functions, you can specify the function code inline in the template.
Changes to a deployment package in Amazon S3 or a container image in ECR are not detected automatically during stack updates. To update the function code, change the object key or version in the template.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.lambda.*; CodeProperty codeProperty = CodeProperty.builder() .imageUri("imageUri") .s3Bucket("s3Bucket") .s3Key("s3Key") .s3ObjectVersion("s3ObjectVersion") .zipFile("zipFile") .build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forCfnFunction.CodeProperty
static final class
An implementation forCfnFunction.CodeProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
ImageUri.default String
An Amazon S3 bucket in the same AWS Region as your function.default String
getS3Key()
The Amazon S3 key of the deployment package.default String
For versioned objects, the version of the deployment package object to use.default String
The source code of your Lambda function.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getImageUri
ImageUri.- See Also:
-
getS3Bucket
An Amazon S3 bucket in the same AWS Region as your function.The bucket can be in a different AWS account.
- See Also:
-
getS3Key
The Amazon S3 key of the deployment package.- See Also:
-
getS3ObjectVersion
For versioned objects, the version of the deployment package object to use.- See Also:
-
getZipFile
The source code of your Lambda function.If you include your function source inline with this parameter, AWS CloudFormation places it in a file named index and zips it to create a deployment package..
- See Also:
-
builder
- Returns:
- a
CfnFunction.CodeProperty.Builder
ofCfnFunction.CodeProperty
-