Class LambdaToSqsToLambda.Builder

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

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

    • create

      public static LambdaToSqsToLambda.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 LambdaToSqsToLambda.Builder.
    • consumerLambdaFunctionProps

      public LambdaToSqsToLambda.Builder consumerLambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps consumerLambdaFunctionProps)
      Optional user-provided properties to override the default properties for the consumer Lambda function.

      Default: - Default properties are used.

      Parameters:
      consumerLambdaFunctionProps - Optional user-provided properties to override the default properties for the consumer Lambda function. This parameter is required.
      Returns:
      this
    • deadLetterQueueProps

      public LambdaToSqsToLambda.Builder deadLetterQueueProps(software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps)
      Optional user-provided props to override the default props for the dead letter queue.

      Only used if the deployDeadLetterQueue property is set to true.

      Default: - Default props are used.

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

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

      Defaults to true.

      Default: - true.

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

      public LambdaToSqsToLambda.Builder deployVpc(Boolean deployVpc)
      Whether to deploy a new VPC.

      Default: - false

      Parameters:
      deployVpc - Whether to deploy a new VPC. This parameter is required.
      Returns:
      this
    • existingConsumerLambdaObj

      public LambdaToSqsToLambda.Builder existingConsumerLambdaObj(software.amazon.awscdk.services.lambda.Function existingConsumerLambdaObj)
      An optional, existing Lambda function to be used instead of the default function for receiving/consuming messages from the queue.

      Providing both this and consumerLambdaFunctionProps will cause an error.

      Default: - None.

      Parameters:
      existingConsumerLambdaObj - An optional, existing Lambda function to be used instead of the default function for receiving/consuming messages from the queue. This parameter is required.
      Returns:
      this
    • existingProducerLambdaObj

      public LambdaToSqsToLambda.Builder existingProducerLambdaObj(software.amazon.awscdk.services.lambda.Function existingProducerLambdaObj)
      An optional, existing Lambda function to be used instead of the default function for sending messages to the queue.

      Providing both this and producerLambdaFunctionProps property will cause an error.

      Default: - None.

      Parameters:
      existingProducerLambdaObj - An optional, existing Lambda function to be used instead of the default function for sending messages to the queue. This parameter is required.
      Returns:
      this
    • existingQueueObj

      public LambdaToSqsToLambda.Builder existingQueueObj(software.amazon.awscdk.services.sqs.Queue existingQueueObj)
      An optional, existing SQS queue to be used instead of the default queue.

      Providing both this and queueProps will cause an error.

      Default: - None.

      Parameters:
      existingQueueObj - An optional, existing SQS queue to be used instead of the default queue. This parameter is required.
      Returns:
      this
    • existingVpc

      public LambdaToSqsToLambda.Builder existingVpc(software.amazon.awscdk.services.ec2.IVpc existingVpc)
      An existing VPC for the construct to use (construct will NOT create a new VPC in this case).

      Parameters:
      existingVpc - An existing VPC for the construct to use (construct will NOT create a new VPC in this case). This parameter is required.
      Returns:
      this
    • maxReceiveCount

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

      Defaults to 15.

      Default: - 15.

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

      public LambdaToSqsToLambda.Builder producerLambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps producerLambdaFunctionProps)
      Optional user-provided properties to override the default properties for the producer Lambda function.

      Default: - Default properties are used.

      Parameters:
      producerLambdaFunctionProps - Optional user-provided properties to override the default properties for the producer Lambda function. This parameter is required.
      Returns:
      this
    • queueEnvironmentVariableName

      public LambdaToSqsToLambda.Builder queueEnvironmentVariableName(String queueEnvironmentVariableName)
      Optional Name for the Lambda function environment variable set to the URL of the queue.

      Default: - SQS_QUEUE_URL

      Parameters:
      queueEnvironmentVariableName - Optional Name for the Lambda function environment variable set to the URL of the queue. This parameter is required.
      Returns:
      this
    • queueProps

      public LambdaToSqsToLambda.Builder queueProps(software.amazon.awscdk.services.sqs.QueueProps queueProps)
      Optional user-provided properties to override the default properties for the SQS queue.

      Default: - Default props are used.

      Parameters:
      queueProps - Optional user-provided properties to override the default properties for the SQS queue. This parameter is required.
      Returns:
      this
    • sqsEventSourceProps

      public LambdaToSqsToLambda.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
    • vpcProps

      public LambdaToSqsToLambda.Builder vpcProps(software.amazon.awscdk.services.ec2.VpcProps vpcProps)
      Properties to override default properties if deployVpc is true.

      Parameters:
      vpcProps - Properties to override default properties if deployVpc is true. This parameter is required.
      Returns:
      this
    • build

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