DatabaseConfigurationProperty Struct
Provides the configuration information to an Amazon Kendra supported database .
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_kendra as kendra } from 'aws-cdk-lib';
const databaseConfigurationProperty: kendra.CfnDataSource.DatabaseConfigurationProperty = {
columnConfiguration: {
changeDetectingColumns: ['changeDetectingColumns'],
documentDataColumnName: 'documentDataColumnName',
documentIdColumnName: 'documentIdColumnName',
// the properties below are optional
documentTitleColumnName: 'documentTitleColumnName',
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
},
connectionConfiguration: {
databaseHost: 'databaseHost',
databaseName: 'databaseName',
databasePort: 123,
secretArn: 'secretArn',
tableName: 'tableName',
},
databaseEngineType: 'databaseEngineType',
// the properties below are optional
aclConfiguration: {
allowedGroupsColumnName: 'allowedGroupsColumnName',
},
sqlConfiguration: {
queryIdentifiersEnclosingOption: 'queryIdentifiersEnclosingOption',
},
vpcConfiguration: {
securityGroupIds: ['securityGroupIds'],
subnetIds: ['subnetIds'],
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_kendra as kendra
database_configuration_property = kendra.CfnDataSource.DatabaseConfigurationProperty(
column_configuration=kendra.CfnDataSource.ColumnConfigurationProperty(
change_detecting_columns=["changeDetectingColumns"],
document_data_column_name="documentDataColumnName",
document_id_column_name="documentIdColumnName",
# the properties below are optional
document_title_column_name="documentTitleColumnName",
field_mappings=[kendra.CfnDataSource.DataSourceToIndexFieldMappingProperty(
data_source_field_name="dataSourceFieldName",
index_field_name="indexFieldName",
# the properties below are optional
date_field_format="dateFieldFormat"
)]
),
connection_configuration=kendra.CfnDataSource.ConnectionConfigurationProperty(
database_host="databaseHost",
database_name="databaseName",
database_port=123,
secret_arn="secretArn",
table_name="tableName"
),
database_engine_type="databaseEngineType",
# the properties below are optional
acl_configuration=kendra.CfnDataSource.AclConfigurationProperty(
allowed_groups_column_name="allowedGroupsColumnName"
),
sql_configuration=kendra.CfnDataSource.SqlConfigurationProperty(
query_identifiers_enclosing_option="queryIdentifiersEnclosingOption"
),
vpc_configuration=kendra.CfnDataSource.DataSourceVpcConfigurationProperty(
security_group_ids=["securityGroupIds"],
subnet_ids=["subnetIds"]
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.kendra.*;
DatabaseConfigurationProperty databaseConfigurationProperty = DatabaseConfigurationProperty.builder()
.columnConfiguration(ColumnConfigurationProperty.builder()
.changeDetectingColumns(List.of("changeDetectingColumns"))
.documentDataColumnName("documentDataColumnName")
.documentIdColumnName("documentIdColumnName")
// the properties below are optional
.documentTitleColumnName("documentTitleColumnName")
.fieldMappings(List.of(DataSourceToIndexFieldMappingProperty.builder()
.dataSourceFieldName("dataSourceFieldName")
.indexFieldName("indexFieldName")
// the properties below are optional
.dateFieldFormat("dateFieldFormat")
.build()))
.build())
.connectionConfiguration(ConnectionConfigurationProperty.builder()
.databaseHost("databaseHost")
.databaseName("databaseName")
.databasePort(123)
.secretArn("secretArn")
.tableName("tableName")
.build())
.databaseEngineType("databaseEngineType")
// the properties below are optional
.aclConfiguration(AclConfigurationProperty.builder()
.allowedGroupsColumnName("allowedGroupsColumnName")
.build())
.sqlConfiguration(SqlConfigurationProperty.builder()
.queryIdentifiersEnclosingOption("queryIdentifiersEnclosingOption")
.build())
.vpcConfiguration(DataSourceVpcConfigurationProperty.builder()
.securityGroupIds(List.of("securityGroupIds"))
.subnetIds(List.of("subnetIds"))
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Kendra;
var databaseConfigurationProperty = new DatabaseConfigurationProperty {
ColumnConfiguration = new ColumnConfigurationProperty {
ChangeDetectingColumns = new [] { "changeDetectingColumns" },
DocumentDataColumnName = "documentDataColumnName",
DocumentIdColumnName = "documentIdColumnName",
// the properties below are optional
DocumentTitleColumnName = "documentTitleColumnName",
FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
DataSourceFieldName = "dataSourceFieldName",
IndexFieldName = "indexFieldName",
// the properties below are optional
DateFieldFormat = "dateFieldFormat"
} }
},
ConnectionConfiguration = new ConnectionConfigurationProperty {
DatabaseHost = "databaseHost",
DatabaseName = "databaseName",
DatabasePort = 123,
SecretArn = "secretArn",
TableName = "tableName"
},
DatabaseEngineType = "databaseEngineType",
// the properties below are optional
AclConfiguration = new AclConfigurationProperty {
AllowedGroupsColumnName = "allowedGroupsColumnName"
},
SqlConfiguration = new SqlConfigurationProperty {
QueryIdentifiersEnclosingOption = "queryIdentifiersEnclosingOption"
},
VpcConfiguration = new DataSourceVpcConfigurationProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
SubnetIds = new [] { "subnetIds" }
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
databaseConfigurationProperty := &DatabaseConfigurationProperty{
ColumnConfiguration: &ColumnConfigurationProperty{
ChangeDetectingColumns: []*string{
jsii.String("changeDetectingColumns"),
},
DocumentDataColumnName: jsii.String("documentDataColumnName"),
DocumentIdColumnName: jsii.String("documentIdColumnName"),
// the properties below are optional
DocumentTitleColumnName: jsii.String("documentTitleColumnName"),
FieldMappings: []interface{}{
&DataSourceToIndexFieldMappingProperty{
DataSourceFieldName: jsii.String("dataSourceFieldName"),
IndexFieldName: jsii.String("indexFieldName"),
// the properties below are optional
DateFieldFormat: jsii.String("dateFieldFormat"),
},
},
},
ConnectionConfiguration: &ConnectionConfigurationProperty{
DatabaseHost: jsii.String("databaseHost"),
DatabaseName: jsii.String("databaseName"),
DatabasePort: jsii.Number(123),
SecretArn: jsii.String("secretArn"),
TableName: jsii.String("tableName"),
},
DatabaseEngineType: jsii.String("databaseEngineType"),
// the properties below are optional
AclConfiguration: &AclConfigurationProperty{
AllowedGroupsColumnName: jsii.String("allowedGroupsColumnName"),
},
SqlConfiguration: &SqlConfigurationProperty{
QueryIdentifiersEnclosingOption: jsii.String("queryIdentifiersEnclosingOption"),
},
VpcConfiguration: &DataSourceVpcConfigurationProperty{
SecurityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
SubnetIds: []*string{
jsii.String("subnetIds"),
},
},
}
Properties
aclConfigurationoptionalIResolvable | CfnDataSource.acl_configurationoptionaltyping.Union[IResolvable, AclConfigurationProperty]aclConfigurationoptionalIResolvableAclConfigurationoptionalIResolvableAclConfigurationoptionalinterface{} #Information about the database column that provides information for user context filtering.
columnConfigurationIResolvable | CfnDataSource.column_configurationtyping.Union[IResolvable, ColumnConfigurationProperty]columnConfigurationIResolvableColumnConfigurationIResolvableColumnConfigurationinterface{} required #Information about where the index should get the document information from the database.
connectionConfigurationIResolvable | CfnDataSource.connection_configurationtyping.Union[IResolvable, ConnectionConfigurationProperty]connectionConfigurationIResolvableConnectionConfigurationIResolvableConnectionConfigurationinterface{} required #Configuration information that's required to connect to a database.
databaseEngineTypestringdatabase_engine_typestrdatabaseEngineTypeStringDatabaseEngineTypestringDatabaseEngineType*string required #The type of database engine that runs the database.
sqlConfigurationoptionalIResolvable | CfnDataSource.sql_configurationoptionaltyping.Union[IResolvable, SqlConfigurationProperty]sqlConfigurationoptionalIResolvableSqlConfigurationoptionalIResolvableSqlConfigurationoptionalinterface{} #Provides information about how Amazon Kendra uses quote marks around SQL identifiers when querying a database data source.
vpcConfigurationoptionalIResolvable | CfnDataSource.vpc_configurationoptionaltyping.Union[IResolvable, DataSourceVpcConfigurationProperty]vpcConfigurationoptionalIResolvableVpcConfigurationoptionalIResolvableVpcConfigurationoptionalinterface{} #Provides information for connecting to an Amazon VPC.