Interface DataSource.Builder

All Superinterfaces:
Buildable, CopyableBuilder<DataSource.Builder,DataSource>, SdkBuilder<DataSource.Builder,DataSource>, SdkPojo
Enclosing class:
DataSource

public static interface DataSource.Builder extends SdkPojo, CopyableBuilder<DataSource.Builder,DataSource>
  • Method Details

    • dataSourceArn

      DataSource.Builder dataSourceArn(String dataSourceArn)

      The data source Amazon Resource Name (ARN).

      Parameters:
      dataSourceArn - The data source Amazon Resource Name (ARN).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • name

      The name of the data source.

      Parameters:
      name - The name of the data source.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      DataSource.Builder description(String description)

      The description of the data source.

      Parameters:
      description - The description of the data source.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • type

      The type of the data source.

      • AWS_LAMBDA: The data source is an Lambda function.

      • AMAZON_DYNAMODB: The data source is an Amazon DynamoDB table.

      • AMAZON_ELASTICSEARCH: The data source is an Amazon OpenSearch Service domain.

      • AMAZON_OPENSEARCH_SERVICE: The data source is an Amazon OpenSearch Service domain.

      • AMAZON_EVENTBRIDGE: The data source is an Amazon EventBridge configuration.

      • NONE: There is no data source. Use this type when you want to invoke a GraphQL operation without connecting to a data source, such as when you're performing data transformation with resolvers or invoking a subscription 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.

      • AWS_LAMBDA: The data source is an Lambda function.

      • AMAZON_DYNAMODB: The data source is an Amazon DynamoDB table.

      • AMAZON_ELASTICSEARCH: The data source is an Amazon OpenSearch Service domain.

      • AMAZON_OPENSEARCH_SERVICE: The data source is an Amazon OpenSearch Service domain.

      • AMAZON_EVENTBRIDGE: The data source is an Amazon EventBridge configuration.

      • NONE: There is no data source. Use this type when you want to invoke a GraphQL operation without connecting to a data source, such as when you're performing data transformation with resolvers or invoking a subscription from a mutation.

      • HTTP: The data source is an HTTP endpoint.

      • RELATIONAL_DATABASE: The data source is a relational database.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      The type of the data source.

      • AWS_LAMBDA: The data source is an Lambda function.

      • AMAZON_DYNAMODB: The data source is an Amazon DynamoDB table.

      • AMAZON_ELASTICSEARCH: The data source is an Amazon OpenSearch Service domain.

      • AMAZON_OPENSEARCH_SERVICE: The data source is an Amazon OpenSearch Service domain.

      • AMAZON_EVENTBRIDGE: The data source is an Amazon EventBridge configuration.

      • NONE: There is no data source. Use this type when you want to invoke a GraphQL operation without connecting to a data source, such as when you're performing data transformation with resolvers or invoking a subscription 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.

      • AWS_LAMBDA: The data source is an Lambda function.

      • AMAZON_DYNAMODB: The data source is an Amazon DynamoDB table.

      • AMAZON_ELASTICSEARCH: The data source is an Amazon OpenSearch Service domain.

      • AMAZON_OPENSEARCH_SERVICE: The data source is an Amazon OpenSearch Service domain.

      • AMAZON_EVENTBRIDGE: The data source is an Amazon EventBridge configuration.

      • NONE: There is no data source. Use this type when you want to invoke a GraphQL operation without connecting to a data source, such as when you're performing data transformation with resolvers or invoking a subscription from a mutation.

      • HTTP: The data source is an HTTP endpoint.

      • RELATIONAL_DATABASE: The data source is a relational database.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • serviceRoleArn

      DataSource.Builder serviceRoleArn(String serviceRoleArn)

      The Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source. The system assumes this role when accessing the data source.

      Parameters:
      serviceRoleArn - The Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source. The system assumes this role when accessing the data source.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dynamodbConfig

      DataSource.Builder dynamodbConfig(DynamodbDataSourceConfig dynamodbConfig)

      DynamoDB settings.

      Parameters:
      dynamodbConfig - DynamoDB settings.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • dynamodbConfig

      default DataSource.Builder dynamodbConfig(Consumer<DynamodbDataSourceConfig.Builder> dynamodbConfig)

      DynamoDB settings.

      This is a convenience method that creates an instance of the DynamodbDataSourceConfig.Builder avoiding the need to create one manually via DynamodbDataSourceConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to dynamodbConfig(DynamodbDataSourceConfig).

      Parameters:
      dynamodbConfig - a consumer that will call methods on DynamodbDataSourceConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • lambdaConfig

      DataSource.Builder lambdaConfig(LambdaDataSourceConfig lambdaConfig)

      Lambda settings.

      Parameters:
      lambdaConfig - Lambda settings.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • lambdaConfig

      default DataSource.Builder lambdaConfig(Consumer<LambdaDataSourceConfig.Builder> lambdaConfig)

      Lambda settings.

      This is a convenience method that creates an instance of the LambdaDataSourceConfig.Builder avoiding the need to create one manually via LambdaDataSourceConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to lambdaConfig(LambdaDataSourceConfig).

      Parameters:
      lambdaConfig - a consumer that will call methods on LambdaDataSourceConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • elasticsearchConfig

      DataSource.Builder elasticsearchConfig(ElasticsearchDataSourceConfig elasticsearchConfig)

      Amazon OpenSearch Service settings.

      Parameters:
      elasticsearchConfig - Amazon OpenSearch Service settings.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • elasticsearchConfig

      default DataSource.Builder elasticsearchConfig(Consumer<ElasticsearchDataSourceConfig.Builder> elasticsearchConfig)

      Amazon OpenSearch Service settings.

      This is a convenience method that creates an instance of the ElasticsearchDataSourceConfig.Builder avoiding the need to create one manually via ElasticsearchDataSourceConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to elasticsearchConfig(ElasticsearchDataSourceConfig).

      Parameters:
      elasticsearchConfig - a consumer that will call methods on ElasticsearchDataSourceConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • openSearchServiceConfig

      DataSource.Builder openSearchServiceConfig(OpenSearchServiceDataSourceConfig openSearchServiceConfig)

      Amazon OpenSearch Service settings.

      Parameters:
      openSearchServiceConfig - Amazon OpenSearch Service settings.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • openSearchServiceConfig

      default DataSource.Builder openSearchServiceConfig(Consumer<OpenSearchServiceDataSourceConfig.Builder> openSearchServiceConfig)

      Amazon OpenSearch Service settings.

      This is a convenience method that creates an instance of the OpenSearchServiceDataSourceConfig.Builder avoiding the need to create one manually via OpenSearchServiceDataSourceConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to openSearchServiceConfig(OpenSearchServiceDataSourceConfig).

      Parameters:
      openSearchServiceConfig - a consumer that will call methods on OpenSearchServiceDataSourceConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • httpConfig

      DataSource.Builder httpConfig(HttpDataSourceConfig httpConfig)

      HTTP endpoint settings.

      Parameters:
      httpConfig - HTTP endpoint settings.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • httpConfig

      default DataSource.Builder httpConfig(Consumer<HttpDataSourceConfig.Builder> httpConfig)

      HTTP endpoint settings.

      This is a convenience method that creates an instance of the HttpDataSourceConfig.Builder avoiding the need to create one manually via HttpDataSourceConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to httpConfig(HttpDataSourceConfig).

      Parameters:
      httpConfig - a consumer that will call methods on HttpDataSourceConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • relationalDatabaseConfig

      DataSource.Builder relationalDatabaseConfig(RelationalDatabaseDataSourceConfig relationalDatabaseConfig)

      Relational database settings.

      Parameters:
      relationalDatabaseConfig - Relational database settings.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • relationalDatabaseConfig

      default DataSource.Builder relationalDatabaseConfig(Consumer<RelationalDatabaseDataSourceConfig.Builder> relationalDatabaseConfig)

      Relational database settings.

      This is a convenience method that creates an instance of the RelationalDatabaseDataSourceConfig.Builder avoiding the need to create one manually via RelationalDatabaseDataSourceConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to relationalDatabaseConfig(RelationalDatabaseDataSourceConfig).

      Parameters:
      relationalDatabaseConfig - a consumer that will call methods on RelationalDatabaseDataSourceConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • eventBridgeConfig

      DataSource.Builder eventBridgeConfig(EventBridgeDataSourceConfig eventBridgeConfig)

      Amazon EventBridge settings.

      Parameters:
      eventBridgeConfig - Amazon EventBridge settings.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • eventBridgeConfig

      default DataSource.Builder eventBridgeConfig(Consumer<EventBridgeDataSourceConfig.Builder> eventBridgeConfig)

      Amazon EventBridge settings.

      This is a convenience method that creates an instance of the EventBridgeDataSourceConfig.Builder avoiding the need to create one manually via EventBridgeDataSourceConfig.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to eventBridgeConfig(EventBridgeDataSourceConfig).

      Parameters:
      eventBridgeConfig - a consumer that will call methods on EventBridgeDataSourceConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • metricsConfig

      DataSource.Builder metricsConfig(String metricsConfig)

      Enables or disables enhanced data source metrics for specified data sources. Note that metricsConfig won't be used unless the dataSourceLevelMetricsBehavior value is set to PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be ignored. However, you can still set its value.

      metricsConfig can be ENABLED or DISABLED.

      Parameters:
      metricsConfig - Enables or disables enhanced data source metrics for specified data sources. Note that metricsConfig won't be used unless the dataSourceLevelMetricsBehavior value is set to PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be ignored. However, you can still set its value.

      metricsConfig can be ENABLED or DISABLED.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • metricsConfig

      DataSource.Builder metricsConfig(DataSourceLevelMetricsConfig metricsConfig)

      Enables or disables enhanced data source metrics for specified data sources. Note that metricsConfig won't be used unless the dataSourceLevelMetricsBehavior value is set to PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be ignored. However, you can still set its value.

      metricsConfig can be ENABLED or DISABLED.

      Parameters:
      metricsConfig - Enables or disables enhanced data source metrics for specified data sources. Note that metricsConfig won't be used unless the dataSourceLevelMetricsBehavior value is set to PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be ignored. However, you can still set its value.

      metricsConfig can be ENABLED or DISABLED.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: