@Stability(value=Experimental) public static final class EventSourceMapping.Builder extends Object implements software.amazon.jsii.Builder<EventSourceMapping>
EventSourceMapping.| Modifier and Type | Method and Description |
|---|---|
EventSourceMapping.Builder |
batchSize(Number batchSize)
(experimental) The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
|
EventSourceMapping.Builder |
bisectBatchOnError(Boolean bisectBatchOnError)
(experimental) If the function returns an error, split the batch in two and retry.
|
EventSourceMapping |
build() |
static EventSourceMapping.Builder |
create(software.constructs.Construct scope,
String id) |
EventSourceMapping.Builder |
enabled(Boolean enabled)
(experimental) Set to false to disable the event source upon creation.
|
EventSourceMapping.Builder |
eventSourceArn(String eventSourceArn)
(experimental) The Amazon Resource Name (ARN) of the event source.
|
EventSourceMapping.Builder |
kafkaBootstrapServers(List<String> kafkaBootstrapServers)
(experimental) 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.
|
EventSourceMapping.Builder |
kafkaTopic(String kafkaTopic)
(experimental) The name of the Kafka topic.
|
EventSourceMapping.Builder |
maxBatchingWindow(Duration maxBatchingWindow)
(experimental) The maximum amount of time to gather records before invoking the function.
|
EventSourceMapping.Builder |
maxRecordAge(Duration maxRecordAge)
(experimental) The maximum age of a record that Lambda sends to a function for processing.
|
EventSourceMapping.Builder |
onFailure(IEventSourceDlq onFailure)
(experimental) An Amazon SQS queue or Amazon SNS topic destination for discarded records.
|
EventSourceMapping.Builder |
parallelizationFactor(Number parallelizationFactor)
(experimental) The number of batches to process from each shard concurrently.
|
EventSourceMapping.Builder |
retryAttempts(Number retryAttempts)
(experimental) The maximum number of times to retry when the function returns an error.
|
EventSourceMapping.Builder |
sourceAccessConfigurations(List<? extends SourceAccessConfiguration> sourceAccessConfigurations)
(experimental) Specific settings like the authentication protocol or the VPC components to secure access to your event source.
|
EventSourceMapping.Builder |
startingPosition(StartingPosition startingPosition)
(experimental) The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading.
|
EventSourceMapping.Builder |
target(IFunction target)
(experimental) The target AWS Lambda function.
|
EventSourceMapping.Builder |
tumblingWindow(Duration tumblingWindow)
(experimental) The size of the tumbling windows to group records sent to DynamoDB or Kinesis.
|
@Stability(value=Experimental) public static EventSourceMapping.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.EventSourceMapping.Builder.@Stability(value=Experimental) public EventSourceMapping.Builder batchSize(Number batchSize)
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. Both the default and maximum for Amazon SQS are 10 messages.
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@Stability(value=Experimental) public EventSourceMapping.Builder bisectBatchOnError(Boolean bisectBatchOnError)
Default: false
bisectBatchOnError - If the function returns an error, split the batch in two and retry. This parameter is required.this@Stability(value=Experimental) public EventSourceMapping.Builder enabled(Boolean enabled)
Default: true
enabled - Set to false to disable the event source upon creation. This parameter is required.this@Stability(value=Experimental) public EventSourceMapping.Builder eventSourceArn(String eventSourceArn)
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
eventSourceArn - The Amazon Resource Name (ARN) of the event source. This parameter is required.this@Stability(value=Experimental) public EventSourceMapping.Builder kafkaBootstrapServers(List<String> kafkaBootstrapServers)
They are in the format abc.example.com:9096.
Default: - none
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. This parameter is required.this@Stability(value=Experimental) public EventSourceMapping.Builder kafkaTopic(String kafkaTopic)
Default: - no topic
kafkaTopic - The name of the Kafka topic. This parameter is required.this@Stability(value=Experimental) public EventSourceMapping.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@Stability(value=Experimental) public EventSourceMapping.Builder maxRecordAge(Duration maxRecordAge)
Valid Range:
Default: - infinite or until the record expires.
maxRecordAge - The maximum age of a record that Lambda sends to a function for processing. This parameter is required.this@Stability(value=Experimental) public EventSourceMapping.Builder onFailure(IEventSourceDlq onFailure)
Default: discarded records are ignored
onFailure - An Amazon SQS queue or Amazon SNS topic destination for discarded records. This parameter is required.this@Stability(value=Experimental) public EventSourceMapping.Builder parallelizationFactor(Number parallelizationFactor)
Valid Range:
Default: 1
parallelizationFactor - The number of batches to process from each shard concurrently. This parameter is required.this@Stability(value=Experimental) public EventSourceMapping.Builder retryAttempts(Number retryAttempts)
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.
retryAttempts - The maximum number of times to retry when the function returns an error. This parameter is required.this@Stability(value=Experimental) public EventSourceMapping.Builder sourceAccessConfigurations(List<? extends SourceAccessConfiguration> sourceAccessConfigurations)
Default: - none
sourceAccessConfigurations - Specific settings like the authentication protocol or the VPC components to secure access to your event source. This parameter is required.thishttps://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html@Stability(value=Experimental) public EventSourceMapping.Builder startingPosition(StartingPosition startingPosition)
Default: - Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources.
startingPosition - The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading. This parameter is required.thishttps://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType@Stability(value=Experimental) public EventSourceMapping.Builder tumblingWindow(Duration tumblingWindow)
Default: - None
tumblingWindow - The size of the tumbling windows to group records sent to DynamoDB or Kinesis. This parameter is required.thisValid Range: 0 - 15 minutes@Stability(value=Experimental) public EventSourceMapping.Builder target(IFunction target)
target - The target AWS Lambda function. This parameter is required.this@Stability(value=Experimental) public EventSourceMapping build()
build in interface software.amazon.jsii.Builder<EventSourceMapping>Copyright © 2021. All rights reserved.