Class Version.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.Version.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Version>
- Enclosing class:
Version
@Stability(Stable)
public static final class Version.Builder
extends Object
implements software.amazon.jsii.Builder<Version>
A fluent builder for
Version
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
codeSha256
(String codeSha256) SHA256 of the version of the Lambda source code.static Version.Builder
description
(String description) Description of the version.Function to get the value of.maxEventAge
(Duration maxEventAge) The maximum age of a request that Lambda sends to a function for processing.onFailure
(IDestination onFailure) The destination for failed invocations.onSuccess
(IDestination onSuccess) The destination for successful invocations.provisionedConcurrentExecutions
(Number provisionedConcurrentExecutions) Specifies a provisioned concurrency configuration for a function's version.removalPolicy
(RemovalPolicy removalPolicy) Whether to retain old versions of this function when a new version is created.retryAttempts
(Number retryAttempts) The maximum number of times to retry when the function returns an error.
-
Method Details
-
create
@Stability(Stable) public static Version.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
Version.Builder
.
-
maxEventAge
The maximum age of a request that Lambda sends to a function for processing.Minimum: 60 seconds Maximum: 6 hours
Default: Duration.hours(6)
- Parameters:
maxEventAge
- The maximum age of a request that Lambda sends to a function for processing. This parameter is required.- Returns:
this
-
onFailure
The destination for failed invocations.Default: - no destination
- Parameters:
onFailure
- The destination for failed invocations. This parameter is required.- Returns:
this
-
onSuccess
The destination for successful invocations.Default: - no destination
- Parameters:
onSuccess
- The destination for successful invocations. This parameter is required.- Returns:
this
-
retryAttempts
The maximum number of times to retry when the function returns an error.Minimum: 0 Maximum: 2
Default: 2
- Parameters:
retryAttempts
- The maximum number of times to retry when the function returns an error. This parameter is required.- Returns:
this
-
codeSha256
SHA256 of the version of the Lambda source code.Specify to validate that you're deploying the right version.
Default: No validation is performed
- Parameters:
codeSha256
- SHA256 of the version of the Lambda source code. This parameter is required.- Returns:
this
-
description
Description of the version.Default: Description of the Lambda
- Parameters:
description
- Description of the version. This parameter is required.- Returns:
this
-
provisionedConcurrentExecutions
@Stability(Stable) public Version.Builder provisionedConcurrentExecutions(Number provisionedConcurrentExecutions) Specifies a provisioned concurrency configuration for a function's version.Default: No provisioned concurrency
- Parameters:
provisionedConcurrentExecutions
- Specifies a provisioned concurrency configuration for a function's version. This parameter is required.- Returns:
this
-
removalPolicy
Whether to retain old versions of this function when a new version is created.Default: RemovalPolicy.DESTROY
- Parameters:
removalPolicy
- Whether to retain old versions of this function when a new version is created. This parameter is required.- Returns:
this
-
lambda
Function to get the value of.- Parameters:
lambda
- Function to get the value of. This parameter is required.- Returns:
this
-
build
-