Skip to main content

indices

Creates, updates, deletes or gets an index resource or lists indices in a region

Overview

Nameindices
TypeResource
DescriptionA Kendra index
Idaws.kendra.indices

Fields

NameDatatypeDescription
idstringUnique ID of index
arnstring
descriptionstringA description for the index
server_side_encryption_configurationobjectServer side encryption configuration
tagsarrayTags for labeling the index
namestringName of index
role_arnstringRole Arn
editionstringEdition of index
document_metadata_configurationsarrayDocument metadata configurations
capacity_unitsobjectCapacity units
user_context_policystring
user_token_configurationsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, RoleArn, Edition, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all indices in a region.

SELECT
region,
id,
arn,
description,
server_side_encryption_configuration,
tags,
name,
role_arn,
edition,
document_metadata_configurations,
capacity_units,
user_context_policy,
user_token_configurations
FROM aws.kendra.indices
WHERE region = 'us-east-1';

Gets all properties from an individual index.

SELECT
region,
id,
arn,
description,
server_side_encryption_configuration,
tags,
name,
role_arn,
edition,
document_metadata_configurations,
capacity_units,
user_context_policy,
user_token_configurations
FROM aws.kendra.indices
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

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

/*+ create */
INSERT INTO aws.kendra.indices (
Name,
RoleArn,
Edition,
region
)
SELECT
'{{ Name }}',
'{{ RoleArn }}',
'{{ Edition }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.kendra.indices
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

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

Create

kendra:CreateIndex,
kendra:DescribeIndex,
kendra:UpdateIndex,
kendra:ListTagsForResource,
iam:PassRole,
kendra:TagResource

Read

kendra:DescribeIndex,
kendra:ListTagsForResource

Update

kendra:DescribeIndex,
kendra:UpdateIndex,
kendra:ListTagsForResource,
kendra:TagResource,
kendra:UntagResource,
iam:PassRole

Delete

kendra:DescribeIndex,
kendra:DeleteIndex

List

kendra:ListIndices