faqs
Creates, updates, deletes or gets a faq resource or lists faqs in a region
Overview
| Name | faqs |
| Type | Resource |
| Description | A Kendra FAQ resource |
| Id | awscc.kendra.faqs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
id | string | Unique ID of index |
index_id | string | Index ID |
name | string | FAQ name |
description | string | FAQ description |
file_format | string | FAQ file format |
s3_path | object | FAQ S3 path |
role_arn | string | FAQ role ARN |
tags | array | Tags for labeling the FAQ |
arn | string | |
language_code | string | The code for a language. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | Unique ID of index |
index_id | string | Index ID |
region | string | AWS region. |
For more information, see AWS::Kendra::Faq.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | faqs | INSERT | IndexId, Name, S3Path, RoleArn, region |
delete_resource | faqs | DELETE | Identifier, region |
update_resource | faqs | UPDATE | Identifier, PatchDocument, region |
list_resources | faqs_list_only | SELECT | region |
get_resource | faqs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ id }}|{{ index_id }}';
Lists all faqs in a region.
SELECT
region,
id,
index_id
FROM awscc.kendra.faqs_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new faq resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.kendra.faqs (
IndexId,
Name,
S3Path,
RoleArn,
region
)
SELECT
'{{ index_id }}',
'{{ name }}',
'{{ s3_path }}',
'{{ role_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.kendra.faqs (
IndexId,
Name,
Description,
FileFormat,
S3Path,
RoleArn,
Tags,
LanguageCode,
region
)
SELECT
'{{ index_id }}',
'{{ name }}',
'{{ description }}',
'{{ file_format }}',
'{{ s3_path }}',
'{{ role_arn }}',
'{{ tags }}',
'{{ language_code }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: faq
props:
- name: index_id
value: '{{ index_id }}'
- name: name
value: '{{ name }}'
- name: description
value: '{{ description }}'
- name: file_format
value: '{{ file_format }}'
- name: s3_path
value:
bucket: '{{ bucket }}'
key: '{{ key }}'
- name: role_arn
value: '{{ role_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: language_code
value: '{{ language_code }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.kendra.faqs
WHERE
Identifier = '{{ id }}|{{ index_id }}' AND
region = 'us-east-1';
Permissions
To operate on the faqs resource, the following permissions are required:
- Create
- Update
- Read
- Delete
- List
kendra:CreateFaq,
kendra:DescribeFaq,
iam:PassRole,
kendra:ListTagsForResource,
kendra:TagResource
kendra:ListTagsForResource,
kendra:UntagResource,
kendra:TagResource
kendra:DescribeFaq,
kendra:ListTagsForResource
kendra:DeleteFaq,
kendra:DescribeFaq
kendra:ListFaqs