Class BaseStreamEventSourceProps.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.eventsources.BaseStreamEventSourceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BaseStreamEventSourceProps>
- Enclosing interface:
BaseStreamEventSourceProps
@Stability(Stable)
public static final class BaseStreamEventSourceProps.Builder
extends Object
implements software.amazon.jsii.Builder<BaseStreamEventSourceProps>
A builder for
BaseStreamEventSourceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofBaseStreamEventSourceProps.getBatchSize()
build()
Builds the configured instance.Sets the value ofBaseStreamEventSourceProps.getEnabled()
maxBatchingWindow
(Duration maxBatchingWindow) Sets the value ofBaseStreamEventSourceProps.getMaxBatchingWindow()
provisionedPollerConfig
(ProvisionedPollerConfig provisionedPollerConfig) Sets the value ofBaseStreamEventSourceProps.getProvisionedPollerConfig()
startingPosition
(StartingPosition startingPosition) Sets the value ofBaseStreamEventSourceProps.getStartingPosition()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
startingPosition
@Stability(Stable) public BaseStreamEventSourceProps.Builder startingPosition(StartingPosition startingPosition) Sets the value ofBaseStreamEventSourceProps.getStartingPosition()
- Parameters:
startingPosition
- Where to begin consuming the stream. This parameter is required.- Returns:
this
-
batchSize
Sets the value ofBaseStreamEventSourceProps.getBatchSize()
- Parameters:
batchSize
- 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
andSelfManagedKafkaEventSource
- 1000 for
- Returns:
this
-
enabled
Sets the value ofBaseStreamEventSourceProps.getEnabled()
- Parameters:
enabled
- If the stream event source mapping should be enabled.- Returns:
this
-
maxBatchingWindow
@Stability(Stable) public BaseStreamEventSourceProps.Builder maxBatchingWindow(Duration maxBatchingWindow) Sets the value ofBaseStreamEventSourceProps.getMaxBatchingWindow()
- Parameters:
maxBatchingWindow
- The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5).- Returns:
this
-
provisionedPollerConfig
@Stability(Stable) public BaseStreamEventSourceProps.Builder provisionedPollerConfig(ProvisionedPollerConfig provisionedPollerConfig) Sets the value ofBaseStreamEventSourceProps.getProvisionedPollerConfig()
- Parameters:
provisionedPollerConfig
- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BaseStreamEventSourceProps>
- Returns:
- a new instance of
BaseStreamEventSourceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-