@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:19.803Z") @Stability(value=Stable) public interface SqsEventSourceProps extends software.amazon.jsii.JsiiSerializable
import software.amazon.awscdk.services.lambda.eventsources.SqsEventSource;
Function fn;
Queue queue = Queue.Builder.create(this, "MyQueue")
.visibilityTimeout(Duration.seconds(30)) // default,
.receiveMessageWaitTime(Duration.seconds(20))
.build();
fn.addEventSource(SqsEventSource.Builder.create(queue)
.batchSize(10) // default
.maxBatchingWindow(Duration.minutes(5))
.reportBatchItemFailures(true)
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
SqsEventSourceProps.Builder
A builder for
SqsEventSourceProps |
static class |
SqsEventSourceProps.Jsii$Proxy
An implementation for
SqsEventSourceProps |
| Modifier and Type | Method and Description |
|---|---|
static SqsEventSourceProps.Builder |
builder() |
default Number |
getBatchSize()
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
|
default Boolean |
getEnabled()
If the SQS event source mapping should be enabled.
|
default Duration |
getMaxBatchingWindow()
The maximum amount of time to gather records before invoking the function.
|
default Boolean |
getReportBatchItemFailures()
Allow functions to return partially successful responses for a batch of records.
|
@Stability(value=Stable) @Nullable default Number getBatchSize()
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
@Stability(value=Stable) @Nullable default Boolean getEnabled()
Default: true
@Stability(value=Stable) @Nullable default Duration getMaxBatchingWindow()
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.
@Stability(value=Stable) @Nullable default Boolean getReportBatchItemFailures()
Default: false
https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting@Stability(value=Stable) static SqsEventSourceProps.Builder builder()
SqsEventSourceProps.Builder of SqsEventSourcePropsCopyright © 2022. All rights reserved.