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 Summary
Modifier and TypeMethodDescriptionbuild()static SqsToLambda.BuilderdeadLetterQueueProps(software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps) Optional user provided properties for the dead letter queue.deployDeadLetterQueue(Boolean deployDeadLetterQueue) Whether to deploy a secondary queue to be used as a dead letter queue.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.encryptionKey(software.amazon.awscdk.services.kms.Key encryptionKey) An optional, imported encryption key to encrypt the SQS queue with.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.existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill cause an error.existingQueueObj(software.amazon.awscdk.services.sqs.Queue existingQueueObj) Existing instance of SQS queue object, Providing both this and queueProps will cause an error.lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) User provided props to override the default props for the Lambda function.maxReceiveCount(Number maxReceiveCount) The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue.queueProps(software.amazon.awscdk.services.sqs.QueueProps queueProps) Optional user provided properties.sqsEventSourceProps(software.amazon.awscdk.services.lambda.eventsources.SqsEventSourceProps sqsEventSourceProps) Optional user provided properties for the queue event source.
-
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
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
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
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 andlambdaFunctionPropswill cause an error.Default: - None
- Parameters:
existingLambdaObj- Existing instance of Lambda Function object, providing both this andlambdaFunctionPropswill 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
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
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
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<SqsToLambda>- Returns:
- a newly built instance of
SqsToLambda.
-