KinesisSource
- class aws_cdk.aws_pipes_sources_alpha.KinesisSource(stream, *, starting_position, starting_position_timestamp=None, batch_size=None, dead_letter_target=None, maximum_batching_window=None, maximum_record_age=None, maximum_retry_attempts=None, on_partial_batch_item_failure=None, parallelization_factor=None)
Bases:
StreamSource
(experimental) A source that reads from Kinesis.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# source_stream: kinesis.Stream # target_queue: sqs.Queue pipe_source = sources.KinesisSource(source_stream, starting_position=sources.KinesisStartingPosition.LATEST ) pipe = pipes.Pipe(self, "Pipe", source=pipe_source, target=SqsTarget(target_queue) )
- Parameters:
stream (
IStream
) –starting_position (
KinesisStartingPosition
) – (experimental) The position in a stream from which to start reading.starting_position_timestamp (
Optional
[datetime
]) – (experimental) With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in ISO 8601 format. Default: - no starting position timestampbatch_size (
Union
[int
,float
,None
]) – (experimental) The maximum number of records to include in each batch. Default: 1dead_letter_target (
Union
[IQueue
,ITopic
,None
]) – (experimental) 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. Default: - no dead-letter queue or topicmaximum_batching_window (
Optional
[Duration
]) – (experimental) The maximum length of a time to wait for events. Default: - the events will be handled immediatelymaximum_record_age (
Optional
[Duration
]) – (experimental) 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. Default: -1 - EventBridge won’t discard old recordsmaximum_retry_attempts (
Union
[int
,float
,None
]) – (experimental) 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. Default: -1 - EventBridge will retry failed records until the record expires in the event sourceon_partial_batch_item_failure (
Optional
[OnPartialBatchItemFailure
]) – (experimental) Define how to handle item process failures. {@link OnPartialBatchItemFailure.AUTOMATIC_BISECT} halves each batch and will retry each half until all the records are processed or there is one failed message left in the batch. Default: off - EventBridge will retry the entire batchparallelization_factor (
Union
[int
,float
,None
]) – (experimental) The number of batches to process concurrently from each shard. Default: 1
- Stability:
experimental
Methods
- bind(_pipe)
(experimental) Bind the source to a pipe.
- Parameters:
_pipe (
IPipe
) –- Stability:
experimental
- Return type:
- grant_push(grantee, dead_letter_target=None)
(experimental) Grants the pipe role permission to publish to the dead-letter target.
- grant_read(grantee)
(experimental) Grant the pipe role read access to the source.
- Parameters:
grantee (
IRole
) –- Stability:
experimental
- Return type:
None
Attributes
- dead_letter_target
(experimental) The dead-letter SQS queue or SNS topic.
- Stability:
experimental
- source_arn
(experimental) The ARN of the source resource.
- Stability:
experimental
- source_parameters
(experimental) Base parameters for streaming sources.
- Stability:
experimental
Static Methods