Class: AWSCDK::Kendra::CfnDataSourceProps

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

Overview

Properties for defining a CfnDataSource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index_id:, name:, type:, custom_document_enrichment_configuration: nil, data_source_configuration: nil, description: nil, language_code: nil, role_arn: nil, schedule: nil, tags: nil) ⇒ CfnDataSourceProps

Returns a new instance of CfnDataSourceProps.

Parameters:



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'kendra/cfn_data_source_props.rb', line 19

def initialize(index_id:, name:, type:, custom_document_enrichment_configuration: nil, data_source_configuration: nil, description: nil, language_code: nil, role_arn: nil, schedule: nil, tags: nil)
  @index_id = index_id
  Jsii::Type.check_type(@index_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rZW5kcmEuSUluZGV4UmVmIn1dfX0=")), "indexId")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @custom_document_enrichment_configuration = custom_document_enrichment_configuration.is_a?(Hash) ? ::AWSCDK::Kendra::CfnDataSource::CustomDocumentEnrichmentConfigurationProperty.new(**custom_document_enrichment_configuration.transform_keys(&:to_sym)) : custom_document_enrichment_configuration
  Jsii::Type.check_type(@custom_document_enrichment_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rZW5kcmEuQ2ZuRGF0YVNvdXJjZS5DdXN0b21Eb2N1bWVudEVucmljaG1lbnRDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "customDocumentEnrichmentConfiguration") unless @custom_document_enrichment_configuration.nil?
  @data_source_configuration = data_source_configuration.is_a?(Hash) ? ::AWSCDK::Kendra::CfnDataSource::DataSourceConfigurationProperty.new(**data_source_configuration.transform_keys(&:to_sym)) : data_source_configuration
  Jsii::Type.check_type(@data_source_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rZW5kcmEuQ2ZuRGF0YVNvdXJjZS5EYXRhU291cmNlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "dataSourceConfiguration") unless @data_source_configuration.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @language_code = language_code
  Jsii::Type.check_type(@language_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "languageCode") unless @language_code.nil?
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "roleArn") unless @role_arn.nil?
  @schedule = schedule
  Jsii::Type.check_type(@schedule, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schedule") unless @schedule.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

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

Configuration information for altering document metadata and content during the document ingestion process.



61
62
63
# File 'kendra/cfn_data_source_props.rb', line 61

def custom_document_enrichment_configuration
  @custom_document_enrichment_configuration
end

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

Configuration information for an Amazon Kendra data source.

The contents of the configuration depend on the type of data source. You can only specify one type of data source in the configuration.

You can't specify the Configuration parameter when the Type parameter is set to CUSTOM .

The Configuration parameter is required for all other data sources.



72
73
74
# File 'kendra/cfn_data_source_props.rb', line 72

def data_source_configuration
  @data_source_configuration
end

#descriptionString? (readonly)

A description for the data source connector.



77
78
79
# File 'kendra/cfn_data_source_props.rb', line 77

def description
  @description
end

#index_idString, AWSCDK::Interfaces::AWSKendra::IIndexRef (readonly)

The identifier of the index you want to use with the data source connector.



46
47
48
# File 'kendra/cfn_data_source_props.rb', line 46

def index_id
  @index_id
end

#language_codeString? (readonly)

The code for a language.

This shows a supported language for all documents in the data source. English is supported by default. For more information on supported languages, including their codes, see Adding documents in languages other than English .



84
85
86
# File 'kendra/cfn_data_source_props.rb', line 84

def language_code
  @language_code
end

#nameString (readonly)

The name of the data source.



51
52
53
# File 'kendra/cfn_data_source_props.rb', line 51

def name
  @name
end

#role_arnString, ... (readonly)

The Amazon Resource Name (ARN) of a role with permission to access the data source.

You can't specify the RoleArn parameter when the Type parameter is set to CUSTOM .

The RoleArn parameter is required for all other data sources.



93
94
95
# File 'kendra/cfn_data_source_props.rb', line 93

def role_arn
  @role_arn
end

#scheduleString? (readonly)

Sets the frequency that Amazon Kendra checks the documents in your data source and updates the index.

If you don't set a schedule, Amazon Kendra doesn't periodically update the index.



100
101
102
# File 'kendra/cfn_data_source_props.rb', line 100

def schedule
  @schedule
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.

For more information, see Tag .



107
108
109
# File 'kendra/cfn_data_source_props.rb', line 107

def tags
  @tags
end

#typeString (readonly)

The type of the data source.



56
57
58
# File 'kendra/cfn_data_source_props.rb', line 56

def type
  @type
end

Class Method Details

.jsii_propertiesObject



109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'kendra/cfn_data_source_props.rb', line 109

def self.jsii_properties
  {
    :index_id => "indexId",
    :name => "name",
    :type => "type",
    :custom_document_enrichment_configuration => "customDocumentEnrichmentConfiguration",
    :data_source_configuration => "dataSourceConfiguration",
    :description => "description",
    :language_code => "languageCode",
    :role_arn => "roleArn",
    :schedule => "schedule",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'kendra/cfn_data_source_props.rb', line 124

def to_jsii
  result = {}
  result.merge!({
    "indexId" => @index_id,
    "name" => @name,
    "type" => @type,
    "customDocumentEnrichmentConfiguration" => @custom_document_enrichment_configuration,
    "dataSourceConfiguration" => @data_source_configuration,
    "description" => @description,
    "languageCode" => @language_code,
    "roleArn" => @role_arn,
    "schedule" => @schedule,
    "tags" => @tags,
  })
  result.compact
end