Class StreamSourceParameters.Builder
java.lang.Object
software.amazon.awscdk.services.pipes.sources.alpha.StreamSourceParameters.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<StreamSourceParameters>
- Enclosing interface:
StreamSourceParameters
@Stability(Experimental)
public static final class StreamSourceParameters.Builder
extends Object
implements software.amazon.jsii.Builder<StreamSourceParameters>
A builder for
StreamSourceParameters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofStreamSourceParameters.getBatchSize()
build()
Builds the configured instance.deadLetterTarget
(ITopic deadLetterTarget) Sets the value ofStreamSourceParameters.getDeadLetterTarget()
deadLetterTarget
(IQueue deadLetterTarget) Sets the value ofStreamSourceParameters.getDeadLetterTarget()
maximumBatchingWindow
(Duration maximumBatchingWindow) Sets the value ofStreamSourceParameters.getMaximumBatchingWindow()
maximumRecordAge
(Duration maximumRecordAge) Sets the value ofStreamSourceParameters.getMaximumRecordAge()
maximumRetryAttempts
(Number maximumRetryAttempts) Sets the value ofStreamSourceParameters.getMaximumRetryAttempts()
onPartialBatchItemFailure
(OnPartialBatchItemFailure onPartialBatchItemFailure) Sets the value ofStreamSourceParameters.getOnPartialBatchItemFailure()
parallelizationFactor
(Number parallelizationFactor) Sets the value ofStreamSourceParameters.getParallelizationFactor()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
batchSize
Sets the value ofStreamSourceParameters.getBatchSize()
- Parameters:
batchSize
- The maximum number of records to include in each batch.- Returns:
this
-
deadLetterTarget
@Stability(Experimental) public StreamSourceParameters.Builder deadLetterTarget(IQueue deadLetterTarget) Sets the value ofStreamSourceParameters.getDeadLetterTarget()
- Parameters:
deadLetterTarget
- Define the target to send dead-letter queue events to. The dead-letter queue stores any events that are not successfully delivered to a Pipes target after all retry attempts are exhausted. You can then resolve the issue that caused the failed invocations and replay the events at a later time. In some cases, such as when access is denied to a resource, events are sent directly to the dead-letter queue and are not retried.- Returns:
this
-
deadLetterTarget
@Stability(Experimental) public StreamSourceParameters.Builder deadLetterTarget(ITopic deadLetterTarget) Sets the value ofStreamSourceParameters.getDeadLetterTarget()
- Parameters:
deadLetterTarget
- Define the target to send dead-letter queue events to. The dead-letter queue stores any events that are not successfully delivered to a Pipes target after all retry attempts are exhausted. You can then resolve the issue that caused the failed invocations and replay the events at a later time. In some cases, such as when access is denied to a resource, events are sent directly to the dead-letter queue and are not retried.- Returns:
this
-
maximumBatchingWindow
@Stability(Experimental) public StreamSourceParameters.Builder maximumBatchingWindow(Duration maximumBatchingWindow) Sets the value ofStreamSourceParameters.getMaximumBatchingWindow()
- Parameters:
maximumBatchingWindow
- The maximum length of a time to wait for events.- Returns:
this
-
maximumRecordAge
@Stability(Experimental) public StreamSourceParameters.Builder maximumRecordAge(Duration maximumRecordAge) Sets the value ofStreamSourceParameters.getMaximumRecordAge()
- Parameters:
maximumRecordAge
- Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, EventBridge never discards old records.- Returns:
this
-
maximumRetryAttempts
@Stability(Experimental) public StreamSourceParameters.Builder maximumRetryAttempts(Number maximumRetryAttempts) Sets the value ofStreamSourceParameters.getMaximumRetryAttempts()
- Parameters:
maximumRetryAttempts
- Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, EventBridge retries failed records until the record expires in the event source.- Returns:
this
-
onPartialBatchItemFailure
@Stability(Experimental) public StreamSourceParameters.Builder onPartialBatchItemFailure(OnPartialBatchItemFailure onPartialBatchItemFailure) Sets the value ofStreamSourceParameters.getOnPartialBatchItemFailure()
- Parameters:
onPartialBatchItemFailure
- Define how to handle item process failures.invalid @link
OnPartialBatchItemFailure.AUTOMATIC_BISECT
- Returns:
this
-
parallelizationFactor
@Stability(Experimental) public StreamSourceParameters.Builder parallelizationFactor(Number parallelizationFactor) Sets the value ofStreamSourceParameters.getParallelizationFactor()
- Parameters:
parallelizationFactor
- The number of batches to process concurrently from each shard.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<StreamSourceParameters>
- Returns:
- a new instance of
StreamSourceParameters
- Throws:
NullPointerException
- if any required attribute was not provided
-