Class: AWSCDK::Kendra::CfnDataSource::ColumnConfigurationProperty

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

Overview

Provides information about how Amazon Kendra should use the columns of a database in an index.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(change_detecting_columns:, document_data_column_name:, document_id_column_name:, document_title_column_name: nil, field_mappings: nil) ⇒ ColumnConfigurationProperty

Returns a new instance of ColumnConfigurationProperty.

Parameters:

  • change_detecting_columns (Array<String>)

    One to five columns that indicate when a document in the database has changed.

  • document_data_column_name (String)

    The column that contains the contents of the document.

  • document_id_column_name (String)

    The column that provides the document's identifier.

  • document_title_column_name (String, nil) (defaults to: nil)

    The column that contains the title of the document.

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

    An array of objects that map database column names to the corresponding fields in an index.



724
725
726
727
728
729
730
731
732
733
734
735
# File 'kendra/cfn_data_source.rb', line 724

def initialize(change_detecting_columns:, document_data_column_name:, document_id_column_name:, document_title_column_name: nil, field_mappings: nil)
  @change_detecting_columns = change_detecting_columns
  Jsii::Type.check_type(@change_detecting_columns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "changeDetectingColumns")
  @document_data_column_name = document_data_column_name
  Jsii::Type.check_type(@document_data_column_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentDataColumnName")
  @document_id_column_name = document_id_column_name
  Jsii::Type.check_type(@document_id_column_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentIdColumnName")
  @document_title_column_name = document_title_column_name
  Jsii::Type.check_type(@document_title_column_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentTitleColumnName") unless @document_title_column_name.nil?
  @field_mappings = field_mappings
  Jsii::Type.check_type(@field_mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2VuZHJhLkNmbkRhdGFTb3VyY2UuRGF0YVNvdXJjZVRvSW5kZXhGaWVsZE1hcHBpbmdQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "fieldMappings") unless @field_mappings.nil?
end

Instance Attribute Details

#change_detecting_columnsArray<String> (readonly)

One to five columns that indicate when a document in the database has changed.



741
742
743
# File 'kendra/cfn_data_source.rb', line 741

def change_detecting_columns
  @change_detecting_columns
end

#document_data_column_nameString (readonly)

The column that contains the contents of the document.



746
747
748
# File 'kendra/cfn_data_source.rb', line 746

def document_data_column_name
  @document_data_column_name
end

#document_id_column_nameString (readonly)

The column that provides the document's identifier.



751
752
753
# File 'kendra/cfn_data_source.rb', line 751

def document_id_column_name
  @document_id_column_name
end

#document_title_column_nameString? (readonly)

The column that contains the title of the document.



756
757
758
# File 'kendra/cfn_data_source.rb', line 756

def document_title_column_name
  @document_title_column_name
end

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

An array of objects that map database column names to the corresponding fields in an index.

You must first create the fields in the index using the UpdateIndex operation.



763
764
765
# File 'kendra/cfn_data_source.rb', line 763

def field_mappings
  @field_mappings
end

Class Method Details

.jsii_propertiesObject



765
766
767
768
769
770
771
772
773
# File 'kendra/cfn_data_source.rb', line 765

def self.jsii_properties
  {
    :change_detecting_columns => "changeDetectingColumns",
    :document_data_column_name => "documentDataColumnName",
    :document_id_column_name => "documentIdColumnName",
    :document_title_column_name => "documentTitleColumnName",
    :field_mappings => "fieldMappings",
  }
end

Instance Method Details

#to_jsiiObject



775
776
777
778
779
780
781
782
783
784
785
# File 'kendra/cfn_data_source.rb', line 775

def to_jsii
  result = {}
  result.merge!({
    "changeDetectingColumns" => @change_detecting_columns,
    "documentDataColumnName" => @document_data_column_name,
    "documentIdColumnName" => @document_id_column_name,
    "documentTitleColumnName" => @document_title_column_name,
    "fieldMappings" => @field_mappings,
  })
  result.compact
end