Class DynamoDbDataSourceProps
Properties for an AppSync DynamoDB datasource.
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DynamoDbDataSourceProps : IDynamoDbDataSourceProps, IBackedDataSourceProps, IBaseDataSourceProps
Syntax (vb)
Public Class DynamoDbDataSourceProps Implements IDynamoDbDataSourceProps, IBackedDataSourceProps, IBaseDataSourceProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
using Amazon.CDK.AWS.DynamoDB;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.Interfaces.AppSync;
IGraphQLApiRef graphQLApiRef;
Role role;
Table table;
var dynamoDbDataSourceProps = new DynamoDbDataSourceProps {
Api = graphQLApiRef,
Table = table,
// the properties below are optional
Description = "description",
Name = "name",
ReadOnlyAccess = false,
ServiceRole = role,
UseCallerCredentials = false
};
Synopsis
Constructors
| DynamoDbDataSourceProps() | Properties for an AppSync DynamoDB datasource. |
Properties
| Api | The API to attach this data source to. |
| Description | the description of the data source. |
| Name | The name of the data source. |
| ReadOnlyAccess | Specify whether this DS is read only or has read and write permissions to the DynamoDB table. |
| ServiceRole | The IAM service role to be assumed by AppSync to interact with the data source. |
| Table | The DynamoDB table backing this data source. |
| UseCallerCredentials | use credentials of caller to access DynamoDB. |
Constructors
DynamoDbDataSourceProps()
Properties for an AppSync DynamoDB datasource.
public DynamoDbDataSourceProps()
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
using Amazon.CDK.AWS.DynamoDB;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.Interfaces.AppSync;
IGraphQLApiRef graphQLApiRef;
Role role;
Table table;
var dynamoDbDataSourceProps = new DynamoDbDataSourceProps {
Api = graphQLApiRef,
Table = table,
// the properties below are optional
Description = "description",
Name = "name",
ReadOnlyAccess = false,
ServiceRole = role,
UseCallerCredentials = false
};
Properties
Api
The API to attach this data source to.
public IGraphQLApiRef Api { get; set; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
Description
the description of the data source.
public string? Description { get; set; }
Property Value
Remarks
Default: - None
Name
The name of the data source.
public string? Name { get; set; }
Property Value
Remarks
Default: - id of data source
ReadOnlyAccess
Specify whether this DS is read only or has read and write permissions to the DynamoDB table.
public bool? ReadOnlyAccess { get; set; }
Property Value
bool?
Remarks
Default: false
ServiceRole
The IAM service role to be assumed by AppSync to interact with the data source.
public IRole? ServiceRole { get; set; }
Property Value
Remarks
Default: - Create a new role
Table
The DynamoDB table backing this data source.
public ITable Table { get; set; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
UseCallerCredentials
use credentials of caller to access DynamoDB.
public bool? UseCallerCredentials { get; set; }
Property Value
bool?
Remarks
Default: false