BaseDataSource
- class aws_cdk.aws_appsync.BaseDataSource(scope, id, props, *, type, dynamo_db_config=None, elasticsearch_config=None, http_config=None, lambda_config=None, open_search_service_config=None, relational_database_config=None)
Bases:
Construct
(experimental) Abstract AppSync datasource implementation.
Do not use directly but use subclasses for concrete datasources
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# api: appsync.GraphqlApi # dummy_request: appsync.MappingTemplate # dummy_response: appsync.MappingTemplate info = appsync.ObjectType("Info", definition={ "node": appsync.ResolvableField( return_type=appsync.GraphqlType.string(), args={ "id": appsync.GraphqlType.string() }, data_source=api.add_none_data_source("none"), request_mapping_template=dummy_request, response_mapping_template=dummy_response ) } )
- Parameters:
scope (
Construct
) –id (
str
) –props (
Union
[BackedDataSourceProps
,Dict
[str
,Any
]]) –type (
str
) – (experimental) the type of the AppSync datasource.dynamo_db_config (
Union
[IResolvable
,DynamoDBConfigProperty
,Dict
[str
,Any
],None
]) – (experimental) configuration for DynamoDB Datasource. Default: - No configelasticsearch_config (
Union
[IResolvable
,ElasticsearchConfigProperty
,Dict
[str
,Any
],None
]) – (deprecated) configuration for Elasticsearch data source. Default: - No confighttp_config (
Union
[IResolvable
,HttpConfigProperty
,Dict
[str
,Any
],None
]) – (experimental) configuration for HTTP Datasource. Default: - No configlambda_config (
Union
[IResolvable
,LambdaConfigProperty
,Dict
[str
,Any
],None
]) – (experimental) configuration for Lambda Datasource. Default: - No configopen_search_service_config (
Union
[IResolvable
,OpenSearchServiceConfigProperty
,Dict
[str
,Any
],None
]) – (experimental) configuration for OpenSearch data source. Default: - No configrelational_database_config (
Union
[IResolvable
,RelationalDatabaseConfigProperty
,Dict
[str
,Any
],None
]) – (experimental) configuration for RDS Datasource. Default: - No config
- Stability:
experimental
Methods
- create_function(*, name, description=None, request_mapping_template=None, response_mapping_template=None)
(experimental) creates a new appsync function for this datasource and API using the given properties.
- Parameters:
name (
str
) – (experimental) the name of the AppSync Function.description (
Optional
[str
]) – (experimental) the description for this AppSync Function. Default: - no descriptionrequest_mapping_template (
Optional
[MappingTemplate
]) – (experimental) the request mapping template for the AppSync Function. Default: - no request mapping templateresponse_mapping_template (
Optional
[MappingTemplate
]) – (experimental) the response mapping template for the AppSync Function. Default: - no response mapping template
- Stability:
experimental
- Return type:
- create_resolver(*, field_name, type_name, caching_config=None, pipeline_config=None, request_mapping_template=None, response_mapping_template=None)
(experimental) creates a new resolver for this datasource and API using the given properties.
- Parameters:
field_name (
str
) – (experimental) name of the GraphQL field in the given type this resolver is attached to.type_name (
str
) – (experimental) name of the GraphQL type this resolver is attached to.caching_config (
Union
[CachingConfig
,Dict
[str
,Any
],None
]) – (experimental) The caching configuration for this resolver. Default: - No caching configurationpipeline_config (
Optional
[Sequence
[IAppsyncFunction
]]) – (experimental) configuration of the pipeline resolver. Default: - no pipeline resolver configuration An empty array | undefined sets resolver to be of kind, unitrequest_mapping_template (
Optional
[MappingTemplate
]) – (experimental) The request mapping template for this resolver. Default: - No mapping templateresponse_mapping_template (
Optional
[MappingTemplate
]) – (experimental) The response mapping template for this resolver. Default: - No mapping template
- Stability:
experimental
- Return type:
- to_string()
Returns a string representation of this construct.
- Return type:
str
Attributes
- ds
(experimental) the underlying CFN data source resource.
- Stability:
experimental
- name
(experimental) the name of the data source.
- Stability:
experimental
- node
The construct tree node associated with this construct.
Static Methods
- classmethod is_construct(x)
Return whether the given object is a Construct.
- Parameters:
x (
Any
) –- Return type:
bool