Class VersionOptions.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.VersionOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<VersionOptions>
- Enclosing interface:
- VersionOptions
@Stability(Stable)
public static final class VersionOptions.Builder
extends Object
implements software.amazon.jsii.Builder<VersionOptions>
A builder for
VersionOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.codeSha256
(String codeSha256) Sets the value ofVersionOptions.getCodeSha256()
description
(String description) Sets the value ofVersionOptions.getDescription()
maxEventAge
(Duration maxEventAge) Sets the value ofEventInvokeConfigOptions.getMaxEventAge()
onFailure
(IDestination onFailure) Sets the value ofEventInvokeConfigOptions.getOnFailure()
onSuccess
(IDestination onSuccess) Sets the value ofEventInvokeConfigOptions.getOnSuccess()
provisionedConcurrentExecutions
(Number provisionedConcurrentExecutions) Sets the value ofVersionOptions.getProvisionedConcurrentExecutions()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofVersionOptions.getRemovalPolicy()
retryAttempts
(Number retryAttempts) Sets the value ofEventInvokeConfigOptions.getRetryAttempts()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
codeSha256
Sets the value ofVersionOptions.getCodeSha256()
- Parameters:
codeSha256
- SHA256 of the version of the Lambda source code. Specify to validate that you're deploying the right version.- Returns:
this
-
description
Sets the value ofVersionOptions.getDescription()
- Parameters:
description
- Description of the version.- Returns:
this
-
provisionedConcurrentExecutions
@Stability(Stable) public VersionOptions.Builder provisionedConcurrentExecutions(Number provisionedConcurrentExecutions) Sets the value ofVersionOptions.getProvisionedConcurrentExecutions()
- Parameters:
provisionedConcurrentExecutions
- Specifies a provisioned concurrency configuration for a function's version.- Returns:
this
-
removalPolicy
Sets the value ofVersionOptions.getRemovalPolicy()
- Parameters:
removalPolicy
- Whether to retain old versions of this function when a new version is created.- Returns:
this
-
maxEventAge
Sets the value ofEventInvokeConfigOptions.getMaxEventAge()
- Parameters:
maxEventAge
- The maximum age of a request that Lambda sends to a function for processing. Minimum: 60 seconds Maximum: 6 hours- Returns:
this
-
onFailure
Sets the value ofEventInvokeConfigOptions.getOnFailure()
- Parameters:
onFailure
- The destination for failed invocations.- Returns:
this
-
onSuccess
Sets the value ofEventInvokeConfigOptions.getOnSuccess()
- Parameters:
onSuccess
- The destination for successful invocations.- Returns:
this
-
retryAttempts
Sets the value ofEventInvokeConfigOptions.getRetryAttempts()
- Parameters:
retryAttempts
- The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<VersionOptions>
- Returns:
- a new instance of
VersionOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-