Class VersionProps.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.VersionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<VersionProps>
- Enclosing interface:
VersionProps
@Stability(Stable)
public static final class VersionProps.Builder
extends Object
implements software.amazon.jsii.Builder<VersionProps>
A builder for
VersionProps
-
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()
Sets the value ofVersionProps.getLambda()
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
-
lambda
Sets the value ofVersionProps.getLambda()
- Parameters:
lambda
- Function to get the value of. This parameter is required.- Returns:
this
-
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 VersionProps.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<VersionProps>
- Returns:
- a new instance of
VersionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-