DynamoDbDataSourceProps

class aws_cdk.aws_appsync.DynamoDbDataSourceProps(*, api, description=None, name=None, service_role=None, table, read_only_access=None, use_caller_credentials=None)

Bases: aws_cdk.aws_appsync.BackedDataSourceProps

(experimental) Properties for an AppSync DynamoDB datasource.

Parameters
  • api (IGraphqlApi) – (experimental) The API to attach this data source to.

  • description (Optional[str]) – (experimental) the description of the data source. Default: - None

  • name (Optional[str]) – (experimental) The name of the data source. Default: - id of data source

  • service_role (Optional[IRole]) – (experimental) The IAM service role to be assumed by AppSync to interact with the data source. Default: - Create a new role

  • table (ITable) – (experimental) The DynamoDB table backing this data source.

  • read_only_access (Optional[bool]) – (experimental) Specify whether this DS is read only or has read and write permissions to the DynamoDB table. Default: false

  • use_caller_credentials (Optional[bool]) – (experimental) use credentials of caller to access DynamoDB. Default: false

Stability

experimental

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_appsync as appsync
import aws_cdk.aws_dynamodb as dynamodb
import aws_cdk.aws_iam as iam

# graphql_api: appsync.GraphqlApi
# role: iam.Role
# table: dynamodb.Table

dynamo_db_data_source_props = appsync.DynamoDbDataSourceProps(
    api=graphql_api,
    table=table,

    # the properties below are optional
    description="description",
    name="name",
    read_only_access=False,
    service_role=role,
    use_caller_credentials=False
)

Attributes

api

(experimental) The API to attach this data source to.

Stability

experimental

Return type

IGraphqlApi

description

(experimental) the description of the data source.

Default
  • None

Stability

experimental

Return type

Optional[str]

name

(experimental) The name of the data source.

Default
  • id of data source

Stability

experimental

Return type

Optional[str]

read_only_access

(experimental) Specify whether this DS is read only or has read and write permissions to the DynamoDB table.

Default

false

Stability

experimental

Return type

Optional[bool]

service_role

(experimental) The IAM service role to be assumed by AppSync to interact with the data source.

Default
  • Create a new role

Stability

experimental

Return type

Optional[IRole]

table

(experimental) The DynamoDB table backing this data source.

Stability

experimental

Return type

ITable

use_caller_credentials

(experimental) use credentials of caller to access DynamoDB.

Default

false

Stability

experimental

Return type

Optional[bool]