Skip to main content

faqs

Creates, updates, deletes or gets a faq resource or lists faqs in a region

Overview

Namefaqs
TypeResource
DescriptionA Kendra FAQ resource
Idawscc.kendra.faqs

Fields

NameDatatypeDescription
idstringUnique ID of index
index_idstringIndex ID
namestringFAQ name
descriptionstringFAQ description
file_formatstringFAQ file format
s3_pathobjectFAQ S3 path
role_arnstringFAQ role ARN
tagsarrayTags for labeling the FAQ
arnstring
language_codestringThe code for a language.
regionstringAWS region.

For more information, see AWS::Kendra::Faq.

Methods

NameResourceAccessible byRequired Params
create_resourcefaqsINSERTIndexId, Name, S3Path, RoleArn, region
delete_resourcefaqsDELETEIdentifier, region
update_resourcefaqsUPDATEIdentifier, PatchDocument, region
list_resourcesfaqs_list_onlySELECTregion
get_resourcefaqsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual faq.

SELECT
region,
id,
index_id,
name,
description,
file_format,
s3_path,
role_arn,
tags,
arn,
language_code
FROM awscc.kendra.faqs
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}|{{ index_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new faq resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.kendra.faqs (
IndexId,
Name,
S3Path,
RoleArn,
region
)
SELECT
'{{ index_id }}',
'{{ name }}',
'{{ s3_path }}',
'{{ role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a faq resource, using stack-deploy.

/*+ update */
UPDATE awscc.kendra.faqs
SET PatchDocument = string('{{ {
"Tags": tags,
"LanguageCode": language_code
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}|{{ index_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.kendra.faqs
WHERE
Identifier = '{{ id }}|{{ index_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the faqs resource, the following permissions are required:

kendra:CreateFaq,
kendra:DescribeFaq,
iam:PassRole,
kendra:ListTagsForResource,
kendra:TagResource