Class ManagedKafkaEventSource.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.eventsources.ManagedKafkaEventSource.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ManagedKafkaEventSource>
- Enclosing class:
- ManagedKafkaEventSource
@Stability(Stable)
public static final class ManagedKafkaEventSource.Builder
extends Object
implements software.amazon.jsii.Builder<ManagedKafkaEventSource>
A fluent builder for
ManagedKafkaEventSource
.-
Method Summary
Modifier and TypeMethodDescriptionThe largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.build()
clusterArn
(String clusterArn) An MSK cluster construct.create()
If the stream event source mapping should be enabled.maxBatchingWindow
(Duration maxBatchingWindow) The maximum amount of time to gather records before invoking the function.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.startingPosition
(StartingPosition startingPosition) Where to begin consuming the stream.The Kafka topic to subscribe to.
-
Method Details
-
create
- Returns:
- a new instance of
ManagedKafkaEventSource.Builder
.
-
startingPosition
@Stability(Stable) public ManagedKafkaEventSource.Builder startingPosition(StartingPosition startingPosition) Where to begin consuming the stream.- Parameters:
startingPosition
- Where to begin consuming the stream. This parameter is required.- Returns:
this
-
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 forKinesisEventSource
,ManagedKafkaEventSource
andSelfManagedKafkaEventSource
Default: 100
- Parameters:
batchSize
- The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function. This parameter is required.- Returns:
this
-
enabled
If the stream event source mapping should be enabled.Default: true
- Parameters:
enabled
- If the stream event source mapping should be enabled. This parameter is required.- Returns:
this
-
maxBatchingWindow
@Stability(Stable) public ManagedKafkaEventSource.Builder maxBatchingWindow(Duration maxBatchingWindow) The maximum amount of time to gather records before invoking the function.Maximum of Duration.minutes(5)
Default: Duration.seconds(0)
- Parameters:
maxBatchingWindow
- The maximum amount of time to gather records before invoking the function. This parameter is required.- Returns:
this
-
topic
The Kafka topic to subscribe to.- Parameters:
topic
- The Kafka topic to subscribe to. This parameter is required.- Returns:
this
-
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.Default: none
- 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. This parameter is required.- Returns:
this
-
clusterArn
An MSK cluster construct.- Parameters:
clusterArn
- An MSK cluster construct. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ManagedKafkaEventSource>
- Returns:
- a newly built instance of
ManagedKafkaEventSource
.
-