public static final class ManagedKafkaEventSourceProps.Builder
extends java.lang.Object
ManagedKafkaEventSourceProps
Constructor and Description |
---|
Builder() |
public ManagedKafkaEventSourceProps.Builder clusterArn(java.lang.String clusterArn)
ManagedKafkaEventSourceProps.getClusterArn()
clusterArn
- An MSK cluster construct. This parameter is required.this
public ManagedKafkaEventSourceProps.Builder topic(java.lang.String topic)
KafkaEventSourceProps.getTopic()
topic
- The Kafka topic to subscribe to. This parameter is required.this
public ManagedKafkaEventSourceProps.Builder secret(ISecret secret)
KafkaEventSourceProps.getSecret()
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
public ManagedKafkaEventSourceProps.Builder startingPosition(StartingPosition startingPosition)
BaseStreamEventSourceProps.getStartingPosition()
startingPosition
- Where to begin consuming the stream. This parameter is required.this
public ManagedKafkaEventSourceProps.Builder batchSize(java.lang.Number batchSize)
BaseStreamEventSourceProps.getBatchSize()
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:
this
public ManagedKafkaEventSourceProps.Builder enabled(java.lang.Boolean enabled)
BaseStreamEventSourceProps.getEnabled()
enabled
- If the stream event source mapping should be enabled.this
public ManagedKafkaEventSourceProps.Builder maxBatchingWindow(Duration maxBatchingWindow)
BaseStreamEventSourceProps.getMaxBatchingWindow()
maxBatchingWindow
- The maximum amount of time to gather records before invoking the function.
Maximum of Duration.minutes(5)this
public ManagedKafkaEventSourceProps build()
ManagedKafkaEventSourceProps
java.lang.NullPointerException
- if any required attribute was not provided