CfnDataSourceProps
- class aws_cdk.aws_appsync.CfnDataSourceProps(*, api_id, name, type, description=None, dynamo_db_config=None, elasticsearch_config=None, event_bridge_config=None, http_config=None, lambda_config=None, open_search_service_config=None, relational_database_config=None, service_role_arn=None)
Bases:
object
Properties for defining a
CfnDataSource
.- Parameters:
api_id (
str
) – Unique AWS AppSync GraphQL API identifier where this data source will be created.name (
str
) – Friendly name for you to identify your AppSync data source after creation.type (
str
) – The type of the data source. - AWS_LAMBDA : The data source is an AWS Lambda function. - AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table. - AMAZON_ELASTICSEARCH : The data source is an Amazon OpenSearch Service domain. - AMAZON_EVENTBRIDGE : The data source is an Amazon EventBridge event bus. - AMAZON_OPENSEARCH_SERVICE : The data source is an Amazon OpenSearch Service domain. - NONE : There is no data source. This type is used when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation. - HTTP : The data source is an HTTP endpoint. - RELATIONAL_DATABASE : The data source is a relational database.description (
Optional
[str
]) – The description of the data source.dynamo_db_config (
Union
[IResolvable
,DynamoDBConfigProperty
,Dict
[str
,Any
],None
]) – AWS Region and TableName for an Amazon DynamoDB table in your account.elasticsearch_config (
Union
[IResolvable
,ElasticsearchConfigProperty
,Dict
[str
,Any
],None
]) – AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account. As of September 2021, Amazon Elasticsearch Service is Amazon OpenSearch Service . This property is deprecated. For new data sources, use OpenSearchServiceConfig to specify an OpenSearch Service data source.event_bridge_config (
Union
[IResolvable
,EventBridgeConfigProperty
,Dict
[str
,Any
],None
]) – An EventBridge configuration that contains a valid ARN of an event bus.http_config (
Union
[IResolvable
,HttpConfigProperty
,Dict
[str
,Any
],None
]) – Endpoints for an HTTP data source.lambda_config (
Union
[IResolvable
,LambdaConfigProperty
,Dict
[str
,Any
],None
]) – An ARN of a Lambda function in valid ARN format. This can be the ARN of a Lambda function that exists in the current account or in another account.open_search_service_config (
Union
[IResolvable
,OpenSearchServiceConfigProperty
,Dict
[str
,Any
],None
]) – AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.relational_database_config (
Union
[IResolvable
,RelationalDatabaseConfigProperty
,Dict
[str
,Any
],None
]) – Relational Database configuration of the relational database data source.service_role_arn (
Optional
[str
]) – The AWS Identity and Access Management service role ARN for the data source. The system assumes this role when accessing the data source. Required ifType
is specified asAWS_LAMBDA
,AMAZON_DYNAMODB
,AMAZON_ELASTICSEARCH
,AMAZON_EVENTBRIDGE
, orAMAZON_OPENSEARCH_SERVICE
.
- Link:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-datasource.html
- 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 cfn_data_source_props = appsync.CfnDataSourceProps( api_id="apiId", name="name", type="type", # the properties below are optional description="description", dynamo_db_config=appsync.CfnDataSource.DynamoDBConfigProperty( aws_region="awsRegion", table_name="tableName", # the properties below are optional delta_sync_config=appsync.CfnDataSource.DeltaSyncConfigProperty( base_table_ttl="baseTableTtl", delta_sync_table_name="deltaSyncTableName", delta_sync_table_ttl="deltaSyncTableTtl" ), use_caller_credentials=False, versioned=False ), elasticsearch_config=appsync.CfnDataSource.ElasticsearchConfigProperty( aws_region="awsRegion", endpoint="endpoint" ), event_bridge_config=appsync.CfnDataSource.EventBridgeConfigProperty( event_bus_arn="eventBusArn" ), http_config=appsync.CfnDataSource.HttpConfigProperty( endpoint="endpoint", # the properties below are optional authorization_config=appsync.CfnDataSource.AuthorizationConfigProperty( authorization_type="authorizationType", # the properties below are optional aws_iam_config=appsync.CfnDataSource.AwsIamConfigProperty( signing_region="signingRegion", signing_service_name="signingServiceName" ) ) ), lambda_config=appsync.CfnDataSource.LambdaConfigProperty( lambda_function_arn="lambdaFunctionArn" ), open_search_service_config=appsync.CfnDataSource.OpenSearchServiceConfigProperty( aws_region="awsRegion", endpoint="endpoint" ), relational_database_config=appsync.CfnDataSource.RelationalDatabaseConfigProperty( relational_database_source_type="relationalDatabaseSourceType", # the properties below are optional rds_http_endpoint_config=appsync.CfnDataSource.RdsHttpEndpointConfigProperty( aws_region="awsRegion", aws_secret_store_arn="awsSecretStoreArn", db_cluster_identifier="dbClusterIdentifier", # the properties below are optional database_name="databaseName", schema="schema" ) ), service_role_arn="serviceRoleArn" )
Attributes
- api_id
Unique AWS AppSync GraphQL API identifier where this data source will be created.
- description
The description of the data source.
- dynamo_db_config
AWS Region and TableName for an Amazon DynamoDB table in your account.
- elasticsearch_config
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
As of September 2021, Amazon Elasticsearch Service is Amazon OpenSearch Service . This property is deprecated. For new data sources, use OpenSearchServiceConfig to specify an OpenSearch Service data source.
- event_bridge_config
An EventBridge configuration that contains a valid ARN of an event bus.
- http_config
Endpoints for an HTTP data source.
- lambda_config
An ARN of a Lambda function in valid ARN format.
This can be the ARN of a Lambda function that exists in the current account or in another account.
- name
Friendly name for you to identify your AppSync data source after creation.
- open_search_service_config
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
- relational_database_config
Relational Database configuration of the relational database data source.
- service_role_arn
The AWS Identity and Access Management service role ARN for the data source.
The system assumes this role when accessing the data source.
Required if
Type
is specified asAWS_LAMBDA
,AMAZON_DYNAMODB
,AMAZON_ELASTICSEARCH
,AMAZON_EVENTBRIDGE
, orAMAZON_OPENSEARCH_SERVICE
.
- type
The type of the data source.
AWS_LAMBDA : The data source is an AWS Lambda function.
AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
AMAZON_ELASTICSEARCH : The data source is an Amazon OpenSearch Service domain.
AMAZON_EVENTBRIDGE : The data source is an Amazon EventBridge event bus.
AMAZON_OPENSEARCH_SERVICE : The data source is an Amazon OpenSearch Service domain.
NONE : There is no data source. This type is used when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.
HTTP : The data source is an HTTP endpoint.
RELATIONAL_DATABASE : The data source is a relational database.