BaseDataSource

class aws_cdk.aws_appsync.BaseDataSource(scope, id, props, *, type, dynamo_db_config=None, elasticsearch_config=None, http_config=None, lambda_config=None, relational_database_config=None)

Bases: aws_cdk.core.Construct

Abstract AppSync datasource implementation.

Do not use directly but use subclasses for concrete datasources

stability :stability: experimental

__init__(scope, id, props, *, type, dynamo_db_config=None, elasticsearch_config=None, http_config=None, lambda_config=None, relational_database_config=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • props (BaseDataSourceProps) –

  • type (str) – the type of the AppSync datasource.

  • dynamo_db_config (Union[IResolvable, None, DynamoDBConfigProperty]) – configuration for DynamoDB Datasource. Default: - No config

  • elasticsearch_config (Union[IResolvable, None, ElasticsearchConfigProperty]) – configuration for Elasticsearch Datasource. Default: - No config

  • http_config (Union[IResolvable, None, HttpConfigProperty]) – configuration for HTTP Datasource. Default: - No config

  • lambda_config (Union[IResolvable, None, LambdaConfigProperty]) – configuration for Lambda Datasource. Default: - No config

  • relational_database_config (Union[IResolvable, None, RelationalDatabaseConfigProperty]) – configuration for RDS Datasource. Default: - No config

stability :stability: experimental

Return type

None

Methods

create_resolver(*, field_name, type_name, pipeline_config=None, request_mapping_template=None, response_mapping_template=None)

creates a new resolver for this datasource and API using the given properties.

Parameters
  • field_name (str) – name of the GraphQL fiel din the given type this resolver is attached to.

  • type_name (str) – name of the GraphQL type this resolver is attached to.

  • pipeline_config (Union[IResolvable, None, PipelineConfigProperty]) – configuration of the pipeline resolver. Default: - create a UNIT resolver

  • request_mapping_template (Optional[MappingTemplate]) – The request mapping template for this resolver. Default: - No mapping template

  • response_mapping_template (Optional[MappingTemplate]) – The response mapping template for this resolver. Default: - No mapping template

stability :stability: experimental

Return type

Resolver

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

ds

the underlying CFNN data source resource.

stability :stability: experimental

Return type

CfnDataSource

grant_principal

the principal of the data source to be IGrantable.

stability :stability: experimental

Return type

IPrincipal

name

the name of the data source.

stability :stability: experimental

Return type

str

node

Construct tree node which offers APIs for interacting with the construct tree.

Return type

ConstructNode

Static Methods

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool