Class AliasOptions.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.AliasOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AliasOptions>
- Enclosing interface:
AliasOptions
@Stability(Stable)
public static final class AliasOptions.Builder
extends Object
implements software.amazon.jsii.Builder<AliasOptions>
A builder for
AliasOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadditionalVersions
(List<? extends VersionWeight> additionalVersions) Sets the value ofAliasOptions.getAdditionalVersions()
build()
Builds the configured instance.description
(String description) Sets the value ofAliasOptions.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 ofAliasOptions.getProvisionedConcurrentExecutions()
retryAttempts
(Number retryAttempts) Sets the value ofEventInvokeConfigOptions.getRetryAttempts()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
additionalVersions
@Stability(Stable) public AliasOptions.Builder additionalVersions(List<? extends VersionWeight> additionalVersions) Sets the value ofAliasOptions.getAdditionalVersions()
- Parameters:
additionalVersions
- Additional versions with individual weights this alias points to. Individual additional version weights specified here should add up to (less than) one. All remaining weight is routed to the default version.For example, the config is
version: "1" additionalVersions: [{ version: "2", weight: 0.05 }]
Then 5% of traffic will be routed to function version 2, while the remaining 95% of traffic will be routed to function version 1.
- Returns:
this
-
description
Sets the value ofAliasOptions.getDescription()
- Parameters:
description
- Description for the alias.- Returns:
this
-
provisionedConcurrentExecutions
@Stability(Stable) public AliasOptions.Builder provisionedConcurrentExecutions(Number provisionedConcurrentExecutions) Sets the value ofAliasOptions.getProvisionedConcurrentExecutions()
- Parameters:
provisionedConcurrentExecutions
- Specifies a provisioned concurrency configuration for a function's alias.- 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<AliasOptions>
- Returns:
- a new instance of
AliasOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-