Class: AWSCDK::Kendra::CfnFaqProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Kendra::CfnFaqProps
- Defined in:
- kendra/cfn_faq_props.rb
Overview
Properties for defining a CfnFaq.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
A description for the FAQ.
-
#file_format ⇒ String?
readonly
The format of the input file.
-
#index_id ⇒ String
readonly
The identifier of the index that contains the FAQ.
-
#language_code ⇒ String?
readonly
The code for a language.
-
#name ⇒ String
readonly
The name that you assigned the FAQ when you created or updated the FAQ.
-
#role_arn ⇒ String
readonly
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
readonly
The Amazon Simple Storage Service (Amazon S3) location of the FAQ input data.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of key-value pairs to apply to this resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(index_id:, name:, role_arn:, s3_path:, description: nil, file_format: nil, language_code: nil, tags: nil) ⇒ CfnFaqProps
constructor
A new instance of CfnFaqProps.
- #to_jsii ⇒ Object
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.
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 = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#description ⇒ String? (readonly)
A description for the FAQ.
60 61 62 |
# File 'kendra/cfn_faq_props.rb', line 60 def description @description end |
#file_format ⇒ String? (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:
CSVCSV_WITH_HEADERJSON
75 76 77 |
# File 'kendra/cfn_faq_props.rb', line 75 def file_format @file_format end |
#index_id ⇒ String (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_code ⇒ String? (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 |
#name ⇒ String (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_arn ⇒ String (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_path ⇒ AWSCDK::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 |
#tags ⇒ Array<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 end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |