Class SqsEventSource
Use an Amazon SQS queue as an event source for AWS Lambda.
Inheritance
System.Object
SqsEventSource
Implements
Namespace: Amazon.CDK.AWS.Lambda.EventSources
Assembly: Amazon.CDK.AWS.Lambda.EventSources.dll
Syntax (csharp)
public class SqsEventSource : DeputyBase, IEventSource
Syntax (vb)
Public Class SqsEventSource
Inherits DeputyBase
Implements IEventSource
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Lambda.EventSources;
Function fn;
var queue = new Queue(this, "MyQueue");
var eventSource = new SqsEventSource(queue);
fn.AddEventSource(eventSource);
var eventSourceId = eventSource.EventSourceMappingId;
Synopsis
Constructors
SqsEventSource(IQueue, ISqsEventSourceProps) | |
SqsEventSource(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
SqsEventSource(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
EventSourceMappingId | The identifier for this EventSourceMapping. |
Queue |
Methods
Bind(IFunction) | Called by |
Constructors
SqsEventSource(IQueue, ISqsEventSourceProps)
public SqsEventSource(IQueue queue, ISqsEventSourceProps props = null)
Parameters
- queue IQueue
- props ISqsEventSourceProps
SqsEventSource(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SqsEventSource(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
SqsEventSource(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SqsEventSource(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
EventSourceMappingId
The identifier for this EventSourceMapping.
public virtual string EventSourceMappingId { get; }
Property Value
System.String
Queue
Methods
Bind(IFunction)
Called by lambda.addEventSource
to allow the event source to bind to this function.
public virtual void Bind(IFunction target)
Parameters
- target IFunction