Class BaseDataSource
(experimental) Abstract AppSync datasource implementation.
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.AWS.AppSync.dll
Syntax (csharp)
public abstract class BaseDataSource : Construct, IConstruct, IDependable
Syntax (vb)
Public MustInherit Class BaseDataSource
Inherits Construct
Implements IConstruct, IDependable
Remarks
Do not use directly but use subclasses for concrete datasources
Stability: Experimental
ExampleMetadata: infused
Examples
GraphqlApi api;
MappingTemplate dummyRequest;
MappingTemplate dummyResponse;
var info = new ObjectType("Info", new ObjectTypeOptions {
Definition = new Dictionary<string, IField> {
{ "node", new ResolvableField(new ResolvableFieldOptions {
ReturnType = GraphqlType.String(),
Args = new Dictionary<string, GraphqlType> {
{ "id", GraphqlType.String() }
},
DataSource = api.AddNoneDataSource("none"),
RequestMappingTemplate = dummyRequest,
ResponseMappingTemplate = dummyResponse
}) }
}
});
Synopsis
Constructors
BaseDataSource(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
BaseDataSource(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
BaseDataSource(Construct, String, IBackedDataSourceProps, IExtendedDataSourceProps) |
Properties
Api | |
Ds | (experimental) the underlying CFN data source resource. |
Name | (experimental) the name of the data source. |
ServiceRole |
Methods
CreateFunction(IBaseAppsyncFunctionProps) | (experimental) creates a new appsync function for this datasource and API using the given properties. |
CreateResolver(IBaseResolverProps) | (experimental) creates a new resolver for this datasource and API using the given properties. |
Constructors
BaseDataSource(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected BaseDataSource(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
BaseDataSource(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected BaseDataSource(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
BaseDataSource(Construct, String, IBackedDataSourceProps, IExtendedDataSourceProps)
protected BaseDataSource(Construct scope, string id, IBackedDataSourceProps props, IExtendedDataSourceProps extended)
Parameters
- scope Constructs.Construct
- id System.String
- props IBackedDataSourceProps
- extended IExtendedDataSourceProps
Remarks
Stability: Experimental
Properties
Api
protected virtual IGraphqlApi Api { get; set; }
Property Value
Remarks
Stability: Experimental
Ds
(experimental) the underlying CFN data source resource.
public virtual CfnDataSource Ds { get; }
Property Value
Remarks
Stability: Experimental
Name
(experimental) the name of the data source.
public virtual string Name { get; }
Property Value
System.String
Remarks
Stability: Experimental
ServiceRole
protected virtual IRole ServiceRole { get; set; }
Property Value
Remarks
Stability: Experimental
Methods
CreateFunction(IBaseAppsyncFunctionProps)
(experimental) creates a new appsync function for this datasource and API using the given properties.
public virtual AppsyncFunction CreateFunction(IBaseAppsyncFunctionProps props)
Parameters
Returns
Remarks
Stability: Experimental
CreateResolver(IBaseResolverProps)
(experimental) creates a new resolver for this datasource and API using the given properties.
public virtual Resolver CreateResolver(IBaseResolverProps props)
Parameters
- props IBaseResolverProps
Returns
Remarks
Stability: Experimental