Class SqsToLambda.Builder

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

public static final class SqsToLambda.Builder extends Object implements software.amazon.jsii.Builder<SqsToLambda>
A fluent builder for SqsToLambda.
  • Method Details

    • create

      public static SqsToLambda.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope -
      • represents the scope for all the resources.
      This parameter is required.
      id -
      • this is a a scope-unique id.
      This parameter is required.
      Returns:
      a new instance of SqsToLambda.Builder.
    • deadLetterQueueProps

      public SqsToLambda.Builder deadLetterQueueProps(software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps)
      Optional user provided properties for the dead letter queue.

      Default: - Default props are used

      Parameters:
      deadLetterQueueProps - Optional user provided properties for the dead letter queue. This parameter is required.
      Returns:
      this
    • deployDeadLetterQueue

      public SqsToLambda.Builder deployDeadLetterQueue(Boolean deployDeadLetterQueue)
      Whether to deploy a secondary queue to be used as a dead letter queue.

      Default: - true.

      Parameters:
      deployDeadLetterQueue - Whether to deploy a secondary queue to be used as a dead letter queue. This parameter is required.
      Returns:
      this
    • enableEncryptionWithCustomerManagedKey

      public SqsToLambda.Builder enableEncryptionWithCustomerManagedKey(Boolean 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.

      Default: - False if queueProps.encryptionMasterKey, encryptionKey, and encryptionKeyProps are all undefined.

      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 parameter is required.
      Returns:
      this
    • encryptionKey

      public SqsToLambda.Builder encryptionKey(software.amazon.awscdk.services.kms.Key encryptionKey)
      An optional, imported encryption key to encrypt the SQS queue with.

      Default: - None

      Parameters:
      encryptionKey - An optional, imported encryption key to encrypt the SQS queue with. This parameter is required.
      Returns:
      this
    • encryptionKeyProps

      public SqsToLambda.Builder encryptionKeyProps(software.amazon.awscdk.services.kms.KeyProps encryptionKeyProps)
      Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with.

      Default: - None

      Parameters:
      encryptionKeyProps - Optional user provided properties to override the default properties for the KMS encryption key used to encrypt the SQS queue with. This parameter is required.
      Returns:
      this
    • existingLambdaObj

      public SqsToLambda.Builder existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj)
      Existing instance of Lambda Function object, providing both this and lambdaFunctionProps will cause an error.

      Default: - None

      Parameters:
      existingLambdaObj - Existing instance of Lambda Function object, providing both this and lambdaFunctionProps will cause an error. This parameter is required.
      Returns:
      this
    • existingQueueObj

      public SqsToLambda.Builder existingQueueObj(software.amazon.awscdk.services.sqs.Queue existingQueueObj)
      Existing instance of SQS queue object, Providing both this and queueProps will cause an error.

      Default: - Default props are used

      Parameters:
      existingQueueObj - Existing instance of SQS queue object, Providing both this and queueProps will cause an error. This parameter is required.
      Returns:
      this
    • lambdaFunctionProps

      public SqsToLambda.Builder lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps)
      User provided props to override the default props for the Lambda function.

      Default: - Default properties are used.

      Parameters:
      lambdaFunctionProps - User provided props to override the default props for the Lambda function. This parameter is required.
      Returns:
      this
    • maxReceiveCount

      public SqsToLambda.Builder maxReceiveCount(Number maxReceiveCount)
      The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue.

      Default: - required field if deployDeadLetterQueue=true.

      Parameters:
      maxReceiveCount - The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. This parameter is required.
      Returns:
      this
    • queueProps

      public SqsToLambda.Builder queueProps(software.amazon.awscdk.services.sqs.QueueProps queueProps)
      Optional user provided properties.

      Default: - Default props are used

      Parameters:
      queueProps - Optional user provided properties. This parameter is required.
      Returns:
      this
    • sqsEventSourceProps

      public SqsToLambda.Builder sqsEventSourceProps(software.amazon.awscdk.services.lambda.eventsources.SqsEventSourceProps sqsEventSourceProps)
      Optional user provided properties for the queue event source.

      Default: - Default props are used

      Parameters:
      sqsEventSourceProps - Optional user provided properties for the queue event source. This parameter is required.
      Returns:
      this
    • build

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