Class CfnDataSourceProps.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.CfnDataSourceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDataSourceProps>
- Enclosing interface:
CfnDataSourceProps
@Stability(Stable)
public static final class CfnDataSourceProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnDataSourceProps>
A builder for
CfnDataSourceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnDataSourceProps.getApiId()
build()
Builds the configured instance.description
(String description) Sets the value ofCfnDataSourceProps.getDescription()
dynamoDbConfig
(IResolvable dynamoDbConfig) Sets the value ofCfnDataSourceProps.getDynamoDbConfig()
dynamoDbConfig
(CfnDataSource.DynamoDBConfigProperty dynamoDbConfig) Sets the value ofCfnDataSourceProps.getDynamoDbConfig()
elasticsearchConfig
(IResolvable elasticsearchConfig) Sets the value ofCfnDataSourceProps.getElasticsearchConfig()
elasticsearchConfig
(CfnDataSource.ElasticsearchConfigProperty elasticsearchConfig) Sets the value ofCfnDataSourceProps.getElasticsearchConfig()
eventBridgeConfig
(IResolvable eventBridgeConfig) Sets the value ofCfnDataSourceProps.getEventBridgeConfig()
eventBridgeConfig
(CfnDataSource.EventBridgeConfigProperty eventBridgeConfig) Sets the value ofCfnDataSourceProps.getEventBridgeConfig()
httpConfig
(IResolvable httpConfig) Sets the value ofCfnDataSourceProps.getHttpConfig()
httpConfig
(CfnDataSource.HttpConfigProperty httpConfig) Sets the value ofCfnDataSourceProps.getHttpConfig()
lambdaConfig
(IResolvable lambdaConfig) Sets the value ofCfnDataSourceProps.getLambdaConfig()
lambdaConfig
(CfnDataSource.LambdaConfigProperty lambdaConfig) Sets the value ofCfnDataSourceProps.getLambdaConfig()
Sets the value ofCfnDataSourceProps.getName()
openSearchServiceConfig
(IResolvable openSearchServiceConfig) Sets the value ofCfnDataSourceProps.getOpenSearchServiceConfig()
openSearchServiceConfig
(CfnDataSource.OpenSearchServiceConfigProperty openSearchServiceConfig) Sets the value ofCfnDataSourceProps.getOpenSearchServiceConfig()
relationalDatabaseConfig
(IResolvable relationalDatabaseConfig) Sets the value ofCfnDataSourceProps.getRelationalDatabaseConfig()
relationalDatabaseConfig
(CfnDataSource.RelationalDatabaseConfigProperty relationalDatabaseConfig) Sets the value ofCfnDataSourceProps.getRelationalDatabaseConfig()
serviceRoleArn
(String serviceRoleArn) Sets the value ofCfnDataSourceProps.getServiceRoleArn()
Sets the value ofCfnDataSourceProps.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiId
Sets the value ofCfnDataSourceProps.getApiId()
- Parameters:
apiId
- Unique AWS AppSync GraphQL API identifier where this data source will be created. This parameter is required.- Returns:
this
-
name
Sets the value ofCfnDataSourceProps.getName()
- Parameters:
name
- Friendly name for you to identify your AppSync data source after creation. This parameter is required.- Returns:
this
-
type
Sets the value ofCfnDataSourceProps.getType()
- Parameters:
type
- The type of the data source. This parameter is required.- 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.
- Returns:
this
-
description
Sets the value ofCfnDataSourceProps.getDescription()
- Parameters:
description
- The description of the data source.- Returns:
this
-
dynamoDbConfig
Sets the value ofCfnDataSourceProps.getDynamoDbConfig()
- Parameters:
dynamoDbConfig
- AWS Region and TableName for an Amazon DynamoDB table in your account.- Returns:
this
-
dynamoDbConfig
@Stability(Stable) public CfnDataSourceProps.Builder dynamoDbConfig(CfnDataSource.DynamoDBConfigProperty dynamoDbConfig) Sets the value ofCfnDataSourceProps.getDynamoDbConfig()
- Parameters:
dynamoDbConfig
- AWS Region and TableName for an Amazon DynamoDB table in your account.- Returns:
this
-
elasticsearchConfig
@Stability(Stable) public CfnDataSourceProps.Builder elasticsearchConfig(IResolvable elasticsearchConfig) Sets the value ofCfnDataSourceProps.getElasticsearchConfig()
- Parameters:
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.- Returns:
this
-
elasticsearchConfig
@Stability(Stable) public CfnDataSourceProps.Builder elasticsearchConfig(CfnDataSource.ElasticsearchConfigProperty elasticsearchConfig) Sets the value ofCfnDataSourceProps.getElasticsearchConfig()
- Parameters:
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.- Returns:
this
-
eventBridgeConfig
@Stability(Stable) public CfnDataSourceProps.Builder eventBridgeConfig(IResolvable eventBridgeConfig) Sets the value ofCfnDataSourceProps.getEventBridgeConfig()
- Parameters:
eventBridgeConfig
- An EventBridge configuration that contains a valid ARN of an event bus.- Returns:
this
-
eventBridgeConfig
@Stability(Stable) public CfnDataSourceProps.Builder eventBridgeConfig(CfnDataSource.EventBridgeConfigProperty eventBridgeConfig) Sets the value ofCfnDataSourceProps.getEventBridgeConfig()
- Parameters:
eventBridgeConfig
- An EventBridge configuration that contains a valid ARN of an event bus.- Returns:
this
-
httpConfig
Sets the value ofCfnDataSourceProps.getHttpConfig()
- Parameters:
httpConfig
- Endpoints for an HTTP data source.- Returns:
this
-
httpConfig
@Stability(Stable) public CfnDataSourceProps.Builder httpConfig(CfnDataSource.HttpConfigProperty httpConfig) Sets the value ofCfnDataSourceProps.getHttpConfig()
- Parameters:
httpConfig
- Endpoints for an HTTP data source.- Returns:
this
-
lambdaConfig
Sets the value ofCfnDataSourceProps.getLambdaConfig()
- Parameters:
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.- Returns:
this
-
lambdaConfig
@Stability(Stable) public CfnDataSourceProps.Builder lambdaConfig(CfnDataSource.LambdaConfigProperty lambdaConfig) Sets the value ofCfnDataSourceProps.getLambdaConfig()
- Parameters:
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.- Returns:
this
-
openSearchServiceConfig
@Stability(Stable) public CfnDataSourceProps.Builder openSearchServiceConfig(IResolvable openSearchServiceConfig) Sets the value ofCfnDataSourceProps.getOpenSearchServiceConfig()
- Parameters:
openSearchServiceConfig
- AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.- Returns:
this
-
openSearchServiceConfig
@Stability(Stable) public CfnDataSourceProps.Builder openSearchServiceConfig(CfnDataSource.OpenSearchServiceConfigProperty openSearchServiceConfig) Sets the value ofCfnDataSourceProps.getOpenSearchServiceConfig()
- Parameters:
openSearchServiceConfig
- AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.- Returns:
this
-
relationalDatabaseConfig
@Stability(Stable) public CfnDataSourceProps.Builder relationalDatabaseConfig(IResolvable relationalDatabaseConfig) Sets the value ofCfnDataSourceProps.getRelationalDatabaseConfig()
- Parameters:
relationalDatabaseConfig
- Relational Database configuration of the relational database data source.- Returns:
this
-
relationalDatabaseConfig
@Stability(Stable) public CfnDataSourceProps.Builder relationalDatabaseConfig(CfnDataSource.RelationalDatabaseConfigProperty relationalDatabaseConfig) Sets the value ofCfnDataSourceProps.getRelationalDatabaseConfig()
- Parameters:
relationalDatabaseConfig
- Relational Database configuration of the relational database data source.- Returns:
this
-
serviceRoleArn
Sets the value ofCfnDataSourceProps.getServiceRoleArn()
- Parameters:
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 asAWS_LAMBDA
,AMAZON_DYNAMODB
,AMAZON_ELASTICSEARCH
,AMAZON_EVENTBRIDGE
, orAMAZON_OPENSEARCH_SERVICE
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnDataSourceProps>
- Returns:
- a new instance of
CfnDataSourceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-