Class: AWSCDK::Kendra::CfnDataSource::WorkDocsConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kendra/cfn_data_source.rb

Overview

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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(organization_id:, crawl_comments: nil, exclusion_patterns: nil, field_mappings: nil, inclusion_patterns: nil, use_change_log: nil) ⇒ WorkDocsConfigurationProperty

Returns a new instance of WorkDocsConfigurationProperty.

Parameters:

  • organization_id (String)

    The identifier of the directory corresponding to your WorkDocs site repository.

  • crawl_comments (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    TRUE to include comments on documents in your index.

  • exclusion_patterns (Array<String>, nil) (defaults to: nil)

    A list of regular expression patterns to exclude certain files in your WorkDocs site repository.

  • field_mappings (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Kendra::CfnDataSource::DataSourceToIndexFieldMappingProperty>, nil) (defaults to: nil)

    A list of DataSourceToIndexFieldMapping objects that map WorkDocs data source attributes or field names to Amazon Kendra index field names.

  • inclusion_patterns (Array<String>, nil) (defaults to: nil)

    A list of regular expression patterns to include certain files in your WorkDocs site repository.

  • use_change_log (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    TRUE to use the WorkDocs change log to determine which documents require updating in the index.



4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
# File 'kendra/cfn_data_source.rb', line 4095

def initialize(organization_id:, crawl_comments: nil, exclusion_patterns: nil, field_mappings: nil, inclusion_patterns: nil, use_change_log: nil)
  @organization_id = organization_id
  Jsii::Type.check_type(@organization_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "organizationId")
  @crawl_comments = crawl_comments
  Jsii::Type.check_type(@crawl_comments, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "crawlComments") unless @crawl_comments.nil?
  @exclusion_patterns = exclusion_patterns
  Jsii::Type.check_type(@exclusion_patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "exclusionPatterns") unless @exclusion_patterns.nil?
  @field_mappings = field_mappings
  Jsii::Type.check_type(@field_mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2VuZHJhLkNmbkRhdGFTb3VyY2UuRGF0YVNvdXJjZVRvSW5kZXhGaWVsZE1hcHBpbmdQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "fieldMappings") unless @field_mappings.nil?
  @inclusion_patterns = inclusion_patterns
  Jsii::Type.check_type(@inclusion_patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "inclusionPatterns") unless @inclusion_patterns.nil?
  @use_change_log = use_change_log
  Jsii::Type.check_type(@use_change_log, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "useChangeLog") unless @use_change_log.nil?
end

Instance Attribute Details

#crawl_commentsBoolean, ... (readonly)

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 .



4125
4126
4127
# File 'kendra/cfn_data_source.rb', line 4125

def crawl_comments
  @crawl_comments
end

#exclusion_patternsArray<String>? (readonly)

A list of regular expression patterns to exclude certain files in your WorkDocs site repository.

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.



4132
4133
4134
# File 'kendra/cfn_data_source.rb', line 4132

def exclusion_patterns
  @exclusion_patterns
end

#field_mappingsAWSCDK::IResolvable, ... (readonly)

A list of DataSourceToIndexFieldMapping objects that map WorkDocs data source attributes or field names to Amazon Kendra index field names.

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.



4139
4140
4141
# File 'kendra/cfn_data_source.rb', line 4139

def field_mappings
  @field_mappings
end

#inclusion_patternsArray<String>? (readonly)

A list of regular expression patterns to include certain files in your WorkDocs site repository.

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.



4146
4147
4148
# File 'kendra/cfn_data_source.rb', line 4146

def inclusion_patterns
  @inclusion_patterns
end

#organization_idString (readonly)

The identifier of the directory corresponding to your WorkDocs site repository.

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.



4116
4117
4118
# File 'kendra/cfn_data_source.rb', line 4116

def organization_id
  @organization_id
end

#use_change_logBoolean, ... (readonly)

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.



4153
4154
4155
# File 'kendra/cfn_data_source.rb', line 4153

def use_change_log
  @use_change_log
end

Class Method Details

.jsii_propertiesObject



4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
# File 'kendra/cfn_data_source.rb', line 4155

def self.jsii_properties
  {
    :organization_id => "organizationId",
    :crawl_comments => "crawlComments",
    :exclusion_patterns => "exclusionPatterns",
    :field_mappings => "fieldMappings",
    :inclusion_patterns => "inclusionPatterns",
    :use_change_log => "useChangeLog",
  }
end

Instance Method Details

#to_jsiiObject



4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
# File 'kendra/cfn_data_source.rb', line 4166

def to_jsii
  result = {}
  result.merge!({
    "organizationId" => @organization_id,
    "crawlComments" => @crawl_comments,
    "exclusionPatterns" => @exclusion_patterns,
    "fieldMappings" => @field_mappings,
    "inclusionPatterns" => @inclusion_patterns,
    "useChangeLog" => @use_change_log,
  })
  result.compact
end