Class SqsToLambdaProps.Builder

java.lang.Object
software.amazon.awsconstructs.services.sqslambda.SqsToLambdaProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<SqsToLambdaProps>
Enclosing interface:
SqsToLambdaProps

public static final class SqsToLambdaProps.Builder extends Object implements software.amazon.jsii.Builder<SqsToLambdaProps>
A builder for SqsToLambdaProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • deadLetterQueueProps

      public SqsToLambdaProps.Builder deadLetterQueueProps(software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps)
      Parameters:
      deadLetterQueueProps - Optional user provided properties for the dead letter queue.
      Returns:
      this
    • deployDeadLetterQueue

      public SqsToLambdaProps.Builder deployDeadLetterQueue(Boolean deployDeadLetterQueue)
      Parameters:
      deployDeadLetterQueue - Whether to deploy a secondary queue to be used as a dead letter queue.
      Returns:
      this
    • enableEncryptionWithCustomerManagedKey

      public SqsToLambdaProps.Builder enableEncryptionWithCustomerManagedKey(Boolean enableEncryptionWithCustomerManagedKey)
      Parameters:
      enableEncryptionWithCustomerManagedKey - If no key is provided, this flag determines whether the queue is encrypted with a new CMK or an AWS managed key. This flag is ignored if any of the following are defined: queueProps.encryptionMasterKey, encryptionKey or encryptionKeyProps.
      Returns:
      this
    • encryptionKey

      public SqsToLambdaProps.Builder encryptionKey(software.amazon.awscdk.services.kms.Key encryptionKey)
      Parameters:
      encryptionKey - An optional, imported encryption key to encrypt the SQS queue with.
      Returns:
      this
    • encryptionKeyProps

      public SqsToLambdaProps.Builder encryptionKeyProps(software.amazon.awscdk.services.kms.KeyProps encryptionKeyProps)
      Parameters:
      encryptionKeyProps - Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.
      Returns:
      this
    • existingLambdaObj

      public SqsToLambdaProps.Builder existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj)
      Parameters:
      existingLambdaObj - Optional - instance of an existing Lambda Function object, providing both this and lambdaFunctionProps will cause an error.
      Returns:
      this
    • existingQueueObj

      public SqsToLambdaProps.Builder existingQueueObj(software.amazon.awscdk.services.sqs.Queue existingQueueObj)
      Parameters:
      existingQueueObj - Existing instance of SQS queue object, Providing both this and queueProps will cause an error.
      Returns:
      this
    • lambdaFunctionProps

      public SqsToLambdaProps.Builder lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps)
      Parameters:
      lambdaFunctionProps - Optional - user provided props to override the default props for the Lambda function. Providing both this and existingLambdaObj causes an error.
      Returns:
      this
    • maxReceiveCount

      public SqsToLambdaProps.Builder maxReceiveCount(Number maxReceiveCount)
      Parameters:
      maxReceiveCount - The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue.
      Returns:
      this
    • queueProps

      public SqsToLambdaProps.Builder queueProps(software.amazon.awscdk.services.sqs.QueueProps queueProps)
      Parameters:
      queueProps - Optional - user provided properties to override the default properties for the SQS queue. Providing both this and existingQueueObj will cause an error.
      Returns:
      this
    • sqsEventSourceProps

      public SqsToLambdaProps.Builder sqsEventSourceProps(software.amazon.awscdk.services.lambda.eventsources.SqsEventSourceProps sqsEventSourceProps)
      Parameters:
      sqsEventSourceProps - Optional user provided properties for the queue event source.
      Returns:
      this
    • build

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