AppSyncEventBridgeDataSource
An AppSync datasource backed by EventBridge.
Example
import * as events from 'aws-cdk-lib/aws-events';
const api = new appsync.EventApi(this, 'EventApiEventBridge', {
apiName: 'EventBridgeEventApi',
});
const eventBus = new events.EventBus(this, 'test-bus');
const dataSource = api.addEventBridgeDataSource('eventbridgeds', eventBus);
import aws_cdk.aws_events as events
api = appsync.EventApi(self, "EventApiEventBridge",
api_name="EventBridgeEventApi"
)
event_bus = events.EventBus(self, "test-bus")
data_source = api.add_event_bridge_data_source("eventbridgeds", event_bus)
import software.amazon.awscdk.services.events.*;
EventApi api = EventApi.Builder.create(this, "EventApiEventBridge")
.apiName("EventBridgeEventApi")
.build();
EventBus eventBus = new EventBus(this, "test-bus");
AppSyncEventBridgeDataSource dataSource = api.addEventBridgeDataSource("eventbridgeds", eventBus);
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.Events;
var api = new EventApi(this, "EventApiEventBridge", new EventApiProps {
ApiName = "EventBridgeEventApi"
});
var eventBus = new EventBus(this, "test-bus");
var dataSource = api.AddEventBridgeDataSource("eventbridgeds", eventBus);
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import events "github.com/aws/aws-cdk-go/awscdk"
api := appsync.NewEventApi(this, jsii.String("EventApiEventBridge"), &EventApiProps{
ApiName: jsii.String("EventBridgeEventApi"),
})
eventBus := events.NewEventBus(this, jsii.String("test-bus"))
dataSource := api.AddEventBridgeDataSource(jsii.String("eventbridgeds"), eventBus)
Initializer
new AppSyncEventBridgeDataSource(scope: Construct, id: string, props: AppSyncEventBridgeDataSourceProps)
AppSyncEventBridgeDataSource(scope: Construct, id: str, props: AppSyncEventBridgeDataSourceProps)
new AppSyncEventBridgeDataSource(Construct scope, String id, AppSyncEventBridgeDataSourceProps props)
new AppSyncEventBridgeDataSource(Construct scope, string id, AppSyncEventBridgeDataSourceProps props)
NewAppSyncEventBridgeDataSource(Scope Construct, Id *string, Props AppSyncEventBridgeDataSourceProps)
Construct Props
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string= None#Default: id of data source
The only allowed pattern is: {[_A-Za-z][_0-9A-Za-z]*}. Any invalid characters will be automatically removed.
Properties
grantPrincipalIPrincipalgrant_principalIPrincipalgrantPrincipalIPrincipalGrantPrincipalIPrincipalGrantPrincipalIPrincipalrequired#resourceCfnDataSourceresourceCfnDataSourceresourceCfnDataSourceResourceCfnDataSourceResourceCfnDataSourcerequired#Methods
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.
1 parameter · returns
Parameters
mixinsmixinsmixinsmixinsMixins— The mixins to apply.
Returns: This construct for chaining