RdsDataSourceProps

class aws_cdk.aws_appsync.RdsDataSourceProps(*, api, description=None, name=None, service_role=None, secret_store, serverless_cluster, database_name=None)

Bases: BackedDataSourceProps

(experimental) Properties for an AppSync RDS 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

  • secret_store (ISecret) – (experimental) The secret containing the credentials for the database.

  • serverless_cluster (IServerlessCluster) – (experimental) The serverless cluster to call to interact with this data source.

  • database_name (Optional[str]) – (experimental) The name of the database to use within the cluster. Default: - None

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_iam as iam
import aws_cdk.aws_rds as rds
import aws_cdk.aws_secretsmanager as secretsmanager

# graphql_api: appsync.GraphqlApi
# role: iam.Role
# secret: secretsmanager.Secret
# serverless_cluster: rds.ServerlessCluster

rds_data_source_props = appsync.RdsDataSourceProps(
    api=graphql_api,
    secret_store=secret,
    serverless_cluster=serverless_cluster,

    # the properties below are optional
    database_name="databaseName",
    description="description",
    name="name",
    service_role=role
)

Attributes

api

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

Stability:

experimental

database_name

(experimental) The name of the database to use within the cluster.

Default:
  • None

Stability:

experimental

description

(experimental) the description of the data source.

Default:
  • None

Stability:

experimental

name

(experimental) The name of the data source.

Default:
  • id of data source

Stability:

experimental

secret_store

(experimental) The secret containing the credentials for the database.

Stability:

experimental

serverless_cluster

(experimental) The serverless cluster to call to interact with this data source.

Stability:

experimental

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