Class BaseDataSource
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.appsync.BaseDataSource
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
BackedDataSource,NoneDataSource
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:14.682Z")
@Stability(Stable)
public abstract class BaseDataSource
extends software.constructs.Construct
Abstract AppSync datasource implementation.
Do not use directly but use subclasses for concrete datasources
Example:
GraphqlApi api;
AppsyncFunction appsyncFunction;
Resolver pipelineResolver = Resolver.Builder.create(this, "pipeline")
.api(api)
.dataSource(api.addNoneDataSource("none"))
.typeName("typeName")
.fieldName("fieldName")
.requestMappingTemplate(MappingTemplate.fromFile("beforeRequest.vtl"))
.pipelineConfig(List.of(appsyncFunction))
.responseMappingTemplate(MappingTemplate.fromFile("afterResponse.vtl"))
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedBaseDataSource(software.amazon.jsii.JsiiObjectRef objRef) protectedBaseDataSource(software.constructs.Construct scope, String id, BackedDataSourceProps props, ExtendedDataSourceProps extended) -
Method Summary
Modifier and TypeMethodDescriptioncreateFunction(String id, BaseAppsyncFunctionProps props) creates a new appsync function for this datasource and API using the given properties.createResolver(String id, BaseResolverProps props) creates a new resolver for this datasource and API using the given properties.protected IGraphqlApigetApi()getDs()the underlying CFN data source resource.getName()the name of the data source.protected IRoleprotected voidsetApi(IGraphqlApi value) protected voidsetServiceRole(IRole value) Methods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
BaseDataSource
protected BaseDataSource(software.amazon.jsii.JsiiObjectRef objRef) -
BaseDataSource
protected BaseDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
BaseDataSource
@Stability(Stable) protected BaseDataSource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull BackedDataSourceProps props, @NotNull ExtendedDataSourceProps extended) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.extended- This parameter is required.
-
-
Method Details
-
createFunction
@Stability(Stable) @NotNull public AppsyncFunction createFunction(@NotNull String id, @NotNull BaseAppsyncFunctionProps props) creates a new appsync function for this datasource and API using the given properties.- Parameters:
id- This parameter is required.props- This parameter is required.
-
createResolver
@Stability(Stable) @NotNull public Resolver createResolver(@NotNull String id, @NotNull BaseResolverProps props) creates a new resolver for this datasource and API using the given properties.- Parameters:
id- This parameter is required.props- This parameter is required.
-
getDs
the underlying CFN data source resource. -
getName
the name of the data source. -
getApi
-
setApi
-
getServiceRole
-
setServiceRole
-