@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:11.504Z") @Stability(value=Experimental) public interface StreamEventSourceProps extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.services.lambda.*;
import software.amazon.awscdk.services.lambda.eventsources.*;
Duration duration;
IEventSourceDlq eventSourceDlq;
StreamEventSourceProps streamEventSourceProps = StreamEventSourceProps.builder()
.startingPosition(StartingPosition.TRIM_HORIZON)
// the properties below are optional
.batchSize(123)
.bisectBatchOnError(false)
.enabled(false)
.maxBatchingWindow(duration)
.maxRecordAge(duration)
.onFailure(eventSourceDlq)
.parallelizationFactor(123)
.reportBatchItemFailures(false)
.retryAttempts(123)
.tumblingWindow(duration)
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
StreamEventSourceProps.Builder
A builder for
StreamEventSourceProps |
static class |
StreamEventSourceProps.Jsii$Proxy
An implementation for
StreamEventSourceProps |
| Modifier and Type | Method and Description |
|---|---|
static StreamEventSourceProps.Builder |
builder() |
default Number |
getBatchSize()
(experimental) The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
|
default Boolean |
getBisectBatchOnError()
(experimental) If the function returns an error, split the batch in two and retry.
|
default Boolean |
getEnabled()
(experimental) If the stream event source mapping should be enabled.
|
default Duration |
getMaxBatchingWindow()
(experimental) The maximum amount of time to gather records before invoking the function.
|
default Duration |
getMaxRecordAge()
(experimental) The maximum age of a record that Lambda sends to a function for processing.
|
default IEventSourceDlq |
getOnFailure()
(experimental) An Amazon SQS queue or Amazon SNS topic destination for discarded records.
|
default Number |
getParallelizationFactor()
(experimental) The number of batches to process from each shard concurrently.
|
default Boolean |
getReportBatchItemFailures()
(experimental) Allow functions to return partially successful responses for a batch of records.
|
default Number |
getRetryAttempts()
(experimental) Maximum number of retry attempts Valid Range: * Minimum value of 0 * Maximum value of 10000.
|
StartingPosition |
getStartingPosition()
(experimental) Where to begin consuming the stream.
|
default Duration |
getTumblingWindow()
(experimental) The size of the tumbling windows to group records sent to DynamoDB or Kinesis Valid Range: 0 - 15 minutes.
|
@Stability(value=Experimental) @NotNull StartingPosition getStartingPosition()
@Stability(value=Experimental) @Nullable default Number getBatchSize()
Your function receives an event with all the retrieved records.
Valid Range:
Default: 100
@Stability(value=Experimental) @Nullable default Boolean getBisectBatchOnError()
Default: false
@Stability(value=Experimental) @Nullable default Boolean getEnabled()
Default: true
@Stability(value=Experimental) @Nullable default Duration getMaxBatchingWindow()
Maximum of Duration.minutes(5)
Default: Duration.seconds(0)
@Stability(value=Experimental) @Nullable default Duration getMaxRecordAge()
Valid Range:
Default: - the retention period configured on the stream
@Stability(value=Experimental) @Nullable default IEventSourceDlq getOnFailure()
Default: discarded records are ignored
@Stability(value=Experimental) @Nullable default Number getParallelizationFactor()
Valid Range:
Default: 1
@Stability(value=Experimental) @Nullable default Boolean getReportBatchItemFailures()
Default: false
https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting@Stability(value=Experimental) @Nullable default Number getRetryAttempts()
Default: - retry until the record expires
@Stability(value=Experimental) @Nullable default Duration getTumblingWindow()
Default: - None
@Stability(value=Experimental) static StreamEventSourceProps.Builder builder()
StreamEventSourceProps.Builder of StreamEventSourcePropsCopyright © 2022. All rights reserved.