Class KafkaEventSourceProps.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.eventsources.KafkaEventSourceProps.Builder
- All Implemented Interfaces:
- software.amazon.jsii.Builder<KafkaEventSourceProps>
- Enclosing interface:
- KafkaEventSourceProps
@Stability(Stable)
public static final class KafkaEventSourceProps.Builder
extends Object
implements software.amazon.jsii.Builder<KafkaEventSourceProps>
A builder for 
KafkaEventSourceProps- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionSets the value ofBaseStreamEventSourceProps.getBatchSize()build()Builds the configured instance.Sets the value ofBaseStreamEventSourceProps.getEnabled()maxBatchingWindow(Duration maxBatchingWindow) Sets the value ofBaseStreamEventSourceProps.getMaxBatchingWindow()Sets the value ofKafkaEventSourceProps.getSecret()startingPosition(StartingPosition startingPosition) Sets the value ofBaseStreamEventSourceProps.getStartingPosition()Sets the value ofKafkaEventSourceProps.getTopic()
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
topicSets the value ofKafkaEventSourceProps.getTopic()- Parameters:
- topic- The Kafka topic to subscribe to. This parameter is required.
- Returns:
- this
 
- 
secretSets the value ofKafkaEventSourceProps.getSecret()- Parameters:
- secret- The secret with the Kafka credentials, see https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html for details This field is required if your Kafka brokers are accessed over the Internet.
- Returns:
- this
 
- 
startingPosition@Stability(Stable) public KafkaEventSourceProps.Builder startingPosition(StartingPosition startingPosition) Sets the value ofBaseStreamEventSourceProps.getStartingPosition()- Parameters:
- startingPosition- Where to begin consuming the stream. This parameter is required.
- Returns:
- this
 
- 
batchSizeSets 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,- ManagedKafkaEventSourceand- SelfManagedKafkaEventSource
- Returns:
- this
 
- 
enabledSets the value ofBaseStreamEventSourceProps.getEnabled()- Parameters:
- enabled- If the stream event source mapping should be enabled.
- Returns:
- this
 
- 
maxBatchingWindow@Stability(Stable) public KafkaEventSourceProps.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
 
- 
buildBuilds the configured instance.- Specified by:
- buildin interface- software.amazon.jsii.Builder<KafkaEventSourceProps>
- Returns:
- a new instance of KafkaEventSourceProps
- Throws:
- NullPointerException- if any required attribute was not provided
 
 
-