Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creates an new set of frequently asked question (FAQ) questions and answers.
Adding FAQs to an index is an asynchronous operation.
For an example of adding an FAQ to an index using Python and Java SDKs, see Using your FAQ file.
Synopsis
- data CreateFaq = CreateFaq' {
- clientToken :: Maybe Text
- description :: Maybe Text
- fileFormat :: Maybe FaqFileFormat
- languageCode :: Maybe Text
- tags :: Maybe [Tag]
- indexId :: Text
- name :: Text
- s3Path :: S3Path
- roleArn :: Text
- newCreateFaq :: Text -> Text -> S3Path -> Text -> CreateFaq
- createFaq_clientToken :: Lens' CreateFaq (Maybe Text)
- createFaq_description :: Lens' CreateFaq (Maybe Text)
- createFaq_fileFormat :: Lens' CreateFaq (Maybe FaqFileFormat)
- createFaq_languageCode :: Lens' CreateFaq (Maybe Text)
- createFaq_tags :: Lens' CreateFaq (Maybe [Tag])
- createFaq_indexId :: Lens' CreateFaq Text
- createFaq_name :: Lens' CreateFaq Text
- createFaq_s3Path :: Lens' CreateFaq S3Path
- createFaq_roleArn :: Lens' CreateFaq Text
- data CreateFaqResponse = CreateFaqResponse' {
- id :: Maybe Text
- httpStatus :: Int
- newCreateFaqResponse :: Int -> CreateFaqResponse
- createFaqResponse_id :: Lens' CreateFaqResponse (Maybe Text)
- createFaqResponse_httpStatus :: Lens' CreateFaqResponse Int
Creating a Request
See: newCreateFaq
smart constructor.
CreateFaq' | |
|
Instances
Create a value of CreateFaq
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:clientToken:CreateFaq'
, createFaq_clientToken
- A token that you provide to identify the request to create a FAQ.
Multiple calls to the CreateFaqRequest
API with the same client token
will create only one FAQ.
$sel:description:CreateFaq'
, createFaq_description
- A description for the FAQ.
CreateFaq
, createFaq_fileFormat
- The format of the FAQ 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.
For more information, see Adding questions and answers.
CreateFaq
, createFaq_languageCode
- The code for a language. This allows you to support a language for the
FAQ document. English is supported by default. For more information on
supported languages, including their codes, see
Adding documents in languages other than English.
$sel:tags:CreateFaq'
, createFaq_tags
- A list of key-value pairs that identify the FAQ. You can use the tags to
identify and organize your resources and to control access to resources.
$sel:indexId:CreateFaq'
, createFaq_indexId
- The identifier of the index for the FAQ.
CreateFaq
, createFaq_name
- A name for the FAQ.
CreateFaq
, createFaq_s3Path
- The path to the FAQ file in S3.
CreateFaq
, createFaq_roleArn
- The Amazon Resource Name (ARN) of a role with permission to access the
S3 bucket that contains the FAQs. For more information, see
IAM Roles for Amazon Kendra.
Request Lenses
createFaq_clientToken :: Lens' CreateFaq (Maybe Text) Source #
A token that you provide to identify the request to create a FAQ.
Multiple calls to the CreateFaqRequest
API with the same client token
will create only one FAQ.
createFaq_fileFormat :: Lens' CreateFaq (Maybe FaqFileFormat) Source #
The format of the FAQ 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.
For more information, see Adding questions and answers.
createFaq_languageCode :: Lens' CreateFaq (Maybe Text) Source #
The code for a language. This allows you to support a language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see Adding documents in languages other than English.
createFaq_tags :: Lens' CreateFaq (Maybe [Tag]) Source #
A list of key-value pairs that identify the FAQ. You can use the tags to identify and organize your resources and to control access to resources.
createFaq_roleArn :: Lens' CreateFaq Text Source #
The Amazon Resource Name (ARN) of a role with permission to access the S3 bucket that contains the FAQs. For more information, see IAM Roles for Amazon Kendra.
Destructuring the Response
data CreateFaqResponse Source #
See: newCreateFaqResponse
smart constructor.
CreateFaqResponse' | |
|
Instances
Create a value of CreateFaqResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateFaqResponse
, createFaqResponse_id
- The identifier of the FAQ.
$sel:httpStatus:CreateFaqResponse'
, createFaqResponse_httpStatus
- The response's http status code.
Response Lenses
createFaqResponse_id :: Lens' CreateFaqResponse (Maybe Text) Source #
The identifier of the FAQ.
createFaqResponse_httpStatus :: Lens' CreateFaqResponse Int Source #
The response's http status code.