Class LambdaToSqsToLambdaProps.Builder
java.lang.Object
software.amazon.awsconstructs.services.lambdasqslambda.LambdaToSqsToLambdaProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LambdaToSqsToLambdaProps>
- Enclosing interface:
LambdaToSqsToLambdaProps
public static final class LambdaToSqsToLambdaProps.Builder
extends Object
implements software.amazon.jsii.Builder<LambdaToSqsToLambdaProps>
A builder for
LambdaToSqsToLambdaProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.consumerLambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps consumerLambdaFunctionProps) Sets the value ofLambdaToSqsToLambdaProps.getConsumerLambdaFunctionProps()deadLetterQueueProps(software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps) Sets the value ofLambdaToSqsToLambdaProps.getDeadLetterQueueProps()deployDeadLetterQueue(Boolean deployDeadLetterQueue) Sets the value ofLambdaToSqsToLambdaProps.getDeployDeadLetterQueue()Sets the value ofLambdaToSqsToLambdaProps.getDeployVpc()existingConsumerLambdaObj(software.amazon.awscdk.services.lambda.Function existingConsumerLambdaObj) Sets the value ofLambdaToSqsToLambdaProps.getExistingConsumerLambdaObj()existingProducerLambdaObj(software.amazon.awscdk.services.lambda.Function existingProducerLambdaObj) Sets the value ofLambdaToSqsToLambdaProps.getExistingProducerLambdaObj()existingQueueObj(software.amazon.awscdk.services.sqs.Queue existingQueueObj) Sets the value ofLambdaToSqsToLambdaProps.getExistingQueueObj()existingVpc(software.amazon.awscdk.services.ec2.IVpc existingVpc) Sets the value ofLambdaToSqsToLambdaProps.getExistingVpc()maxReceiveCount(Number maxReceiveCount) Sets the value ofLambdaToSqsToLambdaProps.getMaxReceiveCount()producerLambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps producerLambdaFunctionProps) Sets the value ofLambdaToSqsToLambdaProps.getProducerLambdaFunctionProps()queueEnvironmentVariableName(String queueEnvironmentVariableName) Sets the value ofLambdaToSqsToLambdaProps.getQueueEnvironmentVariableName()queueProps(software.amazon.awscdk.services.sqs.QueueProps queueProps) Sets the value ofLambdaToSqsToLambdaProps.getQueueProps()sqsEventSourceProps(software.amazon.awscdk.services.lambda.eventsources.SqsEventSourceProps sqsEventSourceProps) Sets the value ofLambdaToSqsToLambdaProps.getSqsEventSourceProps()vpcProps(software.amazon.awscdk.services.ec2.VpcProps vpcProps) Sets the value ofLambdaToSqsToLambdaProps.getVpcProps()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
consumerLambdaFunctionProps
public LambdaToSqsToLambdaProps.Builder consumerLambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps consumerLambdaFunctionProps) Sets the value ofLambdaToSqsToLambdaProps.getConsumerLambdaFunctionProps()- Parameters:
consumerLambdaFunctionProps- Optional user-provided properties to override the default properties for the consumer Lambda function.- Returns:
this
-
deadLetterQueueProps
public LambdaToSqsToLambdaProps.Builder deadLetterQueueProps(software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps) Sets the value ofLambdaToSqsToLambdaProps.getDeadLetterQueueProps()- Parameters:
deadLetterQueueProps- Optional user-provided props to override the default props for the dead letter queue. Only used if thedeployDeadLetterQueueproperty is set to true.- Returns:
this
-
deployDeadLetterQueue
Sets the value ofLambdaToSqsToLambdaProps.getDeployDeadLetterQueue()- Parameters:
deployDeadLetterQueue- Whether to create a secondary queue to be used as a dead letter queue. Defaults totrue.- Returns:
this
-
deployVpc
Sets the value ofLambdaToSqsToLambdaProps.getDeployVpc()- Parameters:
deployVpc- Whether to deploy a new VPC.- Returns:
this
-
existingConsumerLambdaObj
public LambdaToSqsToLambdaProps.Builder existingConsumerLambdaObj(software.amazon.awscdk.services.lambda.Function existingConsumerLambdaObj) Sets the value ofLambdaToSqsToLambdaProps.getExistingConsumerLambdaObj()- Parameters:
existingConsumerLambdaObj- An optional, existing Lambda function to be used instead of the default function for receiving/consuming messages from the queue. Providing both this andconsumerLambdaFunctionPropswill cause an error.- Returns:
this
-
existingProducerLambdaObj
public LambdaToSqsToLambdaProps.Builder existingProducerLambdaObj(software.amazon.awscdk.services.lambda.Function existingProducerLambdaObj) Sets the value ofLambdaToSqsToLambdaProps.getExistingProducerLambdaObj()- Parameters:
existingProducerLambdaObj- An optional, existing Lambda function to be used instead of the default function for sending messages to the queue. Providing both this andproducerLambdaFunctionPropsproperty will cause an error.- Returns:
this
-
existingQueueObj
public LambdaToSqsToLambdaProps.Builder existingQueueObj(software.amazon.awscdk.services.sqs.Queue existingQueueObj) Sets the value ofLambdaToSqsToLambdaProps.getExistingQueueObj()- Parameters:
existingQueueObj- An optional, existing SQS queue to be used instead of the default queue. Providing both this andqueuePropswill cause an error.- Returns:
this
-
existingVpc
public LambdaToSqsToLambdaProps.Builder existingVpc(software.amazon.awscdk.services.ec2.IVpc existingVpc) Sets the value ofLambdaToSqsToLambdaProps.getExistingVpc()- Parameters:
existingVpc- An existing VPC for the construct to use (construct will NOT create a new VPC in this case).- Returns:
this
-
maxReceiveCount
Sets the value ofLambdaToSqsToLambdaProps.getMaxReceiveCount()- Parameters:
maxReceiveCount- The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. Defaults to15.- Returns:
this
-
producerLambdaFunctionProps
public LambdaToSqsToLambdaProps.Builder producerLambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps producerLambdaFunctionProps) Sets the value ofLambdaToSqsToLambdaProps.getProducerLambdaFunctionProps()- Parameters:
producerLambdaFunctionProps- Optional user-provided properties to override the default properties for the producer Lambda function.- Returns:
this
-
queueEnvironmentVariableName
public LambdaToSqsToLambdaProps.Builder queueEnvironmentVariableName(String queueEnvironmentVariableName) Sets the value ofLambdaToSqsToLambdaProps.getQueueEnvironmentVariableName()- Parameters:
queueEnvironmentVariableName- Optional Name for the Lambda function environment variable set to the URL of the queue.- Returns:
this
-
queueProps
public LambdaToSqsToLambdaProps.Builder queueProps(software.amazon.awscdk.services.sqs.QueueProps queueProps) Sets the value ofLambdaToSqsToLambdaProps.getQueueProps()- Parameters:
queueProps- Optional user-provided properties to override the default properties for the SQS queue.- Returns:
this
-
sqsEventSourceProps
public LambdaToSqsToLambdaProps.Builder sqsEventSourceProps(software.amazon.awscdk.services.lambda.eventsources.SqsEventSourceProps sqsEventSourceProps) Sets the value ofLambdaToSqsToLambdaProps.getSqsEventSourceProps()- Parameters:
sqsEventSourceProps- Optional user provided properties for the queue event source.- Returns:
this
-
vpcProps
public LambdaToSqsToLambdaProps.Builder vpcProps(software.amazon.awscdk.services.ec2.VpcProps vpcProps) Sets the value ofLambdaToSqsToLambdaProps.getVpcProps()- Parameters:
vpcProps- Properties to override default properties if deployVpc is true.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LambdaToSqsToLambdaProps>- Returns:
- a new instance of
LambdaToSqsToLambdaProps - Throws:
NullPointerException- if any required attribute was not provided
-