Class CodeConfig.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • image

      @Stability(Stable) public CodeConfig.Builder image(CodeImageConfig image)
      Sets the value of CodeConfig.getImage()
      Parameters:
      image - Docker image configuration (mutually exclusive with s3Location and inlineCode).
      Returns:
      this
    • inlineCode

      @Stability(Stable) public CodeConfig.Builder inlineCode(String inlineCode)
      Sets the value of CodeConfig.getInlineCode()
      Parameters:
      inlineCode - Inline code (mutually exclusive with s3Location and image).
      Returns:
      this
    • s3Location

      @Stability(Stable) public CodeConfig.Builder s3Location(Location s3Location)
      Sets the value of CodeConfig.getS3Location()
      Parameters:
      s3Location - The location of the code in S3 (mutually exclusive with inlineCode and image).
      Returns:
      this
    • sourceKmsKeyArn

      @Stability(Stable) public CodeConfig.Builder sourceKmsKeyArn(String sourceKmsKeyArn)
      Sets the value of
      invalid @link
      CodeConfig#getSourceKmsKeyArn
      Parameters:
      sourceKmsKeyArn - The ARN of the KMS key used to encrypt the handler code.
      Returns:
      this
    • build

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