class GraphqlApiBase
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppSync.GraphqlApiBase |
Java | software.amazon.awscdk.services.appsync.GraphqlApiBase |
Python | aws_cdk.aws_appsync.GraphqlApiBase |
TypeScript (source) | @aws-cdk/aws-appsync 禄 GraphqlApiBase |
Implements
IConstruct
, IConstruct
, IDependable
, IResource
, IGraphql
Extends
Resource
Implemented by
Graphql
Base Class for GraphQL API.
Initializer
new GraphqlApiBase(scope: Construct, id: string, props?: ResourceProps)
Parameters
- scope
Construct
- id
string
- props
Resource
Props
Properties
Name | Type | Description |
---|---|---|
api | string | an unique AWS AppSync GraphQL API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'. |
arn | string | the ARN of the API. |
env | Resource | The environment this resource belongs to. |
node | Construct | The construct tree node associated with this construct. |
stack | Stack | The stack in which this resource is defined. |
apiId
Type:
string
an unique AWS AppSync GraphQL API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'.
arn
Type:
string
the ARN of the API.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
node
Type:
Construct
The construct tree node associated with this construct.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
add | add a new DynamoDB data source to this API. |
add | add a new elasticsearch data source to this API. |
add | add a new http data source to this API. |
add | add a new Lambda data source to this API. |
add | add a new dummy data source to this API. |
add | add a new OpenSearch data source to this API. |
add | add a new Rds data source to this API. |
add | Add schema dependency if not imported. |
apply | Apply the given removal policy to this resource. |
create | creates a new resolver for this datasource and API using the given properties. |
to | Returns a string representation of this construct. |
addDynamoDbDataSource(id, table, options?)
public addDynamoDbDataSource(id: string, table: ITable, options?: DataSourceOptions): DynamoDbDataSource
Parameters
- id
string
鈥� The data source's id. - table
ITable
鈥� The DynamoDB table backing this data source. - options
Data
鈥� The optional configuration for this data source.Source Options
Returns
add a new DynamoDB data source to this API.
addElasticsearchDataSource(id, domain, options?)
public addElasticsearchDataSource(id: string, domain: IDomain, options?: DataSourceOptions): ElasticsearchDataSource
鈿狅笍 Deprecated: - use addOpenSearchDataSource
Parameters
- id
string
鈥� The data source's id. - domain
IDomain
鈥� The elasticsearch domain for this data source. - options
Data
鈥� The optional configuration for this data source.Source Options
Returns
add a new elasticsearch data source to this API.
addHttpDataSource(id, endpoint, options?)
public addHttpDataSource(id: string, endpoint: string, options?: HttpDataSourceOptions): HttpDataSource
Parameters
- id
string
鈥� The data source's id. - endpoint
string
鈥� The http endpoint. - options
Http
鈥� The optional configuration for this data source.Data Source Options
Returns
add a new http data source to this API.
addLambdaDataSource(id, lambdaFunction, options?)
public addLambdaDataSource(id: string, lambdaFunction: IFunction, options?: DataSourceOptions): LambdaDataSource
Parameters
- id
string
鈥� The data source's id. - lambdaFunction
IFunction
鈥� The Lambda function to call to interact with this data source. - options
Data
鈥� The optional configuration for this data source.Source Options
Returns
add a new Lambda data source to this API.
addNoneDataSource(id, options?)
public addNoneDataSource(id: string, options?: DataSourceOptions): NoneDataSource
Parameters
- id
string
鈥� The data source's id. - options
Data
鈥� The optional configuration for this data source.Source Options
Returns
add a new dummy data source to this API.
Useful for pipeline resolvers and for backend changes that don't require a data source.
addOpenSearchDataSource(id, domain, options?)
public addOpenSearchDataSource(id: string, domain: IDomain, options?: DataSourceOptions): OpenSearchDataSource
Parameters
- id
string
鈥� The data source's id. - domain
IDomain
鈥� The OpenSearch domain for this data source. - options
Data
鈥� The optional configuration for this data source.Source Options
Returns
add a new OpenSearch data source to this API.
addRdsDataSource(id, serverlessCluster, secretStore, databaseName?, options?)
public addRdsDataSource(id: string, serverlessCluster: IServerlessCluster, secretStore: ISecret, databaseName?: string, options?: DataSourceOptions): RdsDataSource
Parameters
- id
string
鈥� The data source's id. - serverlessCluster
IServerless
鈥� The serverless cluster to interact with this data source.Cluster - secretStore
ISecret
鈥� The secret store that contains the username and password for the serverless cluster. - databaseName
string
鈥� The optional name of the database to use within the cluster. - options
Data
鈥� The optional configuration for this data source.Source Options
Returns
add a new Rds data source to this API.
addSchemaDependency(construct)
public addSchemaDependency(construct: CfnResource): boolean
Parameters
- construct
Cfn
鈥� the dependee.Resource
Returns
boolean
Add schema dependency if not imported.
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
createResolver(props)
public createResolver(props: ExtendedResolverProps): Resolver
Parameters
- props
Extended
Resolver Props
Returns
creates a new resolver for this datasource and API using the given properties.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.