@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:59.896Z") public class SqsEventSource extends software.amazon.jsii.JsiiObject implements IEventSource
Example:
import software.amazon.awscdk.services.lambda.eventsources.SqsEventSource; Function fn; Queue queue = new Queue(this, "MyQueue"); SqsEventSource eventSource = new SqsEventSource(queue); fn.addEventSource(eventSource); String eventSourceId = eventSource.getEventSourceMappingId();
Modifier and Type | Class and Description |
---|---|
static class |
SqsEventSource.Builder
A fluent builder for
SqsEventSource . |
IEventSource.Jsii$Default, IEventSource.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
|
SqsEventSource(IQueue queue,
SqsEventSourceProps props) |
protected |
SqsEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
SqsEventSource(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
void |
bind(IFunction target)
Called by `lambda.addEventSource` to allow the event source to bind to this function.
|
java.lang.String |
getEventSourceMappingId()
The identifier for this EventSourceMapping.
|
IQueue |
getQueue() |
protected SqsEventSource(software.amazon.jsii.JsiiObjectRef objRef)
protected SqsEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public SqsEventSource(IQueue queue, SqsEventSourceProps props)
queue
- This parameter is required.props
- public void bind(IFunction target)
bind
in interface IEventSource
target
- This parameter is required.public java.lang.String getEventSourceMappingId()
public IQueue getQueue()