@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:01:21.512Z") @Stability(value=Experimental) public class EventSourceMapping extends Resource implements IEventSourceMapping
Usually, you won't need to define the mapping yourself. This will usually be done by event sources. For example, to add an SQS event source to a function:
import { SqsEventSource } from '@aws-cdk/aws-lambda-event-sources';
lambda.addEventSource(new SqsEventSource(sqs));
The SqsEventSource class will automatically create the mapping, and will also
modify the Lambda's execution role so it can consume messages from the queue.
| Modifier and Type | Class and Description |
|---|---|
static class |
EventSourceMapping.Builder
(experimental) A fluent builder for
EventSourceMapping. |
software.amazon.jsii.JsiiObject.InitializationModeIEventSourceMapping.Jsii$Default, IEventSourceMapping.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
EventSourceMapping(software.constructs.Construct scope,
String id,
EventSourceMappingProps props) |
protected |
EventSourceMapping(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
EventSourceMapping(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static IEventSourceMapping |
fromEventSourceMappingId(software.constructs.Construct scope,
String id,
String eventSourceMappingId)
(experimental) Import an event source into this stack from its event source id.
|
String |
getEventSourceMappingId()
(experimental) The identifier for this EventSourceMapping.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected EventSourceMapping(software.amazon.jsii.JsiiObjectRef objRef)
protected EventSourceMapping(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public EventSourceMapping(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
EventSourceMappingProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static IEventSourceMapping fromEventSourceMappingId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String eventSourceMappingId)
scope - This parameter is required.id - This parameter is required.eventSourceMappingId - This parameter is required.@Stability(value=Experimental) @NotNull public String getEventSourceMappingId()
getEventSourceMappingId in interface IEventSourceMappingCopyright © 2021. All rights reserved.