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.104.0 (build e79254c)",
date="2024-12-06T14:43:14.298Z")
@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.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
BaseDataSource
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
BaseDataSource
(software.amazon.jsii.JsiiObjectRef objRef) protected
BaseDataSource
(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 IGraphqlApi
getApi()
getDs()
the underlying CFN data source resource.getName()
the name of the data source.protected IRole
protected void
setApi
(IGraphqlApi value) protected void
setServiceRole
(IRole value) Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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
-