Class SqsQueueProps.Builder
java.lang.Object
software.amazon.awscdk.services.events.targets.SqsQueueProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SqsQueueProps>
- Enclosing interface:
SqsQueueProps
@Stability(Stable)
public static final class SqsQueueProps.Builder
extends Object
implements software.amazon.jsii.Builder<SqsQueueProps>
A builder for
SqsQueueProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.deadLetterQueue
(IQueue deadLetterQueue) Sets the value ofTargetBaseProps.getDeadLetterQueue()
maxEventAge
(Duration maxEventAge) Sets the value ofTargetBaseProps.getMaxEventAge()
message
(RuleTargetInput message) Sets the value ofSqsQueueProps.getMessage()
messageGroupId
(String messageGroupId) Sets the value ofSqsQueueProps.getMessageGroupId()
retryAttempts
(Number retryAttempts) Sets the value ofTargetBaseProps.getRetryAttempts()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
message
Sets the value ofSqsQueueProps.getMessage()
- Parameters:
message
- The message to send to the queue. Must be a valid JSON text passed to the target queue.- Returns:
this
-
messageGroupId
Sets the value ofSqsQueueProps.getMessageGroupId()
- Parameters:
messageGroupId
- Message Group ID for messages sent to this queue. Required for FIFO queues, leave empty for regular queues.- Returns:
this
-
deadLetterQueue
Sets the value ofTargetBaseProps.getDeadLetterQueue()
- Parameters:
deadLetterQueue
- The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue. The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.- Returns:
this
-
maxEventAge
Sets the value ofTargetBaseProps.getMaxEventAge()
- Parameters:
maxEventAge
- The maximum age of a request that Lambda sends to a function for processing. Minimum value of 60. Maximum value of 86400.- Returns:
this
-
retryAttempts
Sets the value ofTargetBaseProps.getRetryAttempts()
- Parameters:
retryAttempts
- The maximum number of times to retry when the function returns an error. Minimum value of 0. Maximum value of 185.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SqsQueueProps>
- Returns:
- a new instance of
SqsQueueProps
- Throws:
NullPointerException
- if any required attribute was not provided
-