Interface BaseStreamEventSourceProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
DynamoEventSourceProps, KafkaEventSourceProps, KinesisEventSourceProps, ManagedKafkaEventSourceProps, SelfManagedKafkaEventSourceProps, StreamEventSourceProps
All Known Implementing Classes:
BaseStreamEventSourceProps.Jsii$Proxy, DynamoEventSourceProps.Jsii$Proxy, KafkaEventSourceProps.Jsii$Proxy, KinesisEventSourceProps.Jsii$Proxy, ManagedKafkaEventSourceProps.Jsii$Proxy, SelfManagedKafkaEventSourceProps.Jsii$Proxy, StreamEventSourceProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:03.999Z") @Stability(Stable) public interface BaseStreamEventSourceProps extends software.amazon.jsii.JsiiSerializable
The set of properties for streaming event sources shared by Dynamo, Kinesis and Kafka.

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.lambda.*;
 import software.amazon.awscdk.services.lambda.eventsources.*;
 BaseStreamEventSourceProps baseStreamEventSourceProps = BaseStreamEventSourceProps.builder()
         .startingPosition(StartingPosition.TRIM_HORIZON)
         // the properties below are optional
         .batchSize(123)
         .enabled(false)
         .maxBatchingWindow(Duration.minutes(30))
         .provisionedPollerConfig(ProvisionedPollerConfig.builder()
                 .maximumPollers(123)
                 .minimumPollers(123)
                 .build())
         .build();
 
  • Method Details

    • getStartingPosition

      @Stability(Stable) @NotNull StartingPosition getStartingPosition()
      Where to begin consuming the stream.
    • getBatchSize

      @Stability(Stable) @Nullable default Number getBatchSize()
      The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.

      Your function receives an event with all the retrieved records.

      Valid Range:

      • Minimum value of 1
      • Maximum value of:

        • 1000 for DynamoEventSource
        • 10000 for KinesisEventSource, ManagedKafkaEventSource and SelfManagedKafkaEventSource

      Default: 100

    • getEnabled

      @Stability(Stable) @Nullable default Boolean getEnabled()
      If the stream event source mapping should be enabled.

      Default: true

    • getMaxBatchingWindow

      @Stability(Stable) @Nullable default Duration getMaxBatchingWindow()
      The maximum amount of time to gather records before invoking the function.

      Maximum of Duration.minutes(5).

      Default: - Duration.seconds(0) for Kinesis, DynamoDB, and SQS event sources, Duration.millis(500) for MSK, self-managed Kafka, and Amazon MQ.

      See Also:
    • getProvisionedPollerConfig

      @Stability(Stable) @Nullable default ProvisionedPollerConfig getProvisionedPollerConfig()
      Configuration for provisioned pollers that read from the event source.

      When specified, allows control over the minimum and maximum number of pollers that can be provisioned to process events from the source.

      Default: - no provisioned pollers

    • builder

      @Stability(Stable) static BaseStreamEventSourceProps.Builder builder()
      Returns:
      a BaseStreamEventSourceProps.Builder of BaseStreamEventSourceProps