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.97.0 (build 729de35)", date="2024-04-18T17:54:12.730Z") @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

    Constructors
    Modifier
    Constructor
    Description
    protected
    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 Type
    Method
    Description
    creates a new appsync function for this datasource and API using the given properties.
    creates a new resolver for this datasource and API using the given properties.
    protected IGraphqlApi
     
    the underlying CFN data source resource.
    the name of the data source.
    protected IRole
     
    protected void
     
    protected void
     

    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

      @Stability(Stable) @NotNull public CfnDataSource getDs()
      the underlying CFN data source resource.
    • getName

      @Stability(Stable) @NotNull public String getName()
      the name of the data source.
    • getApi

      @Stability(Stable) @NotNull protected IGraphqlApi getApi()
    • setApi

      @Stability(Stable) protected void setApi(@NotNull IGraphqlApi value)
    • getServiceRole

      @Stability(Stable) @Nullable protected IRole getServiceRole()
    • setServiceRole

      @Stability(Stable) protected void setServiceRole(@Nullable IRole value)