@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.657Z") @Stability(value=Stable) 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())
.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.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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnDataSource(software.constructs.Construct scope,
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 |
|---|---|
String |
getApiId()
Unique AWS AppSync GraphQL API identifier where this data source will be created.
|
String |
getAttrDataSourceArn()
The Amazon Resource Name (ARN) of the API key, such as `arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/datasources/datasourcename` .
|
String |
getAttrName()
Friendly name for you to identify your AWS AppSync data source after creation.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDescription()
The description of the data source.
|
Object |
getDynamoDbConfig()
AWS Region and TableName for an Amazon DynamoDB table in your account.
|
Object |
getElasticsearchConfig()
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
|
Object |
getHttpConfig()
Endpoints for an HTTP data source.
|
Object |
getLambdaConfig()
An ARN of a Lambda function in valid ARN format.
|
String |
getName()
Friendly name for you to identify your AppSync data source after creation.
|
Object |
getOpenSearchServiceConfig()
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
|
Object |
getRelationalDatabaseConfig()
Relational Database configuration of the relational database data source.
|
String |
getServiceRoleArn()
The AWS Identity and Access Management service role ARN for the data source.
|
String |
getType()
The type of the data source.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setApiId(String value)
Unique AWS AppSync GraphQL API identifier where this data source will be created.
|
void |
setDescription(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 |
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(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(String value)
The AWS Identity and Access Management service role ARN for the data source.
|
void |
setType(String value)
The type of the data source.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnDataSource(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnDataSource(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrDataSourceArn()
@Stability(value=Stable) @NotNull public String getAttrName()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getApiId()
@Stability(value=Stable)
public void setApiId(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getName()
@Stability(value=Stable)
public void setName(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getType()
@Stability(value=Stable)
public void setType(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getDynamoDbConfig()
@Stability(value=Stable)
public void setDynamoDbConfig(@Nullable
CfnDataSource.DynamoDBConfigProperty value)
@Stability(value=Stable)
public void setDynamoDbConfig(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setElasticsearchConfig(@Nullable
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.
@Stability(value=Stable)
public void setElasticsearchConfig(@Nullable
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.
@Stability(value=Stable) @Nullable public Object getHttpConfig()
@Stability(value=Stable)
public void setHttpConfig(@Nullable
CfnDataSource.HttpConfigProperty value)
@Stability(value=Stable)
public void setHttpConfig(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getLambdaConfig()
This can be the ARN of a Lambda function that exists in the current account or in another account.
@Stability(value=Stable)
public void setLambdaConfig(@Nullable
CfnDataSource.LambdaConfigProperty value)
This can be the ARN of a Lambda function that exists in the current account or in another account.
@Stability(value=Stable)
public void setLambdaConfig(@Nullable
IResolvable value)
This can be the ARN of a Lambda function that exists in the current account or in another account.
@Stability(value=Stable) @Nullable public Object getOpenSearchServiceConfig()
@Stability(value=Stable)
public void setOpenSearchServiceConfig(@Nullable
CfnDataSource.OpenSearchServiceConfigProperty value)
@Stability(value=Stable)
public void setOpenSearchServiceConfig(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getRelationalDatabaseConfig()
@Stability(value=Stable)
public void setRelationalDatabaseConfig(@Nullable
CfnDataSource.RelationalDatabaseConfigProperty value)
@Stability(value=Stable)
public void setRelationalDatabaseConfig(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getServiceRoleArn()
The system assumes this role when accessing the data source.
Required if Type is specified as AWS_LAMBDA , AMAZON_DYNAMODB , AMAZON_ELASTICSEARCH , or AMAZON_OPENSEARCH_SERVICE .
@Stability(value=Stable)
public void setServiceRoleArn(@Nullable
String value)
The system assumes this role when accessing the data source.
Required if Type is specified as AWS_LAMBDA , AMAZON_DYNAMODB , AMAZON_ELASTICSEARCH , or AMAZON_OPENSEARCH_SERVICE .
Copyright © 2022. All rights reserved.