@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)",
date="2022-06-22T23:27:56.408Z")
public interface EventSourceMappingOptions
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.lambda.*; import software.amazon.awscdk.core.*; IEventSourceDlq eventSourceDlq; SourceAccessConfigurationType sourceAccessConfigurationType; EventSourceMappingOptions eventSourceMappingOptions = EventSourceMappingOptions.builder() .batchSize(123) .bisectBatchOnError(false) .enabled(false) .eventSourceArn("eventSourceArn") .kafkaBootstrapServers(List.of("kafkaBootstrapServers")) .kafkaTopic("kafkaTopic") .maxBatchingWindow(Duration.minutes(30)) .maxRecordAge(Duration.minutes(30)) .onFailure(eventSourceDlq) .parallelizationFactor(123) .reportBatchItemFailures(false) .retryAttempts(123) .sourceAccessConfigurations(List.of(SourceAccessConfiguration.builder() .type(sourceAccessConfigurationType) .uri("uri") .build())) .startingPosition(StartingPosition.TRIM_HORIZON) .tumblingWindow(Duration.minutes(30)) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
EventSourceMappingOptions.Builder
A builder for
EventSourceMappingOptions |
static class |
EventSourceMappingOptions.Jsii$Proxy
An implementation for
EventSourceMappingOptions |
Modifier and Type | Method and Description |
---|---|
static EventSourceMappingOptions.Builder |
builder() |
default java.lang.Number |
getBatchSize()
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
|
default java.lang.Boolean |
getBisectBatchOnError()
If the function returns an error, split the batch in two and retry.
|
default java.lang.Boolean |
getEnabled()
Set to false to disable the event source upon creation.
|
default java.lang.String |
getEventSourceArn()
The Amazon Resource Name (ARN) of the event source.
|
default java.util.List<java.lang.String> |
getKafkaBootstrapServers()
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.
|
default java.lang.String |
getKafkaTopic()
The name of the Kafka topic.
|
default Duration |
getMaxBatchingWindow()
The maximum amount of time to gather records before invoking the function.
|
default Duration |
getMaxRecordAge()
The maximum age of a record that Lambda sends to a function for processing.
|
default IEventSourceDlq |
getOnFailure()
An Amazon SQS queue or Amazon SNS topic destination for discarded records.
|
default java.lang.Number |
getParallelizationFactor()
The number of batches to process from each shard concurrently.
|
default java.lang.Boolean |
getReportBatchItemFailures()
Allow functions to return partially successful responses for a batch of records.
|
default java.lang.Number |
getRetryAttempts()
The maximum number of times to retry when the function returns an error.
|
default java.util.List<SourceAccessConfiguration> |
getSourceAccessConfigurations()
Specific settings like the authentication protocol or the VPC components to secure access to your event source.
|
default StartingPosition |
getStartingPosition()
The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading.
|
default Duration |
getTumblingWindow()
The size of the tumbling windows to group records sent to DynamoDB or Kinesis.
|
default java.lang.Number getBatchSize()
Your function receives an event with all the retrieved records.
Valid Range: Minimum value of 1. Maximum value of 10000.
Default: - Amazon Kinesis, Amazon DynamoDB, and Amazon MSK is 100 records. The default for Amazon SQS is 10 messages. For standard SQS queues, the maximum is 10,000. For FIFO SQS queues, the maximum is 10.
default java.lang.Boolean getBisectBatchOnError()
Default: false
default java.lang.Boolean getEnabled()
Default: true
default java.lang.String getEventSourceArn()
Any record added to this stream can invoke the Lambda function.
Default: - not set if using a self managed Kafka cluster, throws an error otherwise
default java.util.List<java.lang.String> getKafkaBootstrapServers()
They are in the format abc.example.com:9096
.
Default: - none
default java.lang.String getKafkaTopic()
Default: - no topic
default Duration getMaxBatchingWindow()
Maximum of Duration.minutes(5)
Default: Duration.seconds(0)
default Duration getMaxRecordAge()
Valid Range:
Default: - infinite or until the record expires.
default IEventSourceDlq getOnFailure()
Default: discarded records are ignored
default java.lang.Number getParallelizationFactor()
Valid Range:
Default: 1
default java.lang.Boolean getReportBatchItemFailures()
Default: false
default java.lang.Number getRetryAttempts()
Set to undefined
if you want lambda to keep retrying infinitely or until
the record expires.
Valid Range:
Default: - infinite or until the record expires.
default java.util.List<SourceAccessConfiguration> getSourceAccessConfigurations()
Default: - none
default StartingPosition getStartingPosition()
Default: - Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources.
default Duration getTumblingWindow()
Default: - None
static EventSourceMappingOptions.Builder builder()
EventSourceMappingOptions.Builder
of EventSourceMappingOptions