Skip to content
v2.278.0

WorkDocsConfigurationProperty Struct ​

Provides the configuration information to connect to WorkDocs as your data source.

WorkDocs connector is available in Oregon, North Virginia, Sydney, Singapore and Ireland regions.

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 workDocsConfigurationProperty: kendra.CfnDataSource.WorkDocsConfigurationProperty = {
  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,
};
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

work_docs_configuration_property = kendra.CfnDataSource.WorkDocsConfigurationProperty(
    organization_id="organizationId",

    # the properties below are optional
    crawl_comments=False,
    exclusion_patterns=["exclusionPatterns"],
    field_mappings=[kendra.CfnDataSource.DataSourceToIndexFieldMappingProperty(
        data_source_field_name="dataSourceFieldName",
        index_field_name="indexFieldName",

        # the properties below are optional
        date_field_format="dateFieldFormat"
    )],
    inclusion_patterns=["inclusionPatterns"],
    use_change_log=False
)
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.*;

WorkDocsConfigurationProperty workDocsConfigurationProperty = WorkDocsConfigurationProperty.builder()
        .organizationId("organizationId")

        // the properties below are optional
        .crawlComments(false)
        .exclusionPatterns(List.of("exclusionPatterns"))
        .fieldMappings(List.of(DataSourceToIndexFieldMappingProperty.builder()
                .dataSourceFieldName("dataSourceFieldName")
                .indexFieldName("indexFieldName")

                // the properties below are optional
                .dateFieldFormat("dateFieldFormat")
                .build()))
        .inclusionPatterns(List.of("inclusionPatterns"))
        .useChangeLog(false)
        .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 workDocsConfigurationProperty = new WorkDocsConfigurationProperty {
    OrganizationId = "organizationId",

    // the properties below are optional
    CrawlComments = false,
    ExclusionPatterns = new [] { "exclusionPatterns" },
    FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
        DataSourceFieldName = "dataSourceFieldName",
        IndexFieldName = "indexFieldName",

        // the properties below are optional
        DateFieldFormat = "dateFieldFormat"
    } },
    InclusionPatterns = new [] { "inclusionPatterns" },
    UseChangeLog = false
};
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"

workDocsConfigurationProperty := &WorkDocsConfigurationProperty{
	OrganizationId: jsii.String("organizationId"),

	// the properties below are optional
	CrawlComments: jsii.Boolean(false),
	ExclusionPatterns: []*string{
		jsii.String("exclusionPatterns"),
	},
	FieldMappings: []interface{}{
		&DataSourceToIndexFieldMappingProperty{
			DataSourceFieldName: jsii.String("dataSourceFieldName"),
			IndexFieldName: jsii.String("indexFieldName"),

			// the properties below are optional
			DateFieldFormat: jsii.String("dateFieldFormat"),
		},
	},
	InclusionPatterns: []*string{
		jsii.String("inclusionPatterns"),
	},
	UseChangeLog: jsii.Boolean(false),
}

Properties ​

crawlCommentsoptionalboolean | IResolvablecrawl_commentsoptionaltyping.Union[bool, IResolvable]crawlCommentsoptionalBooleanCrawlCommentsoptionalboolCrawlCommentsoptionalinterface{} #
`TRUE` to include comments on documents in your index.

Including comments in your index means each comment is a document that can be searched on.

The default is set to FALSE .

exclusionPatternsoptionalstring[]exclusion_patternsoptionaltyping.List[str]exclusionPatternsoptionalList<String>ExclusionPatternsoptionalstring[]ExclusionPatternsoptional*[]*string #
A list of regular expression patterns to exclude certain files in your WorkDocs site repository.
notes

Files that match the patterns are excluded from the index. Files that don’t match the patterns are included in the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.

fieldMappingsoptionalIResolvable | IResolvable | CfnDataSource.DataSourceToIndexFieldMappingProperty[]field_mappingsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, DataSourceToIndexFieldMappingProperty]]]fieldMappingsoptionalIResolvableFieldMappingsoptionalIResolvableFieldMappingsoptionalinterface{} #
A list of `DataSourceToIndexFieldMapping` objects that map WorkDocs data source attributes or field names to Amazon Kendra index field names.
notes

To create custom fields, use the UpdateIndex API before you map to WorkDocs fields. For more information, see Mapping data source fields . The WorkDocs data source field names must exist in your WorkDocs custom metadata.

inclusionPatternsoptionalstring[]inclusion_patternsoptionaltyping.List[str]inclusionPatternsoptionalList<String>InclusionPatternsoptionalstring[]InclusionPatternsoptional*[]*string #
A list of regular expression patterns to include certain files in your WorkDocs site repository.
notes

Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.

organizationIdstringorganization_idstrorganizationIdStringOrganizationIdstringOrganizationId*string required #
The identifier of the directory corresponding to your WorkDocs site repository.
notes

You can find the organization ID in the Directory Service by going to Active Directory , then Directories . Your WorkDocs site directory has an ID, which is the organization ID. You can also set up a new WorkDocs directory in the Directory Service console and enable a WorkDocs site for the directory in the WorkDocs console.

useChangeLogoptionalboolean | IResolvableuse_change_logoptionaltyping.Union[bool, IResolvable]useChangeLogoptionalBooleanUseChangeLogoptionalboolUseChangeLogoptionalinterface{} #
`TRUE` to use the WorkDocs change log to determine which documents require updating in the index.

Depending on the change log's size, it may take longer for Amazon Kendra to use the change log than to scan all of your documents in WorkDocs.