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
Idawscc.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.

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

Methods

NameResourceAccessible byRequired Params
create_resourceindicesINSERTName, RoleArn, Edition, region
delete_resourceindicesDELETEIdentifier, region
update_resourceindicesUPDATEIdentifier, PatchDocument, region
list_resourcesindices_list_onlySELECTregion
get_resourceindicesSELECTIdentifier, region

SELECT examples

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 awscc.kendra.indices
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.kendra.indices (
Name,
RoleArn,
Edition,
region
)
SELECT
'{{ name }}',
'{{ role_arn }}',
'{{ edition }}',
'{{ 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 index resource, using stack-deploy.

/*+ update */
UPDATE awscc.kendra.indices
SET PatchDocument = string('{{ {
"Description": description,
"Tags": tags,
"Name": name,
"RoleArn": role_arn,
"DocumentMetadataConfigurations": document_metadata_configurations,
"CapacityUnits": capacity_units,
"UserContextPolicy": user_context_policy,
"UserTokenConfigurations": user_token_configurations
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.kendra.indices
WHERE
Identifier = '{{ 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 indices resource, the following permissions are required:

kendra:CreateIndex,
kendra:DescribeIndex,
kendra:UpdateIndex,
kendra:ListTagsForResource,
iam:PassRole,
kendra:TagResource,
kms:DescribeKey,
kms:CreateGrant