faqs
Creates, updates, deletes, gets or lists a faqs resource.
Overview
| Name | faqs |
| Type | Resource |
| Id | aws.kendra.faqs |
Fields
The following fields are returned by SELECT queries:
- describe_faq
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The Unix timestamp when the FAQ was created. |
description | string | The description of the FAQ that you provided when it was created. (pattern: <code>^\P{C}*$</code>) |
error_message | string | If the Status field is FAILED, the ErrorMessage field contains the reason why the FAQ failed. (pattern: <code>^\P{C}*$</code>) |
file_format | string | The file format used for the FAQ file. (CSV, CSV_WITH_HEADER, JSON) |
id | string | The identifier of the FAQ. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9_-]*</code>) |
index_id | string | The identifier of the index for the FAQ. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]*</code>) |
language_code | string | The 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>) |
name | string | The name that you gave the FAQ when it was created. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9_-]*</code>) |
role_arn | string | The 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_path | object | Information required to find a specific file in an Amazon S3 bucket. |
status | string | The status of the FAQ. It is ready to use when the status is ACTIVE. (CREATING, UPDATING, ACTIVE, DELETING, FAILED) |
updated_at | string (date-time) | The Unix timestamp when the FAQ was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_faq | select | region | Gets information about a FAQ. | |
create_faq | insert | region, IndexId, S3Path, RoleArn | 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. | |
delete_faq | delete | region | Removes a FAQ from an index. | |
list_faqs | exec | region, IndexId | Gets 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_faq
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
- create_faq
- Manifest
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
;
# Description fields are for documentation purposes
- name: faqs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the faqs resource.
- name: IndexId
value: "{{ IndexId }}"
description: |
The identifier of the index for the FAQ.
- name: Name
value: "{{ Name }}"
description: |
A name for the FAQ.
- name: Description
value: "{{ Description }}"
description: |
A description for the FAQ.
- name: S3Path
description: |
Information required to find a specific file in an Amazon S3 bucket.
value:
Bucket: "{{ Bucket }}"
Key: "{{ Key }}"
- name: RoleArn
value: "{{ RoleArn }}"
description: |
The Amazon Resource Name (ARN) of an IAM role with permission to access the S3 bucket that contains the FAQ file. For more information, see IAM access roles for Amazon Kendra.
- name: Tags
description: |
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.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: FileFormat
value: "{{ FileFormat }}"
description: |
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 default format is CSV. 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.
valid_values: ['CSV', 'CSV_WITH_HEADER', 'JSON']
- name: ClientToken
value: "{{ ClientToken }}"
description: |
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.
- name: LanguageCode
value: "{{ LanguageCode }}"
description: |
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.
DELETE examples
- delete_faq
Removes a FAQ from an index.
DELETE FROM aws.kendra.faqs
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- list_faqs
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 }}
}'
;