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 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

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

      @Stability(Stable) public Version.Builder onFailure(IDestination onFailure)
      The destination for failed invocations.

      Default: - no destination

      Parameters:
      onFailure - The destination for failed invocations. This parameter is required.
      Returns:
      this
    • onSuccess

      @Stability(Stable) public Version.Builder onSuccess(IDestination onSuccess)
      The destination for successful invocations.

      Default: - no destination

      Parameters:
      onSuccess - The destination for successful invocations. This parameter is required.
      Returns:
      this
    • retryAttempts

      @Stability(Stable) public Version.Builder retryAttempts(Number 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

      @Stability(Stable) public Version.Builder codeSha256(String 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

      @Stability(Stable) public Version.Builder description(String 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

      @Stability(Stable) public Version.Builder removalPolicy(RemovalPolicy 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

      @Stability(Stable) public Version.Builder lambda(IFunction lambda)
      Function to get the value of.

      Parameters:
      lambda - Function to get the value of. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public Version build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Version>
      Returns:
      a newly built instance of Version.