Interface SqsEventSourceProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
SqsEventSourceProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.847Z")
@Stability(Stable)
public interface SqsEventSourceProps
extends software.amazon.jsii.JsiiSerializable
Example:
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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forSqsEventSourcePropsstatic final classAn implementation forSqsEventSourceProps -
Method Summary
Modifier and TypeMethodDescriptionstatic SqsEventSourceProps.Builderbuilder()default NumberThe largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.default BooleanIf the SQS event source mapping should be enabled.default DurationThe maximum amount of time to gather records before invoking the function.default BooleanAllow functions to return partially successful responses for a batch of records.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBatchSize
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 10. If
maxBatchingWindowis configured, this value can go up to 10,000.Default: 10
-
getEnabled
If the SQS event source mapping should be enabled.Default: true
-
getMaxBatchingWindow
The maximum amount of time to gather records before invoking the function.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.
-
getReportBatchItemFailures
Allow functions to return partially successful responses for a batch of records.Default: false
-
builder
- Returns:
- a
SqsEventSourceProps.BuilderofSqsEventSourceProps
-