public static final class SqsEventSource.Builder
extends java.lang.Object
SqsEventSource
.Modifier and Type | Method and Description |
---|---|
SqsEventSource.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.
|
SqsEventSource |
build() |
static SqsEventSource.Builder |
create(IQueue queue) |
SqsEventSource.Builder |
enabled(java.lang.Boolean enabled)
If the SQS event source mapping should be enabled.
|
SqsEventSource.Builder |
maxBatchingWindow(Duration maxBatchingWindow)
The maximum amount of time to gather records before invoking the function.
|
SqsEventSource.Builder |
reportBatchItemFailures(java.lang.Boolean reportBatchItemFailures)
Allow functions to return partially successful responses for a batch of records.
|
public static SqsEventSource.Builder create(IQueue queue)
queue
- This parameter is required.SqsEventSource.Builder
.public SqsEventSource.Builder batchSize(java.lang.Number batchSize)
Your function receives an event with all the retrieved records.
Valid Range: Minimum value of 1. Maximum value of 10.
If maxBatchingWindow
is configured, this value can go up to 10,000.
Default: 10
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 SqsEventSource.Builder enabled(java.lang.Boolean enabled)
Default: true
enabled
- If the SQS event source mapping should be enabled. This parameter is required.this
public SqsEventSource.Builder maxBatchingWindow(Duration maxBatchingWindow)
Valid Range: Minimum value of 0 minutes. Maximum value of 5 minutes.
Default: - no batching window. The lambda function will be invoked immediately with the records that are available.
maxBatchingWindow
- The maximum amount of time to gather records before invoking the function. This parameter is required.this
public SqsEventSource.Builder reportBatchItemFailures(java.lang.Boolean reportBatchItemFailures)
Default: false
reportBatchItemFailures
- Allow functions to return partially successful responses for a batch of records. This parameter is required.this
public SqsEventSource build()