Class EventBridgeDataSource

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IGrantable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-17T21:37:26.473Z") @Stability(Stable) public class EventBridgeDataSource extends BackedDataSource
An AppSync datasource backed by EventBridge.

Example:

 import software.amazon.awscdk.services.events.*;
 GraphqlApi api = GraphqlApi.Builder.create(this, "EventBridgeApi")
         .name("EventBridgeApi")
         .definition(Definition.fromFile(join(__dirname, "appsync.eventbridge.graphql")))
         .build();
 EventBus bus = EventBus.Builder.create(this, "DestinationEventBus").build();
 EventBridgeDataSource dataSource = api.addEventBridgeDataSource("NoneDS", bus);
 dataSource.createResolver("EventResolver", BaseResolverProps.builder()
         .typeName("Mutation")
         .fieldName("emitEvent")
         .requestMappingTemplate(MappingTemplate.fromFile("request.vtl"))
         .responseMappingTemplate(MappingTemplate.fromFile("response.vtl"))
         .build());
 
  • Constructor Details

    • EventBridgeDataSource

      protected EventBridgeDataSource(software.amazon.jsii.JsiiObjectRef objRef)
    • EventBridgeDataSource

      protected EventBridgeDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • EventBridgeDataSource

      @Stability(Stable) public EventBridgeDataSource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EventBridgeDataSourceProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.