AppSyncBackedDataSource
Abstract AppSync datasource implementation.
Do not use directly but use subclasses for resource backed datasources
Example
declare const api: appsync.EventApi;
declare const ddbDataSource: appsync.AppSyncDynamoDbDataSource;
declare const ebDataSource: appsync.AppSyncEventBridgeDataSource;
// DynamoDB data source for publish handler
api.addChannelNamespace('ddb-eb-ns', {
code: appsync.Code.fromInline('/* event handler code here.*/'),
publishHandlerConfig: {
dataSource: ddbDataSource,
},
subscribeHandlerConfig: {
dataSource: ebDataSource,
},
});
Initializer
new AppSyncBackedDataSource(scope: Construct, id: string, props: AppSyncBackedDataSourceProps, extended: AppSyncExtendedDataSourceProps)
AppSyncBackedDataSource(scope: Construct, id: str, props: AppSyncBackedDataSourceProps, extended: AppSyncExtendedDataSourceProps)
new AppSyncBackedDataSource(Construct scope, String id, AppSyncBackedDataSourceProps props, AppSyncExtendedDataSourceProps extended)
new AppSyncBackedDataSource(Construct scope, string id, AppSyncBackedDataSourceProps props, AppSyncExtendedDataSourceProps extended)
NewAppSyncBackedDataSource(Scope Construct, Id *string, Props AppSyncBackedDataSourceProps, Extended AppSyncExtendedDataSourceProps)
Construct Props
The only allowed pattern is: {[_A-Za-z][_0-9A-Za-z]*}. Any invalid characters will be automatically removed.
Construct Props
dynamoDbConfigIResolvable | CfnDataSource.DynamoDBConfigPropertydynamo_db_configtyping.Union[IResolvable, DynamoDBConfigProperty]dynamoDbConfigIResolvableDynamoDbConfigIResolvableDynamoDbConfiginterface{}= No config#eventBridgeConfigIResolvable | CfnDataSource.EventBridgeConfigPropertyevent_bridge_configtyping.Union[IResolvable, EventBridgeConfigProperty]eventBridgeConfigIResolvableEventBridgeConfigIResolvableEventBridgeConfiginterface{}= No config#httpConfigIResolvable | CfnDataSource.HttpConfigPropertyhttp_configtyping.Union[IResolvable, HttpConfigProperty]httpConfigIResolvableHttpConfigIResolvableHttpConfiginterface{}= No config#lambdaConfigIResolvable | CfnDataSource.LambdaConfigPropertylambda_configtyping.Union[IResolvable, LambdaConfigProperty]lambdaConfigIResolvableLambdaConfigIResolvableLambdaConfiginterface{}= No config#openSearchServiceConfigIResolvable | CfnDataSource.OpenSearchServiceConfigPropertyopen_search_service_configtyping.Union[IResolvable, OpenSearchServiceConfigProperty]openSearchServiceConfigIResolvableOpenSearchServiceConfigIResolvableOpenSearchServiceConfiginterface{}= No config#relationalDatabaseConfigIResolvable | CfnDataSource.RelationalDatabaseConfigPropertyrelational_database_configtyping.Union[IResolvable, RelationalDatabaseConfigProperty]relationalDatabaseConfigIResolvableRelationalDatabaseConfigIResolvableRelationalDatabaseConfiginterface{}= No config#typeAppSyncDataSourceTypetypeAppSyncDataSourceTypetypeAppSyncDataSourceTypeTypeAppSyncDataSourceTypeTypeAppSyncDataSourceTyperequired#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