Skip to main content

faqs

Creates, updates, deletes, gets or lists a faqs resource.

Overview

Namefaqs
TypeResource
Idaws.kendra.faqs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The Unix timestamp when the FAQ was created.
descriptionstringThe description of the FAQ that you provided when it was created. (pattern: <code>^\P{C}*$</code>)
error_messagestringIf the Status field is FAILED, the ErrorMessage field contains the reason why the FAQ failed. (pattern: <code>^\P{C}*$</code>)
file_formatstringThe file format used for the FAQ file. (CSV, CSV_WITH_HEADER, JSON)
idstringThe identifier of the FAQ. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9_-]*</code>)
index_idstringThe identifier of the index for the FAQ. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]*</code>)
language_codestringThe code for a language. This shows a supported 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. (pattern: <code>[a-zA-Z-]*</code>)
namestringThe name that you gave the FAQ when it was created. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9_-]*</code>)
role_arnstringThe Amazon Resource Name (ARN) of the IAM role that provides access to the S3 bucket containing the FAQ file. (pattern: <code>arn:[a-z0-9-.]{1,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[^/].{0,1023}</code>)
s3_pathobjectInformation required to find a specific file in an Amazon S3 bucket.
statusstringThe status of the FAQ. It is ready to use when the status is ACTIVE. (CREATING, UPDATING, ACTIVE, DELETING, FAILED)
updated_atstring (date-time)The Unix timestamp when the FAQ was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_faqselectregionGets information about a FAQ.
create_faqinsertregion, IndexId, S3Path, RoleArnCreates a set of frequently ask questions (FAQs) using a specified FAQ file stored in an Amazon S3 bucket. 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.
delete_faqdeleteregionRemoves a FAQ from an index.
list_faqsexecregion, IndexIdGets a list of FAQs associated with an index.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Gets information about a FAQ.

SELECT
created_at,
description,
error_message,
file_format,
id,
index_id,
language_code,
name,
role_arn,
s3_path,
status,
updated_at
FROM aws.kendra.faqs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a set of frequently ask questions (FAQs) using a specified FAQ file stored in an Amazon S3 bucket. 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.

INSERT INTO aws.kendra.faqs (
IndexId,
Name,
Description,
S3Path,
RoleArn,
Tags,
FileFormat,
ClientToken,
LanguageCode,
region
)
SELECT
'{{ IndexId }}' /* required */,
'{{ Name }}',
'{{ Description }}',
'{{ S3Path }}' /* required */,
'{{ RoleArn }}' /* required */,
'{{ Tags }}',
'{{ FileFormat }}',
'{{ ClientToken }}',
'{{ LanguageCode }}',
'{{ region }}'
RETURNING
id
;

DELETE examples

Removes a FAQ from an index.

DELETE FROM aws.kendra.faqs
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Gets a list of FAQs associated with an index.

EXEC aws.kendra.faqs.list_faqs
@region='{{ region }}' --required
@@json=
'{
"IndexId": "{{ IndexId }}",
"NextToken": "{{ NextToken }}",
"MaxResults": {{ MaxResults }}
}'
;