Class GraphqlApiBase
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.appsync.GraphqlApiBase
- All Implemented Interfaces:
IResource
,IGraphqlApi
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
- Direct Known Subclasses:
GraphqlApi
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-09-19T18:11:55.982Z")
@Stability(Stable)
public abstract class GraphqlApiBase
extends Resource
implements IGraphqlApi
Base Class for GraphQL API.
-
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
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.appsync.IGraphqlApi
IGraphqlApi.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
GraphqlApiBase
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
GraphqlApiBase
(software.amazon.jsii.JsiiObjectRef objRef) protected
GraphqlApiBase
(software.constructs.Construct scope, String id) protected
GraphqlApiBase
(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddDynamoDbDataSource
(String id, ITable table) add a new DynamoDB data source to this API.addDynamoDbDataSource
(String id, ITable table, DataSourceOptions options) add a new DynamoDB data source to this API.addElasticsearchDataSource
(String id, IDomain domain) Deprecated.addElasticsearchDataSource
(String id, IDomain domain, DataSourceOptions options) Deprecated.useaddOpenSearchDataSource
addEventBridgeDataSource
(String id, IEventBus eventBus) Add an EventBridge data source to this api.addEventBridgeDataSource
(String id, IEventBus eventBus, DataSourceOptions options) Add an EventBridge data source to this api.addHttpDataSource
(String id, String endpoint) add a new http data source to this API.addHttpDataSource
(String id, String endpoint, HttpDataSourceOptions options) add a new http data source to this API.addLambdaDataSource
(String id, IFunction lambdaFunction) add a new Lambda data source to this API.addLambdaDataSource
(String id, IFunction lambdaFunction, DataSourceOptions options) add a new Lambda data source to this API.add a new dummy data source to this API.addNoneDataSource
(String id, DataSourceOptions options) add a new dummy data source to this API.addOpenSearchDataSource
(String id, IDomain domain) add a new OpenSearch data source to this API.addOpenSearchDataSource
(String id, IDomain domain, DataSourceOptions options) add a new OpenSearch data source to this API.addRdsDataSource
(String id, IServerlessCluster serverlessCluster, ISecret secretStore) add a new Rds data source to this API.addRdsDataSource
(String id, IServerlessCluster serverlessCluster, ISecret secretStore, String databaseName) add a new Rds data source to this API.addRdsDataSource
(String id, IServerlessCluster serverlessCluster, ISecret secretStore, String databaseName, DataSourceOptions options) add a new Rds data source to this API.addRdsDataSourceV2
(String id, IDatabaseCluster serverlessCluster, ISecret secretStore) add a new Rds data source to this API.addRdsDataSourceV2
(String id, IDatabaseCluster serverlessCluster, ISecret secretStore, String databaseName) add a new Rds data source to this API.addRdsDataSourceV2
(String id, IDatabaseCluster serverlessCluster, ISecret secretStore, String databaseName, DataSourceOptions options) add a new Rds data source to this API.addSchemaDependency
(CfnResource construct) Add schema dependency if not imported.createResolver
(String id, ExtendedResolverProps props) creates a new resolver for this datasource and API using the given properties.abstract String
getApiId()
an unique AWS AppSync GraphQL API identifier i.e.abstract String
getArn()
the ARN of the API.abstract String
The GraphQL endpoint ARN.abstract List<AuthorizationType>
getModes()
The Authorization Types for this GraphQL Api.abstract Visibility
The visibility of the API.grant
(IGrantable grantee, IamResource resources, @NotNull String... actions) Adds an IAM policy statement associated with this GraphQLApi to an IAM principal's policy.grantMutation
(IGrantable grantee, @NotNull String... fields) Adds an IAM policy statement for Mutation access to this GraphQLApi to an IAM principal's policy.grantQuery
(IGrantable grantee, @NotNull String... fields) Adds an IAM policy statement for Query access to this GraphQLApi to an IAM principal's policy.grantSubscription
(IGrantable grantee, @NotNull String... fields) Adds an IAM policy statement for Subscription access to this GraphQLApi to an IAM principal's policy.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
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.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
GraphqlApiBase
protected GraphqlApiBase(software.amazon.jsii.JsiiObjectRef objRef) -
GraphqlApiBase
protected GraphqlApiBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
GraphqlApiBase
@Stability(Stable) protected GraphqlApiBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
GraphqlApiBase
@Stability(Stable) protected GraphqlApiBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
addDynamoDbDataSource
@Stability(Stable) @NotNull public DynamoDbDataSource addDynamoDbDataSource(@NotNull String id, @NotNull ITable table, @Nullable DataSourceOptions options) add a new DynamoDB data source to this API.- Specified by:
addDynamoDbDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.table
- The DynamoDB table backing this data source. This parameter is required.options
- The optional configuration for this data source.
-
addDynamoDbDataSource
@Stability(Stable) @NotNull public DynamoDbDataSource addDynamoDbDataSource(@NotNull String id, @NotNull ITable table) add a new DynamoDB data source to this API.- Specified by:
addDynamoDbDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.table
- The DynamoDB table backing this data source. This parameter is required.
-
addElasticsearchDataSource
@Stability(Deprecated) @Deprecated @NotNull public ElasticsearchDataSource addElasticsearchDataSource(@NotNull String id, @NotNull IDomain domain, @Nullable DataSourceOptions options) Deprecated.- use
addOpenSearchDataSource
(deprecated) add a new elasticsearch data source to this API.- Specified by:
addElasticsearchDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.domain
- The elasticsearch domain for this data source. This parameter is required.options
- The optional configuration for this data source.
- use
-
addElasticsearchDataSource
@Stability(Deprecated) @Deprecated @NotNull public ElasticsearchDataSource addElasticsearchDataSource(@NotNull String id, @NotNull IDomain domain) Deprecated.- use
addOpenSearchDataSource
(deprecated) add a new elasticsearch data source to this API.- Specified by:
addElasticsearchDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.domain
- The elasticsearch domain for this data source. This parameter is required.
- use
-
addEventBridgeDataSource
@Stability(Stable) @NotNull public EventBridgeDataSource addEventBridgeDataSource(@NotNull String id, @NotNull IEventBus eventBus, @Nullable DataSourceOptions options) Add an EventBridge data source to this api.- Specified by:
addEventBridgeDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.eventBus
- The EventBridge EventBus on which to put events. This parameter is required.options
- The optional configuration for this data source.
-
addEventBridgeDataSource
@Stability(Stable) @NotNull public EventBridgeDataSource addEventBridgeDataSource(@NotNull String id, @NotNull IEventBus eventBus) Add an EventBridge data source to this api.- Specified by:
addEventBridgeDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.eventBus
- The EventBridge EventBus on which to put events. This parameter is required.
-
addHttpDataSource
@Stability(Stable) @NotNull public HttpDataSource addHttpDataSource(@NotNull String id, @NotNull String endpoint, @Nullable HttpDataSourceOptions options) add a new http data source to this API.- Specified by:
addHttpDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.endpoint
- The http endpoint. This parameter is required.options
- The optional configuration for this data source.
-
addHttpDataSource
@Stability(Stable) @NotNull public HttpDataSource addHttpDataSource(@NotNull String id, @NotNull String endpoint) add a new http data source to this API.- Specified by:
addHttpDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.endpoint
- The http endpoint. This parameter is required.
-
addLambdaDataSource
@Stability(Stable) @NotNull public LambdaDataSource addLambdaDataSource(@NotNull String id, @NotNull IFunction lambdaFunction, @Nullable DataSourceOptions options) add a new Lambda data source to this API.- Specified by:
addLambdaDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.lambdaFunction
- The Lambda function to call to interact with this data source. This parameter is required.options
- The optional configuration for this data source.
-
addLambdaDataSource
@Stability(Stable) @NotNull public LambdaDataSource addLambdaDataSource(@NotNull String id, @NotNull IFunction lambdaFunction) add a new Lambda data source to this API.- Specified by:
addLambdaDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.lambdaFunction
- The Lambda function to call to interact with this data source. This parameter is required.
-
addNoneDataSource
@Stability(Stable) @NotNull public NoneDataSource addNoneDataSource(@NotNull String id, @Nullable DataSourceOptions options) add a new dummy data source to this API.Useful for pipeline resolvers and for backend changes that don't require a data source.
- Specified by:
addNoneDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.options
- The optional configuration for this data source.
-
addNoneDataSource
add a new dummy data source to this API.Useful for pipeline resolvers and for backend changes that don't require a data source.
- Specified by:
addNoneDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.
-
addOpenSearchDataSource
@Stability(Stable) @NotNull public OpenSearchDataSource addOpenSearchDataSource(@NotNull String id, @NotNull IDomain domain, @Nullable DataSourceOptions options) add a new OpenSearch data source to this API.- Specified by:
addOpenSearchDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.domain
- The OpenSearch domain for this data source. This parameter is required.options
- The optional configuration for this data source.
-
addOpenSearchDataSource
@Stability(Stable) @NotNull public OpenSearchDataSource addOpenSearchDataSource(@NotNull String id, @NotNull IDomain domain) add a new OpenSearch data source to this API.- Specified by:
addOpenSearchDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.domain
- The OpenSearch domain for this data source. This parameter is required.
-
addRdsDataSource
@Stability(Stable) @NotNull public RdsDataSource addRdsDataSource(@NotNull String id, @NotNull IServerlessCluster serverlessCluster, @NotNull ISecret secretStore, @Nullable String databaseName, @Nullable DataSourceOptions options) add a new Rds data source to this API.- Specified by:
addRdsDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.serverlessCluster
- The serverless cluster to interact with this data source. This parameter is required.secretStore
- The secret store that contains the username and password for the serverless cluster. This parameter is required.databaseName
- The optional name of the database to use within the cluster.options
- The optional configuration for this data source.
-
addRdsDataSource
@Stability(Stable) @NotNull public RdsDataSource addRdsDataSource(@NotNull String id, @NotNull IServerlessCluster serverlessCluster, @NotNull ISecret secretStore, @Nullable String databaseName) add a new Rds data source to this API.- Specified by:
addRdsDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.serverlessCluster
- The serverless cluster to interact with this data source. This parameter is required.secretStore
- The secret store that contains the username and password for the serverless cluster. This parameter is required.databaseName
- The optional name of the database to use within the cluster.
-
addRdsDataSource
@Stability(Stable) @NotNull public RdsDataSource addRdsDataSource(@NotNull String id, @NotNull IServerlessCluster serverlessCluster, @NotNull ISecret secretStore) add a new Rds data source to this API.- Specified by:
addRdsDataSource
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.serverlessCluster
- The serverless cluster to interact with this data source. This parameter is required.secretStore
- The secret store that contains the username and password for the serverless cluster. This parameter is required.
-
addRdsDataSourceV2
@Stability(Stable) @NotNull public RdsDataSource addRdsDataSourceV2(@NotNull String id, @NotNull IDatabaseCluster serverlessCluster, @NotNull ISecret secretStore, @Nullable String databaseName, @Nullable DataSourceOptions options) add a new Rds data source to this API.- Specified by:
addRdsDataSourceV2
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.serverlessCluster
- The serverless V2 cluster to interact with this data source. This parameter is required.secretStore
- The secret store that contains the username and password for the serverless cluster. This parameter is required.databaseName
- The optional name of the database to use within the cluster.options
- The optional configuration for this data source.
-
addRdsDataSourceV2
@Stability(Stable) @NotNull public RdsDataSource addRdsDataSourceV2(@NotNull String id, @NotNull IDatabaseCluster serverlessCluster, @NotNull ISecret secretStore, @Nullable String databaseName) add a new Rds data source to this API.- Specified by:
addRdsDataSourceV2
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.serverlessCluster
- The serverless V2 cluster to interact with this data source. This parameter is required.secretStore
- The secret store that contains the username and password for the serverless cluster. This parameter is required.databaseName
- The optional name of the database to use within the cluster.
-
addRdsDataSourceV2
@Stability(Stable) @NotNull public RdsDataSource addRdsDataSourceV2(@NotNull String id, @NotNull IDatabaseCluster serverlessCluster, @NotNull ISecret secretStore) add a new Rds data source to this API.- Specified by:
addRdsDataSourceV2
in interfaceIGraphqlApi
- Parameters:
id
- The data source's id. This parameter is required.serverlessCluster
- The serverless V2 cluster to interact with this data source. This parameter is required.secretStore
- The secret store that contains the username and password for the serverless cluster. This parameter is required.
-
addSchemaDependency
Add schema dependency if not imported.- Specified by:
addSchemaDependency
in interfaceIGraphqlApi
- Parameters:
construct
- the dependee. This parameter is required.
-
createResolver
@Stability(Stable) @NotNull public Resolver createResolver(@NotNull String id, @NotNull ExtendedResolverProps props) creates a new resolver for this datasource and API using the given properties.- Specified by:
createResolver
in interfaceIGraphqlApi
- Parameters:
id
- This parameter is required.props
- This parameter is required.
-
grant
@Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull IamResource resources, @NotNull @NotNull String... actions) Adds an IAM policy statement associated with this GraphQLApi to an IAM principal's policy.- Specified by:
grant
in interfaceIGraphqlApi
- Parameters:
grantee
- The principal. This parameter is required.resources
- The set of resources to allow (i.e. ...:[region]:[accountId]:apis/GraphQLId/...). This parameter is required.actions
- The actions that should be granted to the principal (i.e. appsync:graphql ). This parameter is required.
-
grantMutation
@Stability(Stable) @NotNull public Grant grantMutation(@NotNull IGrantable grantee, @NotNull @NotNull String... fields) Adds an IAM policy statement for Mutation access to this GraphQLApi to an IAM principal's policy.- Specified by:
grantMutation
in interfaceIGraphqlApi
- Parameters:
grantee
- The principal. This parameter is required.fields
- The fields to grant access to that are Mutations (leave blank for all). This parameter is required.
-
grantQuery
@Stability(Stable) @NotNull public Grant grantQuery(@NotNull IGrantable grantee, @NotNull @NotNull String... fields) Adds an IAM policy statement for Query access to this GraphQLApi to an IAM principal's policy.- Specified by:
grantQuery
in interfaceIGraphqlApi
- Parameters:
grantee
- The principal. This parameter is required.fields
- The fields to grant access to that are Queries (leave blank for all). This parameter is required.
-
grantSubscription
@Stability(Stable) @NotNull public Grant grantSubscription(@NotNull IGrantable grantee, @NotNull @NotNull String... fields) Adds an IAM policy statement for Subscription access to this GraphQLApi to an IAM principal's policy.- Specified by:
grantSubscription
in interfaceIGraphqlApi
- Parameters:
grantee
- The principal. This parameter is required.fields
- The fields to grant access to that are Subscriptions (leave blank for all). This parameter is required.
-
getApiId
an unique AWS AppSync GraphQL API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'.- Specified by:
getApiId
in interfaceIGraphqlApi
-
getArn
the ARN of the API.- Specified by:
getArn
in interfaceIGraphqlApi
-
getGraphQLEndpointArn
The GraphQL endpoint ARN.- Specified by:
getGraphQLEndpointArn
in interfaceIGraphqlApi
-
getModes
The Authorization Types for this GraphQL Api.- Specified by:
getModes
in interfaceIGraphqlApi
-
getVisibility
The visibility of the API.- Specified by:
getVisibility
in interfaceIGraphqlApi
-
addOpenSearchDataSource