Class CfnDataSource.Builder

java.lang.Object
software.amazon.awscdk.services.appsync.CfnDataSource.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDataSource>
Enclosing class:
CfnDataSource

@Stability(Stable) public static final class CfnDataSource.Builder extends Object implements software.amazon.jsii.Builder<CfnDataSource>
A fluent builder for CfnDataSource.
  • Method Details

    • create

      @Stability(Stable) public static CfnDataSource.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnDataSource.Builder.
    • apiId

      @Stability(Stable) public CfnDataSource.Builder apiId(String apiId)
      Unique AWS AppSync GraphQL API identifier where this data source will be created.

      Parameters:
      apiId - Unique AWS AppSync GraphQL API identifier where this data source will be created. This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public CfnDataSource.Builder name(String name)
      Friendly name for you to identify your AppSync data source after creation.

      Parameters:
      name - Friendly name for you to identify your AppSync data source after creation. This parameter is required.
      Returns:
      this
    • type

      @Stability(Stable) public CfnDataSource.Builder type(String type)
      The type of the data source.

      • AWS_LAMBDA : The data source is an AWS Lambda function.
      • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
      • AMAZON_ELASTICSEARCH : The data source is an Amazon OpenSearch Service domain.
      • AMAZON_EVENTBRIDGE : The data source is an Amazon EventBridge event bus.
      • AMAZON_OPENSEARCH_SERVICE : The data source is an Amazon OpenSearch Service domain.
      • NONE : There is no data source. This type is used when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.
      • HTTP : The data source is an HTTP endpoint.
      • RELATIONAL_DATABASE : The data source is a relational database.

      Parameters:
      type - The type of the data source. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public CfnDataSource.Builder description(String description)
      The description of the data source.

      Parameters:
      description - The description of the data source. This parameter is required.
      Returns:
      this
    • dynamoDbConfig

      @Stability(Stable) public CfnDataSource.Builder dynamoDbConfig(IResolvable dynamoDbConfig)
      AWS Region and TableName for an Amazon DynamoDB table in your account.

      Parameters:
      dynamoDbConfig - AWS Region and TableName for an Amazon DynamoDB table in your account. This parameter is required.
      Returns:
      this
    • dynamoDbConfig

      @Stability(Stable) public CfnDataSource.Builder dynamoDbConfig(CfnDataSource.DynamoDBConfigProperty dynamoDbConfig)
      AWS Region and TableName for an Amazon DynamoDB table in your account.

      Parameters:
      dynamoDbConfig - AWS Region and TableName for an Amazon DynamoDB table in your account. This parameter is required.
      Returns:
      this
    • elasticsearchConfig

      @Stability(Stable) public CfnDataSource.Builder elasticsearchConfig(IResolvable elasticsearchConfig)
      AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.

      As of September 2021, Amazon Elasticsearch Service is Amazon OpenSearch Service . This property is deprecated. For new data sources, use OpenSearchServiceConfig to specify an OpenSearch Service data source.

      Parameters:
      elasticsearchConfig - AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account. This parameter is required.
      Returns:
      this
    • elasticsearchConfig

      @Stability(Stable) public CfnDataSource.Builder elasticsearchConfig(CfnDataSource.ElasticsearchConfigProperty elasticsearchConfig)
      AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.

      As of September 2021, Amazon Elasticsearch Service is Amazon OpenSearch Service . This property is deprecated. For new data sources, use OpenSearchServiceConfig to specify an OpenSearch Service data source.

      Parameters:
      elasticsearchConfig - AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account. This parameter is required.
      Returns:
      this
    • eventBridgeConfig

      @Stability(Stable) public CfnDataSource.Builder eventBridgeConfig(IResolvable eventBridgeConfig)
      An EventBridge configuration that contains a valid ARN of an event bus.

      Parameters:
      eventBridgeConfig - An EventBridge configuration that contains a valid ARN of an event bus. This parameter is required.
      Returns:
      this
    • eventBridgeConfig

      @Stability(Stable) public CfnDataSource.Builder eventBridgeConfig(CfnDataSource.EventBridgeConfigProperty eventBridgeConfig)
      An EventBridge configuration that contains a valid ARN of an event bus.

      Parameters:
      eventBridgeConfig - An EventBridge configuration that contains a valid ARN of an event bus. This parameter is required.
      Returns:
      this
    • httpConfig

      @Stability(Stable) public CfnDataSource.Builder httpConfig(IResolvable httpConfig)
      Endpoints for an HTTP data source.

      Parameters:
      httpConfig - Endpoints for an HTTP data source. This parameter is required.
      Returns:
      this
    • httpConfig

      @Stability(Stable) public CfnDataSource.Builder httpConfig(CfnDataSource.HttpConfigProperty httpConfig)
      Endpoints for an HTTP data source.

      Parameters:
      httpConfig - Endpoints for an HTTP data source. This parameter is required.
      Returns:
      this
    • lambdaConfig

      @Stability(Stable) public CfnDataSource.Builder lambdaConfig(IResolvable lambdaConfig)
      An ARN of a Lambda function in valid ARN format.

      This can be the ARN of a Lambda function that exists in the current account or in another account.

      Parameters:
      lambdaConfig - An ARN of a Lambda function in valid ARN format. This parameter is required.
      Returns:
      this
    • lambdaConfig

      @Stability(Stable) public CfnDataSource.Builder lambdaConfig(CfnDataSource.LambdaConfigProperty lambdaConfig)
      An ARN of a Lambda function in valid ARN format.

      This can be the ARN of a Lambda function that exists in the current account or in another account.

      Parameters:
      lambdaConfig - An ARN of a Lambda function in valid ARN format. This parameter is required.
      Returns:
      this
    • openSearchServiceConfig

      @Stability(Stable) public CfnDataSource.Builder openSearchServiceConfig(IResolvable openSearchServiceConfig)
      AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.

      Parameters:
      openSearchServiceConfig - AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account. This parameter is required.
      Returns:
      this
    • openSearchServiceConfig

      @Stability(Stable) public CfnDataSource.Builder openSearchServiceConfig(CfnDataSource.OpenSearchServiceConfigProperty openSearchServiceConfig)
      AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.

      Parameters:
      openSearchServiceConfig - AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account. This parameter is required.
      Returns:
      this
    • relationalDatabaseConfig

      @Stability(Stable) public CfnDataSource.Builder relationalDatabaseConfig(IResolvable relationalDatabaseConfig)
      Relational Database configuration of the relational database data source.

      Parameters:
      relationalDatabaseConfig - Relational Database configuration of the relational database data source. This parameter is required.
      Returns:
      this
    • relationalDatabaseConfig

      @Stability(Stable) public CfnDataSource.Builder relationalDatabaseConfig(CfnDataSource.RelationalDatabaseConfigProperty relationalDatabaseConfig)
      Relational Database configuration of the relational database data source.

      Parameters:
      relationalDatabaseConfig - Relational Database configuration of the relational database data source. This parameter is required.
      Returns:
      this
    • serviceRoleArn

      @Stability(Stable) public CfnDataSource.Builder serviceRoleArn(String serviceRoleArn)
      The AWS Identity and Access Management service role ARN for the data source.

      The system assumes this role when accessing the data source.

      Required if Type is specified as AWS_LAMBDA , AMAZON_DYNAMODB , AMAZON_ELASTICSEARCH , AMAZON_EVENTBRIDGE , or AMAZON_OPENSEARCH_SERVICE .

      Parameters:
      serviceRoleArn - The AWS Identity and Access Management service role ARN for the data source. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnDataSource build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnDataSource>
      Returns:
      a newly built instance of CfnDataSource.