@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:51.442Z") public class CfnDataSource extends CfnResource implements IInspectable
The AWS::AppSync::DataSource
resource creates data sources for resolvers in AWS AppSync to connect to, such as Amazon DynamoDB , AWS Lambda , and Amazon OpenSearch Service . Resolvers use these data sources to fetch data when clients make GraphQL calls.
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.*; CfnDataSource cfnDataSource = CfnDataSource.Builder.create(this, "MyCfnDataSource") .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()) .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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnDataSource.AuthorizationConfigProperty
The `AuthorizationConfig` property type specifies the authorization type and configuration for an AWS AppSync http data source.
|
static interface |
CfnDataSource.AwsIamConfigProperty
Use the `AwsIamConfig` property type to specify `AwsIamConfig` for a AWS AppSync authorizaton.
|
static class |
CfnDataSource.Builder
A fluent builder for
CfnDataSource . |
static interface |
CfnDataSource.DeltaSyncConfigProperty
Describes a Delta Sync configuration.
|
static interface |
CfnDataSource.DynamoDBConfigProperty
The `DynamoDBConfig` property type specifies the `AwsRegion` and `TableName` for an Amazon DynamoDB table in your account for an AWS AppSync data source.
|
static interface |
CfnDataSource.ElasticsearchConfigProperty
The `ElasticsearchConfig` property type specifies the `AwsRegion` and `Endpoints` for an Amazon OpenSearch Service domain in your account for an AWS AppSync data source.
|
static interface |
CfnDataSource.EventBridgeConfigProperty
The data source.
|
static interface |
CfnDataSource.HttpConfigProperty
Use the `HttpConfig` property type to specify `HttpConfig` for an AWS AppSync data source.
|
static interface |
CfnDataSource.LambdaConfigProperty
The `LambdaConfig` property type specifies the Lambda function ARN for an AWS AppSync data source.
|
static interface |
CfnDataSource.OpenSearchServiceConfigProperty
The `OpenSearchServiceConfig` property type specifies the `AwsRegion` and `Endpoints` for an Amazon OpenSearch Service domain in your account for an AWS AppSync data source.
|
static interface |
CfnDataSource.RdsHttpEndpointConfigProperty
Use the `RdsHttpEndpointConfig` property type to specify the `RdsHttpEndpoint` for an AWS AppSync relational database.
|
static interface |
CfnDataSource.RelationalDatabaseConfigProperty
Use the `RelationalDatabaseConfig` property type to specify `RelationalDatabaseConfig` for an AWS AppSync data source.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnDataSource(Construct scope,
java.lang.String id,
CfnDataSourceProps props)
Create a new `AWS::AppSync::DataSource`.
|
protected |
CfnDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnDataSource(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getApiId()
Unique AWS AppSync GraphQL API identifier where this data source will be created.
|
java.lang.String |
getAttrDataSourceArn()
The Amazon Resource Name (ARN) of the API key, such as `arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/datasources/datasourcename` .
|
java.lang.String |
getAttrName()
Friendly name for you to identify your AWS AppSync data source after creation.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDescription()
The description of the data source.
|
java.lang.Object |
getDynamoDbConfig()
AWS Region and TableName for an Amazon DynamoDB table in your account.
|
java.lang.Object |
getElasticsearchConfig()
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
|
java.lang.Object |
getEventBridgeConfig()
An EventBridge configuration that contains a valid ARN of an event bus.
|
java.lang.Object |
getHttpConfig()
Endpoints for an HTTP data source.
|
java.lang.Object |
getLambdaConfig()
An ARN of a Lambda function in valid ARN format.
|
java.lang.String |
getName()
Friendly name for you to identify your AppSync data source after creation.
|
java.lang.Object |
getOpenSearchServiceConfig()
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
|
java.lang.Object |
getRelationalDatabaseConfig()
Relational Database configuration of the relational database data source.
|
java.lang.String |
getServiceRoleArn()
The AWS Identity and Access Management service role ARN for the data source.
|
java.lang.String |
getType()
The type of the data source.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setApiId(java.lang.String value)
Unique AWS AppSync GraphQL API identifier where this data source will be created.
|
void |
setDescription(java.lang.String value)
The description of the data source.
|
void |
setDynamoDbConfig(CfnDataSource.DynamoDBConfigProperty value)
AWS Region and TableName for an Amazon DynamoDB table in your account.
|
void |
setDynamoDbConfig(IResolvable value)
AWS Region and TableName for an Amazon DynamoDB table in your account.
|
void |
setElasticsearchConfig(CfnDataSource.ElasticsearchConfigProperty value)
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
|
void |
setElasticsearchConfig(IResolvable value)
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
|
void |
setEventBridgeConfig(CfnDataSource.EventBridgeConfigProperty value)
An EventBridge configuration that contains a valid ARN of an event bus.
|
void |
setEventBridgeConfig(IResolvable value)
An EventBridge configuration that contains a valid ARN of an event bus.
|
void |
setHttpConfig(CfnDataSource.HttpConfigProperty value)
Endpoints for an HTTP data source.
|
void |
setHttpConfig(IResolvable value)
Endpoints for an HTTP data source.
|
void |
setLambdaConfig(CfnDataSource.LambdaConfigProperty value)
An ARN of a Lambda function in valid ARN format.
|
void |
setLambdaConfig(IResolvable value)
An ARN of a Lambda function in valid ARN format.
|
void |
setName(java.lang.String value)
Friendly name for you to identify your AppSync data source after creation.
|
void |
setOpenSearchServiceConfig(CfnDataSource.OpenSearchServiceConfigProperty value)
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
|
void |
setOpenSearchServiceConfig(IResolvable value)
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
|
void |
setRelationalDatabaseConfig(CfnDataSource.RelationalDatabaseConfigProperty value)
Relational Database configuration of the relational database data source.
|
void |
setRelationalDatabaseConfig(IResolvable value)
Relational Database configuration of the relational database data source.
|
void |
setServiceRoleArn(java.lang.String value)
The AWS Identity and Access Management service role ARN for the data source.
|
void |
setType(java.lang.String value)
The type of the data source.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnDataSource(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnDataSource(Construct scope, java.lang.String id, CfnDataSourceProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrDataSourceArn()
public java.lang.String getAttrName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getApiId()
public void setApiId(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getType()
public void setType(java.lang.String value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.Object getDynamoDbConfig()
public void setDynamoDbConfig(IResolvable value)
public void setDynamoDbConfig(CfnDataSource.DynamoDBConfigProperty value)
public java.lang.Object getElasticsearchConfig()
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.
public void setElasticsearchConfig(IResolvable value)
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.
public void setElasticsearchConfig(CfnDataSource.ElasticsearchConfigProperty value)
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.
public java.lang.Object getEventBridgeConfig()
public void setEventBridgeConfig(IResolvable value)
public void setEventBridgeConfig(CfnDataSource.EventBridgeConfigProperty value)
public java.lang.Object getHttpConfig()
public void setHttpConfig(IResolvable value)
public void setHttpConfig(CfnDataSource.HttpConfigProperty value)
public java.lang.Object getLambdaConfig()
This can be the ARN of a Lambda function that exists in the current account or in another account.
public void setLambdaConfig(IResolvable value)
This can be the ARN of a Lambda function that exists in the current account or in another account.
public void setLambdaConfig(CfnDataSource.LambdaConfigProperty value)
This can be the ARN of a Lambda function that exists in the current account or in another account.
public java.lang.Object getOpenSearchServiceConfig()
public void setOpenSearchServiceConfig(IResolvable value)
public void setOpenSearchServiceConfig(CfnDataSource.OpenSearchServiceConfigProperty value)
public java.lang.Object getRelationalDatabaseConfig()
public void setRelationalDatabaseConfig(IResolvable value)
public void setRelationalDatabaseConfig(CfnDataSource.RelationalDatabaseConfigProperty value)
public java.lang.String getServiceRoleArn()
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
.
public void setServiceRoleArn(java.lang.String value)
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
.