Class: AWSCDK::Kendra::CfnFaqProps

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

Overview

Properties for defining a CfnFaq.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(index_id:, name:, role_arn:, s3_path:, description: nil, file_format: nil, language_code: nil, tags: nil) ⇒ CfnFaqProps

Returns a new instance of CfnFaqProps.

Parameters:

  • index_id (String)

    The identifier of the index that contains the FAQ.

  • name (String)

    The name that you assigned the FAQ when you created or updated the FAQ.

  • role_arn (String)

    The Amazon Resource Name (ARN) of a role with permission to access the S3 bucket that contains the FAQ.

  • s3_path (AWSCDK::IResolvable, AWSCDK::Kendra::CfnFaq::S3PathProperty)

    The Amazon Simple Storage Service (Amazon S3) location of the FAQ input data.

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

    A description for the FAQ.

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

    The format of the input file.

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

    The code for a language.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

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



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'kendra/cfn_faq_props.rb', line 17

def initialize(index_id:, name:, role_arn:, s3_path:, description: nil, file_format: nil, language_code: nil, tags: nil)
  @index_id = index_id
  Jsii::Type.check_type(@index_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "indexId")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @s3_path = s3_path.is_a?(Hash) ? ::AWSCDK::Kendra::CfnFaq::S3PathProperty.new(**s3_path.transform_keys(&:to_sym)) : s3_path
  Jsii::Type.check_type(@s3_path, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19rZW5kcmEuQ2ZuRmFxLlMzUGF0aFByb3BlcnR5In1dfX0=")), "s3Path")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @file_format = file_format
  Jsii::Type.check_type(@file_format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fileFormat") unless @file_format.nil?
  @language_code = language_code
  Jsii::Type.check_type(@language_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "languageCode") unless @language_code.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

#descriptionString? (readonly)

A description for the FAQ.



60
61
62
# File 'kendra/cfn_faq_props.rb', line 60

def description
  @description
end

#file_formatString? (readonly)

The format of the input file.

You can choose between a basic CSV format, a CSV format that includes customs attributes in a header, and a JSON format that includes custom attributes.

The format must match the format of the file stored in the S3 bucket identified in the S3Path parameter.

Valid values are:

  • CSV
  • CSV_WITH_HEADER
  • JSON


75
76
77
# File 'kendra/cfn_faq_props.rb', line 75

def file_format
  @file_format
end

#index_idString (readonly)

The identifier of the index that contains the FAQ.



40
41
42
# File 'kendra/cfn_faq_props.rb', line 40

def index_id
  @index_id
end

#language_codeString? (readonly)

The code for a language.

This shows a supported language for the FAQ document as part of the summary information for FAQs. English is supported by default. For more information on supported languages, including their codes, see Adding documents in languages other than English .



82
83
84
# File 'kendra/cfn_faq_props.rb', line 82

def language_code
  @language_code
end

#nameString (readonly)

The name that you assigned the FAQ when you created or updated the FAQ.



45
46
47
# File 'kendra/cfn_faq_props.rb', line 45

def name
  @name
end

#role_arnString (readonly)

The Amazon Resource Name (ARN) of a role with permission to access the S3 bucket that contains the FAQ.



50
51
52
# File 'kendra/cfn_faq_props.rb', line 50

def role_arn
  @role_arn
end

#s3_pathAWSCDK::IResolvable, AWSCDK::Kendra::CfnFaq::S3PathProperty (readonly)

The Amazon Simple Storage Service (Amazon S3) location of the FAQ input data.



55
56
57
# File 'kendra/cfn_faq_props.rb', line 55

def s3_path
  @s3_path
end

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

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

For more information, see Tag .



89
90
91
# File 'kendra/cfn_faq_props.rb', line 89

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



91
92
93
94
95
96
97
98
99
100
101
102
# File 'kendra/cfn_faq_props.rb', line 91

def self.jsii_properties
  {
    :index_id => "indexId",
    :name => "name",
    :role_arn => "roleArn",
    :s3_path => "s3Path",
    :description => "description",
    :file_format => "fileFormat",
    :language_code => "languageCode",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'kendra/cfn_faq_props.rb', line 104

def to_jsii
  result = {}
  result.merge!({
    "indexId" => @index_id,
    "name" => @name,
    "roleArn" => @role_arn,
    "s3Path" => @s3_path,
    "description" => @description,
    "fileFormat" => @file_format,
    "languageCode" => @language_code,
    "tags" => @tags,
  })
  result.compact
end