Class AppSyncDynamoDbDataSource
An AppSync datasource backed by a DynamoDB table.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AppSyncDynamoDbDataSource : AppSyncBackedDataSource, IGrantable
Syntax (vb)
Public Class AppSyncDynamoDbDataSource Inherits AppSyncBackedDataSource Implements IGrantable
Remarks
ExampleMetadata: infused
Examples
var api = new EventApi(this, "EventApiDynamoDB", new EventApiProps {
ApiName = "DynamoDBEventApi"
});
var table = new Table(this, "table", new TableProps {
TableName = "event-messages",
PartitionKey = new Attribute {
Name = "id",
Type = AttributeType.STRING
}
});
var dataSource = api.AddDynamoDbDataSource("ddbsource", table);
Synopsis
Constructors
| AppSyncDynamoDbDataSource(Construct, string, IAppSyncDynamoDbDataSourceProps) | An AppSync datasource backed by a DynamoDB table. |
Constructors
AppSyncDynamoDbDataSource(Construct, string, IAppSyncDynamoDbDataSourceProps)
An AppSync datasource backed by a DynamoDB table.
public AppSyncDynamoDbDataSource(Construct scope, string id, IAppSyncDynamoDbDataSourceProps props)
Parameters
- scope Construct
- id string
- props IAppSyncDynamoDbDataSourceProps
Remarks
ExampleMetadata: infused
Examples
var api = new EventApi(this, "EventApiDynamoDB", new EventApiProps {
ApiName = "DynamoDBEventApi"
});
var table = new Table(this, "table", new TableProps {
TableName = "event-messages",
PartitionKey = new Attribute {
Name = "id",
Type = AttributeType.STRING
}
});
var dataSource = api.AddDynamoDbDataSource("ddbsource", table);