Class KinesisSourceParameters.Builder
java.lang.Object
software.amazon.awscdk.services.pipes.sources.alpha.KinesisSourceParameters.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<KinesisSourceParameters>
- Enclosing interface:
KinesisSourceParameters
@Stability(Experimental)
public static final class KinesisSourceParameters.Builder
extends Object
implements software.amazon.jsii.Builder<KinesisSourceParameters>
A builder for
KinesisSourceParameters
-
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()
startingPosition
(KinesisStartingPosition startingPosition) Sets the value ofKinesisSourceParameters.getStartingPosition()
startingPositionTimestamp
(Instant startingPositionTimestamp) Sets the value ofKinesisSourceParameters.getStartingPositionTimestamp()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
startingPosition
@Stability(Experimental) public KinesisSourceParameters.Builder startingPosition(KinesisStartingPosition startingPosition) Sets the value ofKinesisSourceParameters.getStartingPosition()
- Parameters:
startingPosition
- The position in a stream from which to start reading. This parameter is required.- Returns:
this
-
startingPositionTimestamp
@Stability(Experimental) public KinesisSourceParameters.Builder startingPositionTimestamp(Instant startingPositionTimestamp) Sets the value ofKinesisSourceParameters.getStartingPositionTimestamp()
- Parameters:
startingPositionTimestamp
- With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in ISO 8601 format.- Returns:
this
-
batchSize
Sets the value ofStreamSourceParameters.getBatchSize()
- Parameters:
batchSize
- The maximum number of records to include in each batch.- Returns:
this
-
deadLetterTarget
@Stability(Experimental) public KinesisSourceParameters.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 KinesisSourceParameters.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 KinesisSourceParameters.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 KinesisSourceParameters.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 KinesisSourceParameters.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 KinesisSourceParameters.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 KinesisSourceParameters.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<KinesisSourceParameters>
- Returns:
- a new instance of
KinesisSourceParameters
- Throws:
NullPointerException
- if any required attribute was not provided
-