Class CfnDataSource.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDataSource>
- Enclosing class:
CfnDataSource
CfnDataSource
.-
Method Summary
Modifier and TypeMethodDescriptionUnique AWS AppSync GraphQL API identifier where this data source will be created.build()
static CfnDataSource.Builder
description
(String description) The description of the data source.dynamoDbConfig
(IResolvable dynamoDbConfig) AWS Region and TableName for an Amazon DynamoDB table in your account.dynamoDbConfig
(CfnDataSource.DynamoDBConfigProperty dynamoDbConfig) AWS Region and TableName for an Amazon DynamoDB table in your account.elasticsearchConfig
(IResolvable elasticsearchConfig) AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.elasticsearchConfig
(CfnDataSource.ElasticsearchConfigProperty elasticsearchConfig) AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.eventBridgeConfig
(IResolvable eventBridgeConfig) An EventBridge configuration that contains a valid ARN of an event bus.eventBridgeConfig
(CfnDataSource.EventBridgeConfigProperty eventBridgeConfig) An EventBridge configuration that contains a valid ARN of an event bus.httpConfig
(IResolvable httpConfig) Endpoints for an HTTP data source.httpConfig
(CfnDataSource.HttpConfigProperty httpConfig) Endpoints for an HTTP data source.lambdaConfig
(IResolvable lambdaConfig) An ARN of a Lambda function in valid ARN format.lambdaConfig
(CfnDataSource.LambdaConfigProperty lambdaConfig) An ARN of a Lambda function in valid ARN format.Friendly name for you to identify your AppSync data source after creation.openSearchServiceConfig
(IResolvable openSearchServiceConfig) AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.openSearchServiceConfig
(CfnDataSource.OpenSearchServiceConfigProperty openSearchServiceConfig) AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.relationalDatabaseConfig
(IResolvable relationalDatabaseConfig) Relational Database configuration of the relational database data source.relationalDatabaseConfig
(CfnDataSource.RelationalDatabaseConfigProperty relationalDatabaseConfig) Relational Database configuration of the relational database data source.serviceRoleArn
(String serviceRoleArn) The AWS Identity and Access Management service role ARN for the data source.The type of the data source.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnDataSource.Builder
.
-
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
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
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
The description of the data source.- Parameters:
description
- The description of the data source. This parameter is required.- Returns:
this
-
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
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
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
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
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
.- Parameters:
serviceRoleArn
- The AWS Identity and Access Management service role ARN for the data source. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnDataSource>
- Returns:
- a newly built instance of
CfnDataSource
.
-