Interface CfnDataSourceProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnDataSourceProps.Jsii$Proxy
CfnDataSource.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;
CfnDataSourceProps cfnDataSourceProps = CfnDataSourceProps.builder()
.apiId("apiId")
.name("name")
.type("type")
// the properties below are optional
.description("description")
.dynamoDbConfig(DynamoDBConfigProperty.builder()
.awsRegion("awsRegion")
.tableName("tableName")
// the properties below are optional
.deltaSyncConfig(DeltaSyncConfigProperty.builder()
.baseTableTtl("baseTableTtl")
.deltaSyncTableName("deltaSyncTableName")
.deltaSyncTableTtl("deltaSyncTableTtl")
.build())
.useCallerCredentials(false)
.versioned(false)
.build())
.elasticsearchConfig(ElasticsearchConfigProperty.builder()
.awsRegion("awsRegion")
.endpoint("endpoint")
.build())
.eventBridgeConfig(EventBridgeConfigProperty.builder()
.eventBusArn("eventBusArn")
.build())
.httpConfig(HttpConfigProperty.builder()
.endpoint("endpoint")
// the properties below are optional
.authorizationConfig(AuthorizationConfigProperty.builder()
.authorizationType("authorizationType")
// the properties below are optional
.awsIamConfig(AwsIamConfigProperty.builder()
.signingRegion("signingRegion")
.signingServiceName("signingServiceName")
.build())
.build())
.build())
.lambdaConfig(LambdaConfigProperty.builder()
.lambdaFunctionArn("lambdaFunctionArn")
.build())
.metricsConfig("metricsConfig")
.openSearchServiceConfig(OpenSearchServiceConfigProperty.builder()
.awsRegion("awsRegion")
.endpoint("endpoint")
.build())
.relationalDatabaseConfig(RelationalDatabaseConfigProperty.builder()
.relationalDatabaseSourceType("relationalDatabaseSourceType")
// the properties below are optional
.rdsHttpEndpointConfig(RdsHttpEndpointConfigProperty.builder()
.awsRegion("awsRegion")
.awsSecretStoreArn("awsSecretStoreArn")
.dbClusterIdentifier("dbClusterIdentifier")
// the properties below are optional
.databaseName("databaseName")
.schema("schema")
.build())
.build())
.serviceRoleArn("serviceRoleArn")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnDataSourcePropsstatic final classAn implementation forCfnDataSourceProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnDataSourceProps.Builderbuilder()getApiId()Unique AWS AppSync GraphQL API identifier where this data source will be created.default StringThe description of the data source.default ObjectAWS Region and TableName for an Amazon DynamoDB table in your account.default ObjectDeprecated.this property has been deprecateddefault ObjectAn EventBridge configuration that contains a valid ARN of an event bus.default ObjectEndpoints for an HTTP data source.default ObjectAn ARN of a Lambda function in valid ARN format.default StringEnables or disables enhanced data source metrics for specified data sources.getName()Friendly name for you to identify your AppSync data source after creation.default ObjectAWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.default ObjectRelational Database configuration of the relational database data source.default StringThe AWS Identity and Access Management service role ARN for the data source.getType()The type of the data source.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getApiId
Unique AWS AppSync GraphQL API identifier where this data source will be created.- See Also:
-
getName
Friendly name for you to identify your AppSync data source after creation.- See Also:
-
getType
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.
- AMAZON_BEDROCK_RUNTIME : The data source is the Amazon Bedrock runtime.
- 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.
- See Also:
-
getDescription
The description of the data source.- See Also:
-
getDynamoDbConfig
AWS Region and TableName for an Amazon DynamoDB table in your account.Returns union: either
IResolvableorCfnDataSource.DynamoDBConfigProperty- See Also:
-
getElasticsearchConfig
Deprecated.this property has been deprecatedReturns union: eitherIResolvableorCfnDataSource.ElasticsearchConfigProperty- See Also:
-
getEventBridgeConfig
An EventBridge configuration that contains a valid ARN of an event bus.Returns union: either
IResolvableorCfnDataSource.EventBridgeConfigProperty- See Also:
-
getHttpConfig
Endpoints for an HTTP data source.Returns union: either
IResolvableorCfnDataSource.HttpConfigProperty- See Also:
-
getLambdaConfig
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 union: either
IResolvableorCfnDataSource.LambdaConfigProperty- See Also:
-
getMetricsConfig
Enables or disables enhanced data source metrics for specified data sources.Note that
MetricsConfigwon't be used unless thedataSourceLevelMetricsBehaviorvalue is set toPER_DATA_SOURCE_METRICS. If thedataSourceLevelMetricsBehavioris set toFULL_REQUEST_DATA_SOURCE_METRICSinstead,MetricsConfigwill be ignored. However, you can still set its value.MetricsConfigcan beENABLEDorDISABLED.- See Also:
-
getOpenSearchServiceConfig
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.Returns union: either
IResolvableorCfnDataSource.OpenSearchServiceConfigProperty- See Also:
-
getRelationalDatabaseConfig
Relational Database configuration of the relational database data source.Returns union: either
IResolvableorCfnDataSource.RelationalDatabaseConfigProperty- See Also:
-
getServiceRoleArn
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
Typeis specified asAWS_LAMBDA,AMAZON_DYNAMODB,AMAZON_ELASTICSEARCH,AMAZON_EVENTBRIDGE,AMAZON_OPENSEARCH_SERVICE,RELATIONAL_DATABASE, orAMAZON_BEDROCK_RUNTIME.- See Also:
-
builder
- Returns:
- a
CfnDataSourceProps.BuilderofCfnDataSourceProps
-