public static final class EventSourceMappingOptions.Builder
extends java.lang.Object
EventSourceMappingOptions
Constructor and Description |
---|
Builder() |
public EventSourceMappingOptions.Builder batchSize(java.lang.Number batchSize)
EventSourceMappingOptions.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: Minimum value of 1. Maximum value of 10000.
this
public EventSourceMappingOptions.Builder bisectBatchOnError(java.lang.Boolean bisectBatchOnError)
EventSourceMappingOptions.getBisectBatchOnError()
bisectBatchOnError
- If the function returns an error, split the batch in two and retry.this
public EventSourceMappingOptions.Builder enabled(java.lang.Boolean enabled)
EventSourceMappingOptions.getEnabled()
enabled
- Set to false to disable the event source upon creation.this
public EventSourceMappingOptions.Builder eventSourceArn(java.lang.String eventSourceArn)
EventSourceMappingOptions.getEventSourceArn()
eventSourceArn
- The Amazon Resource Name (ARN) of the event source.
Any record added to
this stream can invoke the Lambda function.this
public EventSourceMappingOptions.Builder kafkaBootstrapServers(java.util.List<java.lang.String> kafkaBootstrapServers)
EventSourceMappingOptions.getKafkaBootstrapServers()
kafkaBootstrapServers
- A list of host and port pairs that are the addresses of the Kafka brokers in a self managed "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself.
They are in the format abc.example.com:9096
.this
public EventSourceMappingOptions.Builder kafkaTopic(java.lang.String kafkaTopic)
EventSourceMappingOptions.getKafkaTopic()
kafkaTopic
- The name of the Kafka topic.this
public EventSourceMappingOptions.Builder maxBatchingWindow(Duration maxBatchingWindow)
EventSourceMappingOptions.getMaxBatchingWindow()
maxBatchingWindow
- The maximum amount of time to gather records before invoking the function.
Maximum of Duration.minutes(5)this
public EventSourceMappingOptions.Builder maxRecordAge(Duration maxRecordAge)
EventSourceMappingOptions.getMaxRecordAge()
maxRecordAge
- The maximum age of a record that Lambda sends to a function for processing.
Valid Range:
this
public EventSourceMappingOptions.Builder onFailure(IEventSourceDlq onFailure)
EventSourceMappingOptions.getOnFailure()
onFailure
- An Amazon SQS queue or Amazon SNS topic destination for discarded records.this
public EventSourceMappingOptions.Builder parallelizationFactor(java.lang.Number parallelizationFactor)
EventSourceMappingOptions.getParallelizationFactor()
parallelizationFactor
- The number of batches to process from each shard concurrently.
Valid Range:
this
public EventSourceMappingOptions.Builder reportBatchItemFailures(java.lang.Boolean reportBatchItemFailures)
EventSourceMappingOptions.getReportBatchItemFailures()
reportBatchItemFailures
- Allow functions to return partially successful responses for a batch of records.this
public EventSourceMappingOptions.Builder retryAttempts(java.lang.Number retryAttempts)
EventSourceMappingOptions.getRetryAttempts()
retryAttempts
- The maximum number of times to retry when the function returns an error.
Set to undefined
if you want lambda to keep retrying infinitely or until
the record expires.
Valid Range:
this
public EventSourceMappingOptions.Builder sourceAccessConfigurations(java.util.List<? extends SourceAccessConfiguration> sourceAccessConfigurations)
EventSourceMappingOptions.getSourceAccessConfigurations()
sourceAccessConfigurations
- Specific settings like the authentication protocol or the VPC components to secure access to your event source.this
public EventSourceMappingOptions.Builder startingPosition(StartingPosition startingPosition)
EventSourceMappingOptions.getStartingPosition()
startingPosition
- The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading.this
public EventSourceMappingOptions.Builder tumblingWindow(Duration tumblingWindow)
EventSourceMappingOptions.getTumblingWindow()
tumblingWindow
- The size of the tumbling windows to group records sent to DynamoDB or Kinesis.this
public EventSourceMappingOptions build()
EventSourceMappingOptions
java.lang.NullPointerException
- if any required attribute was not provided