public static final class ManagedKafkaEventSource.Builder
extends java.lang.Object
ManagedKafkaEventSource
.Modifier and Type | Method and Description |
---|---|
ManagedKafkaEventSource.Builder |
batchSize(java.lang.Number batchSize)
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
|
ManagedKafkaEventSource |
build() |
ManagedKafkaEventSource.Builder |
clusterArn(java.lang.String clusterArn)
An MSK cluster construct.
|
static ManagedKafkaEventSource.Builder |
create() |
ManagedKafkaEventSource.Builder |
enabled(java.lang.Boolean enabled)
If the stream event source mapping should be enabled.
|
ManagedKafkaEventSource.Builder |
maxBatchingWindow(Duration maxBatchingWindow)
The maximum amount of time to gather records before invoking the function.
|
ManagedKafkaEventSource.Builder |
secret(ISecret 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.
|
ManagedKafkaEventSource.Builder |
startingPosition(StartingPosition startingPosition)
Where to begin consuming the stream.
|
ManagedKafkaEventSource.Builder |
topic(java.lang.String topic)
The Kafka topic to subscribe to.
|
public static ManagedKafkaEventSource.Builder create()
ManagedKafkaEventSource.Builder
.public ManagedKafkaEventSource.Builder startingPosition(StartingPosition startingPosition)
startingPosition
- Where to begin consuming the stream. This parameter is required.this
public ManagedKafkaEventSource.Builder batchSize(java.lang.Number batchSize)
Your function receives an event with all the retrieved records.
Valid Range:
Default: 100
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.this
public ManagedKafkaEventSource.Builder enabled(java.lang.Boolean enabled)
Default: true
enabled
- If the stream event source mapping should be enabled. This parameter is required.this
public ManagedKafkaEventSource.Builder maxBatchingWindow(Duration maxBatchingWindow)
Maximum of Duration.minutes(5)
Default: Duration.seconds(0)
maxBatchingWindow
- The maximum amount of time to gather records before invoking the function. This parameter is required.this
public ManagedKafkaEventSource.Builder topic(java.lang.String topic)
topic
- The Kafka topic to subscribe to. This parameter is required.this
public ManagedKafkaEventSource.Builder secret(ISecret secret)
Default: none
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.this
public ManagedKafkaEventSource.Builder clusterArn(java.lang.String clusterArn)
clusterArn
- An MSK cluster construct. This parameter is required.this
public ManagedKafkaEventSource build()