CfnDataSourceProps Struct
Properties for defining a CfnDataSource.
Example
// 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 cfnDataSourceProps: kendra.CfnDataSourceProps = {
indexId: 'indexId',
name: 'name',
type: 'type',
// the properties below are optional
customDocumentEnrichmentConfiguration: {
inlineConfigurations: [{
condition: {
conditionDocumentAttributeKey: 'conditionDocumentAttributeKey',
operator: 'operator',
// the properties below are optional
conditionOnValue: {
dateValue: 'dateValue',
longValue: 123,
stringListValue: ['stringListValue'],
stringValue: 'stringValue',
},
},
documentContentDeletion: false,
target: {
targetDocumentAttributeKey: 'targetDocumentAttributeKey',
// the properties below are optional
targetDocumentAttributeValue: {
dateValue: 'dateValue',
longValue: 123,
stringListValue: ['stringListValue'],
stringValue: 'stringValue',
},
targetDocumentAttributeValueDeletion: false,
},
}],
postExtractionHookConfiguration: {
lambdaArn: 'lambdaArn',
s3Bucket: 's3Bucket',
// the properties below are optional
invocationCondition: {
conditionDocumentAttributeKey: 'conditionDocumentAttributeKey',
operator: 'operator',
// the properties below are optional
conditionOnValue: {
dateValue: 'dateValue',
longValue: 123,
stringListValue: ['stringListValue'],
stringValue: 'stringValue',
},
},
},
preExtractionHookConfiguration: {
lambdaArn: 'lambdaArn',
s3Bucket: 's3Bucket',
// the properties below are optional
invocationCondition: {
conditionDocumentAttributeKey: 'conditionDocumentAttributeKey',
operator: 'operator',
// the properties below are optional
conditionOnValue: {
dateValue: 'dateValue',
longValue: 123,
stringListValue: ['stringListValue'],
stringValue: 'stringValue',
},
},
},
roleArn: 'roleArn',
},
dataSourceConfiguration: {
confluenceConfiguration: {
secretArn: 'secretArn',
serverUrl: 'serverUrl',
version: 'version',
// the properties below are optional
attachmentConfiguration: {
attachmentFieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
crawlAttachments: false,
},
blogConfiguration: {
blogFieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
},
exclusionPatterns: ['exclusionPatterns'],
inclusionPatterns: ['inclusionPatterns'],
pageConfiguration: {
pageFieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
},
spaceConfiguration: {
crawlArchivedSpaces: false,
crawlPersonalSpaces: false,
excludeSpaces: ['excludeSpaces'],
includeSpaces: ['includeSpaces'],
spaceFieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
},
vpcConfiguration: {
securityGroupIds: ['securityGroupIds'],
subnetIds: ['subnetIds'],
},
},
databaseConfiguration: {
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'],
},
},
googleDriveConfiguration: {
secretArn: 'secretArn',
// the properties below are optional
excludeMimeTypes: ['excludeMimeTypes'],
excludeSharedDrives: ['excludeSharedDrives'],
excludeUserAccounts: ['excludeUserAccounts'],
exclusionPatterns: ['exclusionPatterns'],
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
inclusionPatterns: ['inclusionPatterns'],
},
oneDriveConfiguration: {
oneDriveUsers: {
oneDriveUserList: ['oneDriveUserList'],
oneDriveUserS3Path: {
bucket: 'bucket',
key: 'key',
},
},
secretArn: 'secretArn',
tenantDomain: 'tenantDomain',
// the properties below are optional
disableLocalGroups: false,
exclusionPatterns: ['exclusionPatterns'],
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
inclusionPatterns: ['inclusionPatterns'],
},
s3Configuration: {
bucketName: 'bucketName',
// the properties below are optional
accessControlListConfiguration: {
keyPath: 'keyPath',
},
documentsMetadataConfiguration: {
s3Prefix: 's3Prefix',
},
exclusionPatterns: ['exclusionPatterns'],
inclusionPatterns: ['inclusionPatterns'],
inclusionPrefixes: ['inclusionPrefixes'],
},
salesforceConfiguration: {
secretArn: 'secretArn',
serverUrl: 'serverUrl',
// the properties below are optional
chatterFeedConfiguration: {
documentDataFieldName: 'documentDataFieldName',
// the properties below are optional
documentTitleFieldName: 'documentTitleFieldName',
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
includeFilterTypes: ['includeFilterTypes'],
},
crawlAttachments: false,
excludeAttachmentFilePatterns: ['excludeAttachmentFilePatterns'],
includeAttachmentFilePatterns: ['includeAttachmentFilePatterns'],
knowledgeArticleConfiguration: {
includedStates: ['includedStates'],
// the properties below are optional
customKnowledgeArticleTypeConfigurations: [{
documentDataFieldName: 'documentDataFieldName',
name: 'name',
// the properties below are optional
documentTitleFieldName: 'documentTitleFieldName',
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
}],
standardKnowledgeArticleTypeConfiguration: {
documentDataFieldName: 'documentDataFieldName',
// the properties below are optional
documentTitleFieldName: 'documentTitleFieldName',
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
},
},
standardObjectAttachmentConfiguration: {
documentTitleFieldName: 'documentTitleFieldName',
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
},
standardObjectConfigurations: [{
documentDataFieldName: 'documentDataFieldName',
name: 'name',
// the properties below are optional
documentTitleFieldName: 'documentTitleFieldName',
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
}],
},
serviceNowConfiguration: {
hostUrl: 'hostUrl',
secretArn: 'secretArn',
serviceNowBuildVersion: 'serviceNowBuildVersion',
// the properties below are optional
authenticationType: 'authenticationType',
knowledgeArticleConfiguration: {
documentDataFieldName: 'documentDataFieldName',
// the properties below are optional
crawlAttachments: false,
documentTitleFieldName: 'documentTitleFieldName',
excludeAttachmentFilePatterns: ['excludeAttachmentFilePatterns'],
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
filterQuery: 'filterQuery',
includeAttachmentFilePatterns: ['includeAttachmentFilePatterns'],
},
serviceCatalogConfiguration: {
documentDataFieldName: 'documentDataFieldName',
// the properties below are optional
crawlAttachments: false,
documentTitleFieldName: 'documentTitleFieldName',
excludeAttachmentFilePatterns: ['excludeAttachmentFilePatterns'],
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
includeAttachmentFilePatterns: ['includeAttachmentFilePatterns'],
},
},
sharePointConfiguration: {
secretArn: 'secretArn',
sharePointVersion: 'sharePointVersion',
urls: ['urls'],
// the properties below are optional
crawlAttachments: false,
disableLocalGroups: false,
documentTitleFieldName: 'documentTitleFieldName',
exclusionPatterns: ['exclusionPatterns'],
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
inclusionPatterns: ['inclusionPatterns'],
sslCertificateS3Path: {
bucket: 'bucket',
key: 'key',
},
useChangeLog: false,
vpcConfiguration: {
securityGroupIds: ['securityGroupIds'],
subnetIds: ['subnetIds'],
},
},
templateConfiguration: {
template: 'template',
},
webCrawlerConfiguration: {
urls: {
seedUrlConfiguration: {
seedUrls: ['seedUrls'],
// the properties below are optional
webCrawlerMode: 'webCrawlerMode',
},
siteMapsConfiguration: {
siteMaps: ['siteMaps'],
},
},
// the properties below are optional
authenticationConfiguration: {
basicAuthentication: [{
credentials: 'credentials',
host: 'host',
port: 123,
}],
},
crawlDepth: 123,
maxContentSizePerPageInMegaBytes: 123,
maxLinksPerPage: 123,
maxUrlsPerMinuteCrawlRate: 123,
proxyConfiguration: {
host: 'host',
port: 123,
// the properties below are optional
credentials: 'credentials',
},
urlExclusionPatterns: ['urlExclusionPatterns'],
urlInclusionPatterns: ['urlInclusionPatterns'],
},
workDocsConfiguration: {
organizationId: 'organizationId',
// the properties below are optional
crawlComments: false,
exclusionPatterns: ['exclusionPatterns'],
fieldMappings: [{
dataSourceFieldName: 'dataSourceFieldName',
indexFieldName: 'indexFieldName',
// the properties below are optional
dateFieldFormat: 'dateFieldFormat',
}],
inclusionPatterns: ['inclusionPatterns'],
useChangeLog: false,
},
},
description: 'description',
languageCode: 'languageCode',
roleArn: 'roleArn',
schedule: 'schedule',
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
customDocumentEnrichmentConfigurationoptionalIResolvable | CfnDataSource.CustomDocumentEnrichmentConfigurationPropertycustom_document_enrichment_configurationoptionaltyping.Union[IResolvable, CustomDocumentEnrichmentConfigurationProperty]customDocumentEnrichmentConfigurationoptionalIResolvableCustomDocumentEnrichmentConfigurationoptionalIResolvableCustomDocumentEnrichmentConfigurationoptionalinterface{}#dataSourceConfigurationoptionalIResolvable | CfnDataSource.DataSourceConfigurationPropertydata_source_configurationoptionaltyping.Union[IResolvable, DataSourceConfigurationProperty]dataSourceConfigurationoptionalIResolvableDataSourceConfigurationoptionalIResolvableDataSourceConfigurationoptionalinterface{}#notes
The contents of the configuration depend on the type of data source. You can only specify one type of data source in the configuration.
You can't specify the Configuration parameter when the Type parameter is set to CUSTOM .
The Configuration parameter is required for all other data sources.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#indexIdstring | IIndexRefindex_idtyping.Union[str, IIndexRef]indexIdStringIndexIdstringIndexIdinterface{}required#languageCodeoptionalstringlanguage_codeoptionalstrlanguageCodeoptionalStringLanguageCodeoptionalstringLanguageCodeoptional*string#notes
This shows a supported language for all documents in the data source. English is supported by default. For more information on supported languages, including their codes, see Adding documents in languages other than English .
roleArnoptionalstring | IRoleRefrole_arnoptionaltyping.Union[str, IRoleRef]roleArnoptionalStringRoleArnoptionalstringRoleArnoptionalinterface{}#You can't specify the RoleArn parameter when the Type parameter is set to CUSTOM .
The RoleArn parameter is required for all other data sources.
scheduleoptionalstringscheduleoptionalstrscheduleoptionalStringScheduleoptionalstringScheduleoptional*string#If you don't set a schedule, Amazon Kendra doesn't periodically update the index.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#For more information, see Tag .