class AppSyncBackedDataSource
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.AppSync.AppSyncBackedDataSource |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappsync#AppSyncBackedDataSource |
Java | software.amazon.awscdk.services.appsync.AppSyncBackedDataSource |
Python | aws_cdk.aws_appsync.AppSyncBackedDataSource |
TypeScript (source) | aws-cdk-lib » aws_appsync » AppSyncBackedDataSource |
Implements
IConstruct, IDependable, IGrantable
Extends
App
Implemented by
App, App, App, App, App, App
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)
Parameters
- scope
Construct - id
string - props
AppSync Backed Data Source Props - extended
AppSync Extended Data Source Props
Properties
| Name | Type | Description |
|---|---|---|
| grant | IPrincipal | The principal of the data source to be IGrantable. |
| name | string | The name of the data source. |
| node | Node | The tree node. |
| resource | Cfn | The underlying CFN data source resource. |
grantPrincipal
Type:
IPrincipal
The principal of the data source to be IGrantable.
name
Type:
string
The name of the data source.
node
Type:
Node
The tree node.
resource
Type:
Cfn
The underlying CFN data source resource.
Methods
| Name | Description |
|---|---|
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
Parameters
- mixins
IMixin— The mixins to apply.
Returns
Applies one or more mixins to this construct.
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.

.NET
Go
Java
Python
TypeScript (