Interface IGraphqlApi

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IDependable, IResource, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IGraphqlApi.Jsii$Default
All Known Implementing Classes:
GraphqlApi, GraphqlApiBase, IGraphqlApi.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:06.022Z") @Stability(Stable) public interface IGraphqlApi extends software.amazon.jsii.JsiiSerializable, IResource
Interface for GraphQL.
  • Method Details

    • getApiId

      @Stability(Stable) @NotNull String getApiId()
      an unique AWS AppSync GraphQL API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'.
    • getArn

      @Stability(Stable) @NotNull String getArn()
      the ARN of the API.
    • getGraphQLEndpointArn

      @Stability(Stable) @NotNull String getGraphQLEndpointArn()
      The GraphQL endpoint ARN.
    • getModes

      @Stability(Stable) @NotNull List<AuthorizationType> getModes()
      The Authorization Types for this GraphQL Api.
    • getVisibility

      @Stability(Stable) @NotNull Visibility getVisibility()
      the visibility of the API.
    • addDynamoDbDataSource

      @Stability(Stable) @NotNull DynamoDbDataSource addDynamoDbDataSource(@NotNull String id, @NotNull ITable table, @Nullable DataSourceOptions options)
      add a new DynamoDB data source to this API.

      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 DynamoDbDataSource addDynamoDbDataSource(@NotNull String id, @NotNull ITable table)
      add a new DynamoDB data source to this API.

      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 ElasticsearchDataSource addElasticsearchDataSource(@NotNull String id, @NotNull IDomain domain, @Nullable DataSourceOptions options)
      Deprecated.
      • use addOpenSearchDataSource
      (deprecated) add a new elasticsearch data source to this API.

      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.
    • addElasticsearchDataSource

      @Stability(Deprecated) @Deprecated @NotNull ElasticsearchDataSource addElasticsearchDataSource(@NotNull String id, @NotNull IDomain domain)
      Deprecated.
      • use addOpenSearchDataSource
      (deprecated) add a new elasticsearch data source to this API.

      Parameters:
      id - The data source's id. This parameter is required.
      domain - The elasticsearch domain for this data source. This parameter is required.
    • addEventBridgeDataSource

      @Stability(Stable) @NotNull EventBridgeDataSource addEventBridgeDataSource(@NotNull String id, @NotNull IEventBus eventBus, @Nullable DataSourceOptions options)
      Add an EventBridge data source to this api.

      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 EventBridgeDataSource addEventBridgeDataSource(@NotNull String id, @NotNull IEventBus eventBus)
      Add an EventBridge data source to this api.

      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 HttpDataSource addHttpDataSource(@NotNull String id, @NotNull String endpoint, @Nullable HttpDataSourceOptions options)
      add a new http data source to this API.

      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 HttpDataSource addHttpDataSource(@NotNull String id, @NotNull String endpoint)
      add a new http data source to this API.

      Parameters:
      id - The data source's id. This parameter is required.
      endpoint - The http endpoint. This parameter is required.
    • addLambdaDataSource

      @Stability(Stable) @NotNull LambdaDataSource addLambdaDataSource(@NotNull String id, @NotNull IFunction lambdaFunction, @Nullable DataSourceOptions options)
      add a new Lambda data source to this API.

      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 LambdaDataSource addLambdaDataSource(@NotNull String id, @NotNull IFunction lambdaFunction)
      add a new Lambda data source to this API.

      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 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.

      Parameters:
      id - The data source's id. This parameter is required.
      options - The optional configuration for this data source.
    • addNoneDataSource

      @Stability(Stable) @NotNull NoneDataSource addNoneDataSource(@NotNull String id)
      add a new dummy data source to this API.

      Useful for pipeline resolvers and for backend changes that don't require a data source.

      Parameters:
      id - The data source's id. This parameter is required.
    • addOpenSearchDataSource

      @Stability(Stable) @NotNull OpenSearchDataSource addOpenSearchDataSource(@NotNull String id, @NotNull IDomain domain, @Nullable DataSourceOptions options)
      Add a new OpenSearch data source to this API.

      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 OpenSearchDataSource addOpenSearchDataSource(@NotNull String id, @NotNull IDomain domain)
      Add a new OpenSearch data source to this API.

      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 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.

      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 RdsDataSource addRdsDataSource(@NotNull String id, @NotNull IServerlessCluster serverlessCluster, @NotNull ISecret secretStore, @Nullable String databaseName)
      add a new Rds data source to this API.

      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 RdsDataSource addRdsDataSource(@NotNull String id, @NotNull IServerlessCluster serverlessCluster, @NotNull ISecret secretStore)
      add a new Rds data source to this API.

      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 RdsDataSource addRdsDataSourceV2(@NotNull String id, @NotNull IDatabaseCluster serverlessCluster, @NotNull ISecret secretStore, @Nullable String databaseName, @Nullable DataSourceOptions options)
      add a new Rds Serverless V2 data source to this API.

      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 RdsDataSource addRdsDataSourceV2(@NotNull String id, @NotNull IDatabaseCluster serverlessCluster, @NotNull ISecret secretStore, @Nullable String databaseName)
      add a new Rds Serverless V2 data source to this API.

      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 RdsDataSource addRdsDataSourceV2(@NotNull String id, @NotNull IDatabaseCluster serverlessCluster, @NotNull ISecret secretStore)
      add a new Rds Serverless V2 data source to this API.

      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

      @Stability(Stable) @NotNull Boolean addSchemaDependency(@NotNull CfnResource construct)
      Add schema dependency if not imported.

      Parameters:
      construct - the dependee. This parameter is required.
    • createResolver

      @Stability(Stable) @NotNull Resolver createResolver(@NotNull String id, @NotNull ExtendedResolverProps 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.
    • grant

      @Stability(Stable) @NotNull 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.

      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 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.

      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 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.

      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 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.

      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.