Class: AWSCDK::Kendra::CfnDataSource::ConfluencePageToIndexFieldMappingProperty

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

Overview

Maps attributes or field names of Confluence pages to Amazon Kendra index field names.

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_source_field_name:, index_field_name:, date_field_format: nil) ⇒ ConfluencePageToIndexFieldMappingProperty

Returns a new instance of ConfluencePageToIndexFieldMappingProperty.

Parameters:

  • data_source_field_name (String)

    The name of the field in the data source.

  • index_field_name (String)

    The name of the index field to map to the Confluence data source field.

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

    The format for date fields in the data source.



1179
1180
1181
1182
1183
1184
1185
1186
# File 'kendra/cfn_data_source.rb', line 1179

def initialize(data_source_field_name:, index_field_name:, date_field_format: nil)
  @data_source_field_name = data_source_field_name
  Jsii::Type.check_type(@data_source_field_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dataSourceFieldName")
  @index_field_name = index_field_name
  Jsii::Type.check_type(@index_field_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "indexFieldName")
  @date_field_format = date_field_format
  Jsii::Type.check_type(@date_field_format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dateFieldFormat") unless @date_field_format.nil?
end

Instance Attribute Details

#data_source_field_nameString (readonly)

The name of the field in the data source.



1192
1193
1194
# File 'kendra/cfn_data_source.rb', line 1192

def data_source_field_name
  @data_source_field_name
end

#date_field_formatString? (readonly)

The format for date fields in the data source.

If the field specified in DataSourceFieldName is a date field you must specify the date format. If the field is not a date field, an exception is thrown.



1206
1207
1208
# File 'kendra/cfn_data_source.rb', line 1206

def date_field_format
  @date_field_format
end

#index_field_nameString (readonly)

The name of the index field to map to the Confluence data source field.

The index field type must match the Confluence field type.



1199
1200
1201
# File 'kendra/cfn_data_source.rb', line 1199

def index_field_name
  @index_field_name
end

Class Method Details

.jsii_propertiesObject



1208
1209
1210
1211
1212
1213
1214
# File 'kendra/cfn_data_source.rb', line 1208

def self.jsii_properties
  {
    :data_source_field_name => "dataSourceFieldName",
    :index_field_name => "indexFieldName",
    :date_field_format => "dateFieldFormat",
  }
end

Instance Method Details

#to_jsiiObject



1216
1217
1218
1219
1220
1221
1222
1223
1224
# File 'kendra/cfn_data_source.rb', line 1216

def to_jsii
  result = {}
  result.merge!({
    "dataSourceFieldName" => @data_source_field_name,
    "indexFieldName" => @index_field_name,
    "dateFieldFormat" => @date_field_format,
  })
  result.compact
end