interface RdsDataSourceProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppSync.RdsDataSourceProps |
Java | software.amazon.awscdk.services.appsync.RdsDataSourceProps |
Python | aws_cdk.aws_appsync.RdsDataSourceProps |
TypeScript (source) | @aws-cdk/aws-appsync » RdsDataSourceProps |
Properties for an AppSync RDS datasource.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as appsync from '@aws-cdk/aws-appsync';
import * as iam from '@aws-cdk/aws-iam';
import * as rds from '@aws-cdk/aws-rds';
import * as secretsmanager from '@aws-cdk/aws-secretsmanager';
declare const graphqlApi: appsync.GraphqlApi;
declare const role: iam.Role;
declare const secret: secretsmanager.Secret;
declare const serverlessCluster: rds.ServerlessCluster;
const rdsDataSourceProps: appsync.RdsDataSourceProps = {
api: graphqlApi,
secretStore: secret,
serverlessCluster: serverlessCluster,
// the properties below are optional
databaseName: 'databaseName',
description: 'description',
name: 'name',
serviceRole: role,
};
Properties
Name | Type | Description |
---|---|---|
api | IGraphql | The API to attach this data source to. |
secret | ISecret | The secret containing the credentials for the database. |
serverless | IServerless | The serverless cluster to call to interact with this data source. |
database | string | The name of the database to use within the cluster. |
description? | string | the description of the data source. |
name? | string | The name of the data source. |
service | IRole | The IAM service role to be assumed by AppSync to interact with the data source. |
api
Type:
IGraphql
The API to attach this data source to.
secretStore
Type:
ISecret
The secret containing the credentials for the database.
serverlessCluster
Type:
IServerless
The serverless cluster to call to interact with this data source.
databaseName?
Type:
string
(optional, default: None)
The name of the database to use within the cluster.
description?
Type:
string
(optional, default: None)
the description of the data source.
name?
Type:
string
(optional, default: id of data source)
The name of the data source.
serviceRole?
Type:
IRole
(optional, default: Create a new role)
The IAM service role to be assumed by AppSync to interact with the data source.