Class AliasProps.Builder

java.lang.Object
software.amazon.awscdk.services.lambda.AliasProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<AliasProps>
Enclosing interface:
AliasProps

@Stability(Stable) public static final class AliasProps.Builder extends Object implements software.amazon.jsii.Builder<AliasProps>
A builder for AliasProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • aliasName

      @Stability(Stable) public AliasProps.Builder aliasName(String aliasName)
      Sets the value of AliasProps.getAliasName()
      Parameters:
      aliasName - Name of this alias. This parameter is required.
      Returns:
      this
    • version

      @Stability(Stable) public AliasProps.Builder version(IVersion version)
      Sets the value of AliasProps.getVersion()
      Parameters:
      version - Function version this alias refers to. This parameter is required. Use lambda.currentVersion to reference a version with your latest changes.
      Returns:
      this
    • additionalVersions

      @Stability(Stable) public AliasProps.Builder additionalVersions(List<? extends VersionWeight> additionalVersions)
      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

      @Stability(Stable) public AliasProps.Builder description(String description)
      Parameters:
      description - Description for the alias.
      Returns:
      this
    • provisionedConcurrentExecutions

      @Stability(Stable) public AliasProps.Builder provisionedConcurrentExecutions(Number provisionedConcurrentExecutions)
      Parameters:
      provisionedConcurrentExecutions - Specifies a provisioned concurrency configuration for a function's alias.
      Returns:
      this
    • maxEventAge

      @Stability(Stable) public AliasProps.Builder maxEventAge(Duration maxEventAge)
      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

      @Stability(Stable) public AliasProps.Builder onFailure(IDestination onFailure)
      Parameters:
      onFailure - The destination for failed invocations.
      Returns:
      this
    • onSuccess

      @Stability(Stable) public AliasProps.Builder onSuccess(IDestination onSuccess)
      Parameters:
      onSuccess - The destination for successful invocations.
      Returns:
      this
    • retryAttempts

      @Stability(Stable) public AliasProps.Builder retryAttempts(Number retryAttempts)
      Parameters:
      retryAttempts - The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2
      Returns:
      this
    • build

      @Stability(Stable) public AliasProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<AliasProps>
      Returns:
      a new instance of AliasProps
      Throws:
      NullPointerException - if any required attribute was not provided