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 Summary
Modifier and TypeMethodDescriptionbuild()consumerLambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps consumerLambdaFunctionProps) Optional user-provided properties to override the default properties for the consumer Lambda function.static LambdaToSqsToLambda.BuilderdeadLetterQueueProps(software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps) Optional user-provided props to override the default props for the dead letter queue.deployDeadLetterQueue(Boolean deployDeadLetterQueue) Whether to create a secondary queue to be used as a dead letter queue.Whether to deploy a new VPC.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.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.existingQueueObj(software.amazon.awscdk.services.sqs.Queue existingQueueObj) An optional, existing SQS queue to be used instead of the default queue.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).maxReceiveCount(Number maxReceiveCount) The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue.producerLambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps producerLambdaFunctionProps) Optional user-provided properties to override the default properties for the producer Lambda function.queueEnvironmentVariableName(String queueEnvironmentVariableName) Optional Name for the Lambda function environment variable set to the URL of the queue.queueProps(software.amazon.awscdk.services.sqs.QueueProps queueProps) Optional user-provided properties to override the default properties for the SQS queue.sqsEventSourceProps(software.amazon.awscdk.services.lambda.eventsources.SqsEventSourceProps sqsEventSourceProps) Optional user provided properties for the queue event source.vpcProps(software.amazon.awscdk.services.ec2.VpcProps vpcProps) Properties to override default properties if deployVpc is true.
-
Method Details
-
create
- Parameters:
scope-- represents the scope for all the resources.
id-- this is a a scope-unique id.
- 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
deployDeadLetterQueueproperty 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
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
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
consumerLambdaFunctionPropswill 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
producerLambdaFunctionPropsproperty 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
queuePropswill 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
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
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
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LambdaToSqsToLambda>- Returns:
- a newly built instance of
LambdaToSqsToLambda.
-