Show / Hide Table of Contents

Class EventBridgeDataSource

An AppSync datasource backed by EventBridge.

Inheritance
object
BaseDataSource
BackedDataSource
EventBridgeDataSource
Implements
IGrantable
Inherited Members
BackedDataSource.GrantPrincipal
BaseDataSource.CreateFunction(string, IBaseAppsyncFunctionProps)
BaseDataSource.CreateResolver(string, IBaseResolverProps)
BaseDataSource.Ds
BaseDataSource.Name
BaseDataSource.Api
BaseDataSource.ServiceRole
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EventBridgeDataSource : BackedDataSource, IGrantable
Syntax (vb)
Public Class EventBridgeDataSource Inherits BackedDataSource Implements IGrantable
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Events;


            var api = new GraphqlApi(this, "EventBridgeApi", new GraphqlApiProps {
                Name = "EventBridgeApi",
                Definition = Definition.FromFile(Join(__dirname, "appsync.eventbridge.graphql"))
            });

            var bus = new EventBus(this, "DestinationEventBus", new EventBusProps { });

            var dataSource = api.AddEventBridgeDataSource("NoneDS", bus);

            dataSource.CreateResolver("EventResolver", new BaseResolverProps {
                TypeName = "Mutation",
                FieldName = "emitEvent",
                RequestMappingTemplate = MappingTemplate.FromFile("request.vtl"),
                ResponseMappingTemplate = MappingTemplate.FromFile("response.vtl")
            });

Synopsis

Constructors

EventBridgeDataSource(Construct, string, IEventBridgeDataSourceProps)

An AppSync datasource backed by EventBridge.

Properties

PROPERTY_INJECTION_ID

Uniquely identifies this class.

Constructors

EventBridgeDataSource(Construct, string, IEventBridgeDataSourceProps)

An AppSync datasource backed by EventBridge.

public EventBridgeDataSource(Construct scope, string id, IEventBridgeDataSourceProps props)
Parameters
scope Construct
id string
props IEventBridgeDataSourceProps
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Events;


            var api = new GraphqlApi(this, "EventBridgeApi", new GraphqlApiProps {
                Name = "EventBridgeApi",
                Definition = Definition.FromFile(Join(__dirname, "appsync.eventbridge.graphql"))
            });

            var bus = new EventBus(this, "DestinationEventBus", new EventBusProps { });

            var dataSource = api.AddEventBridgeDataSource("NoneDS", bus);

            dataSource.CreateResolver("EventResolver", new BaseResolverProps {
                TypeName = "Mutation",
                FieldName = "emitEvent",
                RequestMappingTemplate = MappingTemplate.FromFile("request.vtl"),
                ResponseMappingTemplate = MappingTemplate.FromFile("response.vtl")
            });

Properties

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

ExampleMetadata: infused

Implements

IGrantable
Back to top Generated by DocFX