Interface StreamEventSourceProps
- All Superinterfaces:
BaseStreamEventSourceProps
,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
DynamoEventSourceProps
,KinesisEventSourceProps
- All Known Implementing Classes:
DynamoEventSourceProps.Jsii$Proxy
,KinesisEventSourceProps.Jsii$Proxy
,StreamEventSourceProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.109.0 (build c221850)",
date="2025-03-14T03:25:00.728Z")
@Stability(Stable)
public interface StreamEventSourceProps
extends software.amazon.jsii.JsiiSerializable, BaseStreamEventSourceProps
The set of properties for streaming event sources shared by Dynamo and Kinesis.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.*; import software.amazon.awscdk.services.kms.*; import software.amazon.awscdk.services.lambda.*; import software.amazon.awscdk.services.lambda.eventsources.*; IEventSourceDlq eventSourceDlq; Object filters; Key key; StreamEventSourceProps streamEventSourceProps = StreamEventSourceProps.builder() .startingPosition(StartingPosition.TRIM_HORIZON) // the properties below are optional .batchSize(123) .bisectBatchOnError(false) .enabled(false) .filterEncryption(key) .filters(List.of(Map.of( "filtersKey", filters))) .maxBatchingWindow(Duration.minutes(30)) .maxRecordAge(Duration.minutes(30)) .metricsConfig(MetricsConfig.builder() .metrics(List.of(MetricType.EVENT_COUNT)) .build()) .onFailure(eventSourceDlq) .parallelizationFactor(123) .provisionedPollerConfig(ProvisionedPollerConfig.builder() .maximumPollers(123) .minimumPollers(123) .build()) .reportBatchItemFailures(false) .retryAttempts(123) .tumblingWindow(Duration.minutes(30)) .build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forStreamEventSourceProps
static final class
An implementation forStreamEventSourceProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Boolean
If the function returns an error, split the batch in two and retry.default IKey
Add Customer managed KMS key to encrypt Filter Criteria.Add filter criteria option.default Duration
The maximum age of a record that Lambda sends to a function for processing.default MetricsConfig
Configuration for enhanced monitoring metrics collection When specified, enables collection of additional metrics for the stream event source.default IEventSourceDlq
An Amazon S3, Amazon SQS queue or Amazon SNS topic destination for discarded records.default Number
The number of batches to process from each shard concurrently.default Boolean
Allow functions to return partially successful responses for a batch of records.default Number
Maximum number of retry attempts Valid Range: * Minimum value of 0 * Maximum value of 10000.default Duration
The size of the tumbling windows to group records sent to DynamoDB or Kinesis Valid Range: 0 - 15 minutes.Methods inherited from interface software.amazon.awscdk.services.lambda.eventsources.BaseStreamEventSourceProps
getBatchSize, getEnabled, getMaxBatchingWindow, getProvisionedPollerConfig, getStartingPosition
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBisectBatchOnError
If the function returns an error, split the batch in two and retry.Default: false
-
getFilterEncryption
Add Customer managed KMS key to encrypt Filter Criteria.Default: - none
- See Also:
-
getFilters
Add filter criteria option.Default: - None
-
getMaxRecordAge
The maximum age of a record that Lambda sends to a function for processing.Valid Range:
- Minimum value of 60 seconds
- Maximum value of 7 days
The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. Record are valid until it expires in the event source.
Default: -1
-
getMetricsConfig
Configuration for enhanced monitoring metrics collection When specified, enables collection of additional metrics for the stream event source.Default: - Enhanced monitoring is disabled
-
getOnFailure
An Amazon S3, Amazon SQS queue or Amazon SNS topic destination for discarded records.Default: - discarded records are ignored
-
getParallelizationFactor
The number of batches to process from each shard concurrently.Valid Range:
- Minimum value of 1
- Maximum value of 10
Default: 1
-
getReportBatchItemFailures
Allow functions to return partially successful responses for a batch of records.Default: false
- See Also:
-
getRetryAttempts
Maximum number of retry attempts Valid Range: * Minimum value of 0 * Maximum value of 10000.The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
Default: -1
-
getTumblingWindow
The size of the tumbling windows to group records sent to DynamoDB or Kinesis Valid Range: 0 - 15 minutes.Default: - None
-
builder
- Returns:
- a
StreamEventSourceProps.Builder
ofStreamEventSourceProps
-