Class: AWSCDK::Kendra::CfnDataSource::SalesforceCustomKnowledgeArticleTypeConfigurationProperty

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

Overview

Provides the configuration information for indexing Salesforce custom articles.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document_data_field_name:, name:, document_title_field_name: nil, field_mappings: nil) ⇒ SalesforceCustomKnowledgeArticleTypeConfigurationProperty

Returns a new instance of SalesforceCustomKnowledgeArticleTypeConfigurationProperty.

Parameters:

  • document_data_field_name (String)

    The name of the field in the custom knowledge article that contains the document data to index.

  • name (String)

    The name of the configuration.

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

    The name of the field in the custom knowledge article that contains the document title.

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

    Maps attributes or field names of the custom knowledge article to Amazon Kendra index field names.



2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
# File 'kendra/cfn_data_source.rb', line 2896

def initialize(document_data_field_name:, name:, document_title_field_name: nil, field_mappings: nil)
  @document_data_field_name = document_data_field_name
  Jsii::Type.check_type(@document_data_field_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentDataFieldName")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @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?
  @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

#document_data_field_nameString (readonly)

The name of the field in the custom knowledge article that contains the document data to index.



2911
2912
2913
# File 'kendra/cfn_data_source.rb', line 2911

def document_data_field_name
  @document_data_field_name
end

#document_title_field_nameString? (readonly)

The name of the field in the custom knowledge article that contains the document title.



2921
2922
2923
# File 'kendra/cfn_data_source.rb', line 2921

def document_title_field_name
  @document_title_field_name
end

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

Maps attributes or field names of the custom knowledge article to Amazon Kendra index field names.

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



2928
2929
2930
# File 'kendra/cfn_data_source.rb', line 2928

def field_mappings
  @field_mappings
end

#nameString (readonly)

The name of the configuration.



2916
2917
2918
# File 'kendra/cfn_data_source.rb', line 2916

def name
  @name
end

Class Method Details

.jsii_propertiesObject



2930
2931
2932
2933
2934
2935
2936
2937
# File 'kendra/cfn_data_source.rb', line 2930

def self.jsii_properties
  {
    :document_data_field_name => "documentDataFieldName",
    :name => "name",
    :document_title_field_name => "documentTitleFieldName",
    :field_mappings => "fieldMappings",
  }
end

Instance Method Details

#to_jsiiObject



2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
# File 'kendra/cfn_data_source.rb', line 2939

def to_jsii
  result = {}
  result.merge!({
    "documentDataFieldName" => @document_data_field_name,
    "name" => @name,
    "documentTitleFieldName" => @document_title_field_name,
    "fieldMappings" => @field_mappings,
  })
  result.compact
end