Interface VersionOptions
- All Superinterfaces:
EventInvokeConfigOptions,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
VersionProps
- All Known Implementing Classes:
VersionOptions.Jsii$Proxy,VersionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:40:08.916Z")
@Stability(Stable)
public interface VersionOptions
extends software.amazon.jsii.JsiiSerializable, EventInvokeConfigOptions
Options for
lambda.Version.
Example:
Function fn = Function.Builder.create(this, "MyFunction")
.currentVersionOptions(VersionOptions.builder()
.removalPolicy(RemovalPolicy.RETAIN) // retain old versions
.retryAttempts(1)
.build())
.runtime(Runtime.NODEJS_18_X)
.handler("index.handler")
.code(Code.fromAsset(join(__dirname, "lambda-handler")))
.build();
fn.addAlias("live");
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forVersionOptionsstatic final classAn implementation forVersionOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic VersionOptions.Builderbuilder()default StringSHA256 of the version of the Lambda source code.default StringDescription of the version.default NumberSpecifies a provisioned concurrency configuration for a function's version.default RemovalPolicyWhether to retain old versions of this function when a new version is created.Methods inherited from interface software.amazon.awscdk.services.lambda.EventInvokeConfigOptions
getMaxEventAge, getOnFailure, getOnSuccess, getRetryAttemptsMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCodeSha256
SHA256 of the version of the Lambda source code.Specify to validate that you're deploying the right version.
Default: No validation is performed
-
getDescription
Description of the version.Default: Description of the Lambda
-
getProvisionedConcurrentExecutions
Specifies a provisioned concurrency configuration for a function's version.Default: No provisioned concurrency
-
getRemovalPolicy
Whether to retain old versions of this function when a new version is created.Default: RemovalPolicy.DESTROY
-
builder
- Returns:
- a
VersionOptions.BuilderofVersionOptions
-