Class: AWSCDK::Kendra::CfnDataSource::ServiceNowKnowledgeArticleConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Kendra::CfnDataSource::ServiceNowKnowledgeArticleConfigurationProperty
- Defined in:
- kendra/cfn_data_source.rb
Overview
Provides the configuration information for crawling knowledge articles in the ServiceNow site.
Instance Attribute Summary collapse
-
#crawl_attachments ⇒ Boolean, ...
readonly
TRUEto index attachments to knowledge articles. -
#document_data_field_name ⇒ String
readonly
The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra index.
-
#document_title_field_name ⇒ String?
readonly
The name of the ServiceNow field that is mapped to the index document title field.
-
#exclude_attachment_file_patterns ⇒ Array<String>?
readonly
A list of regular expression patterns applied to exclude certain knowledge article attachments.
-
#field_mappings ⇒ AWSCDK::IResolvable, ...
readonly
Maps attributes or field names of knoweldge articles to Amazon Kendra index field names.
-
#filter_query ⇒ String?
readonly
A query that selects the knowledge articles to index.
-
#include_attachment_file_patterns ⇒ Array<String>?
readonly
A list of regular expression patterns applied to include knowledge article attachments.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(document_data_field_name:, crawl_attachments: nil, document_title_field_name: nil, exclude_attachment_file_patterns: nil, field_mappings: nil, filter_query: nil, include_attachment_file_patterns: nil) ⇒ ServiceNowKnowledgeArticleConfigurationProperty
constructor
A new instance of ServiceNowKnowledgeArticleConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(document_data_field_name:, crawl_attachments: nil, document_title_field_name: nil, exclude_attachment_file_patterns: nil, field_mappings: nil, filter_query: nil, include_attachment_file_patterns: nil) ⇒ ServiceNowKnowledgeArticleConfigurationProperty
Returns a new instance of ServiceNowKnowledgeArticleConfigurationProperty.
3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 |
# File 'kendra/cfn_data_source.rb', line 3277 def initialize(document_data_field_name:, crawl_attachments: nil, document_title_field_name: nil, exclude_attachment_file_patterns: nil, field_mappings: nil, filter_query: nil, include_attachment_file_patterns: nil) @document_data_field_name = document_data_field_name Jsii::Type.check_type(@document_data_field_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentDataFieldName") @crawl_attachments = Jsii::Type.check_type(@crawl_attachments, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "crawlAttachments") unless @crawl_attachments.nil? @document_title_field_name = document_title_field_name Jsii::Type.check_type(@document_title_field_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentTitleFieldName") unless @document_title_field_name.nil? @exclude_attachment_file_patterns = Jsii::Type.check_type(@exclude_attachment_file_patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludeAttachmentFilePatterns") unless @exclude_attachment_file_patterns.nil? @field_mappings = field_mappings Jsii::Type.check_type(@field_mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2VuZHJhLkNmbkRhdGFTb3VyY2UuRGF0YVNvdXJjZVRvSW5kZXhGaWVsZE1hcHBpbmdQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "fieldMappings") unless @field_mappings.nil? @filter_query = filter_query Jsii::Type.check_type(@filter_query, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "filterQuery") unless @filter_query.nil? @include_attachment_file_patterns = Jsii::Type.check_type(@include_attachment_file_patterns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "includeAttachmentFilePatterns") unless @include_attachment_file_patterns.nil? end |
Instance Attribute Details
#crawl_attachments ⇒ Boolean, ... (readonly)
TRUE to index attachments to knowledge articles.
3303 3304 3305 |
# File 'kendra/cfn_data_source.rb', line 3303 def @crawl_attachments end |
#document_data_field_name ⇒ String (readonly)
The name of the ServiceNow field that is mapped to the index document contents field in the Amazon Kendra index.
3298 3299 3300 |
# File 'kendra/cfn_data_source.rb', line 3298 def document_data_field_name @document_data_field_name end |
#document_title_field_name ⇒ String? (readonly)
The name of the ServiceNow field that is mapped to the index document title field.
3308 3309 3310 |
# File 'kendra/cfn_data_source.rb', line 3308 def document_title_field_name @document_title_field_name end |
#exclude_attachment_file_patterns ⇒ Array<String>? (readonly)
A list of regular expression patterns applied to exclude certain knowledge article attachments.
Attachments that match the patterns are excluded from the index. Items that don't match the patterns are included in the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item isn't included in the index.
3315 3316 3317 |
# File 'kendra/cfn_data_source.rb', line 3315 def @exclude_attachment_file_patterns end |
#field_mappings ⇒ AWSCDK::IResolvable, ... (readonly)
Maps attributes or field names of knoweldge articles to Amazon Kendra index field names.
To create custom fields, use the UpdateIndex API before you map to ServiceNow fields. For more information, see Mapping data source fields . The ServiceNow data source field names must exist in your ServiceNow custom metadata.
3322 3323 3324 |
# File 'kendra/cfn_data_source.rb', line 3322 def field_mappings @field_mappings end |
#filter_query ⇒ String? (readonly)
A query that selects the knowledge articles to index.
The query can return articles from multiple knowledge bases, and the knowledge bases can be public or private.
The query string must be one generated by the ServiceNow console. For more information, see Specifying documents to index with a query .
3331 3332 3333 |
# File 'kendra/cfn_data_source.rb', line 3331 def filter_query @filter_query end |
#include_attachment_file_patterns ⇒ Array<String>? (readonly)
A list of regular expression patterns applied to include knowledge article attachments.
Attachments that match the patterns are included in the index. Items that don't match the patterns are excluded from the index. If an item matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the item isn't included in the index.
3338 3339 3340 |
# File 'kendra/cfn_data_source.rb', line 3338 def @include_attachment_file_patterns end |
Class Method Details
.jsii_properties ⇒ Object
3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 |
# File 'kendra/cfn_data_source.rb', line 3340 def self.jsii_properties { :document_data_field_name => "documentDataFieldName", :crawl_attachments => "crawlAttachments", :document_title_field_name => "documentTitleFieldName", :exclude_attachment_file_patterns => "excludeAttachmentFilePatterns", :field_mappings => "fieldMappings", :filter_query => "filterQuery", :include_attachment_file_patterns => "includeAttachmentFilePatterns", } end |
Instance Method Details
#to_jsii ⇒ Object
3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 |
# File 'kendra/cfn_data_source.rb', line 3352 def to_jsii result = {} result.merge!({ "documentDataFieldName" => @document_data_field_name, "crawlAttachments" => @crawl_attachments, "documentTitleFieldName" => @document_title_field_name, "excludeAttachmentFilePatterns" => @exclude_attachment_file_patterns, "fieldMappings" => @field_mappings, "filterQuery" => @filter_query, "includeAttachmentFilePatterns" => @include_attachment_file_patterns, }) result.compact end |