@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:37:02.206Z") public abstract class BaseDataSource extends Construct
Do not use directly but use subclasses for concrete datasources
Example:
GraphqlApi api; MappingTemplate dummyRequest; MappingTemplate dummyResponse; ObjectType info = ObjectType.Builder.create("Info") .definition(Map.of( "node", ResolvableField.Builder.create() .returnType(GraphqlType.string()) .args(Map.of( "id", GraphqlType.string())) .dataSource(api.addNoneDataSource("none")) .requestMappingTemplate(dummyRequest) .responseMappingTemplate(dummyResponse) .build())) .build();
IConstruct.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
BaseDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
BaseDataSource(software.amazon.jsii.JsiiObjectRef objRef) |
protected |
BaseDataSource(software.constructs.Construct scope,
java.lang.String id,
BackedDataSourceProps props,
ExtendedDataSourceProps extended) |
Modifier and Type | Method and Description |
---|---|
AppsyncFunction |
createFunction(BaseAppsyncFunctionProps props)
(experimental) creates a new appsync function for this datasource and API using the given properties.
|
Resolver |
createResolver(BaseResolverProps props)
(experimental) creates a new resolver for this datasource and API using the given properties.
|
protected IGraphqlApi |
getApi() |
CfnDataSource |
getDs()
(experimental) the underlying CFN data source resource.
|
java.lang.String |
getName()
(experimental) the name of the data source.
|
protected IRole |
getServiceRole() |
protected void |
setApi(IGraphqlApi value) |
protected void |
setServiceRole(IRole value) |
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
protected BaseDataSource(software.amazon.jsii.JsiiObjectRef objRef)
protected BaseDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected BaseDataSource(software.constructs.Construct scope, java.lang.String id, BackedDataSourceProps props, ExtendedDataSourceProps extended)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.extended
- This parameter is required.public AppsyncFunction createFunction(BaseAppsyncFunctionProps props)
props
- This parameter is required.public Resolver createResolver(BaseResolverProps props)
props
- This parameter is required.public CfnDataSource getDs()
public java.lang.String getName()
protected IGraphqlApi getApi()
protected void setApi(IGraphqlApi value)
protected IRole getServiceRole()
protected void setServiceRole(IRole value)