indices
Creates, updates, deletes or gets an index resource or lists indices in a region
Overview
| Name | indices |
| Type | Resource |
| Description | A Kendra index |
| Id | awscc.kendra.indices |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
id | string | Unique ID of index |
arn | string | |
description | string | A description for the index |
server_side_encryption_configuration | object | Server side encryption configuration |
tags | array | Tags for labeling the index |
name | string | Name of index |
role_arn | string | Role Arn |
edition | string | Edition of index |
document_metadata_configurations | array | Document metadata configurations |
capacity_units | object | Capacity units |
user_context_policy | string | |
user_token_configurations | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | Unique ID of index |
region | string | AWS region. |
For more information, see AWS::Kendra::Index.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | indices | INSERT | Name, RoleArn, Edition, region |
delete_resource | indices | DELETE | Identifier, region |
update_resource | indices | UPDATE | Identifier, PatchDocument, region |
list_resources | indices_list_only | SELECT | region |
get_resource | indices | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all indices in a region.
SELECT
region,
id
FROM awscc.kendra.indices_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new index resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ 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
;
/*+ create */
INSERT INTO awscc.kendra.indices (
Description,
ServerSideEncryptionConfiguration,
Tags,
Name,
RoleArn,
Edition,
DocumentMetadataConfigurations,
CapacityUnits,
UserContextPolicy,
UserTokenConfigurations,
region
)
SELECT
'{{ description }}',
'{{ server_side_encryption_configuration }}',
'{{ tags }}',
'{{ name }}',
'{{ role_arn }}',
'{{ edition }}',
'{{ document_metadata_configurations }}',
'{{ capacity_units }}',
'{{ user_context_policy }}',
'{{ user_token_configurations }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: index
props:
- name: description
value: '{{ description }}'
- name: server_side_encryption_configuration
value:
kms_key_id: '{{ kms_key_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: name
value: '{{ name }}'
- name: role_arn
value: '{{ role_arn }}'
- name: edition
value: '{{ edition }}'
- name: document_metadata_configurations
value:
- name: '{{ name }}'
type: '{{ type }}'
relevance:
freshness: '{{ freshness }}'
importance: '{{ importance }}'
duration: '{{ duration }}'
rank_order: '{{ rank_order }}'
value_importance_items:
- key: '{{ key }}'
value: null
search:
facetable: '{{ facetable }}'
searchable: '{{ searchable }}'
displayable: '{{ displayable }}'
sortable: '{{ sortable }}'
- name: capacity_units
value:
storage_capacity_units: '{{ storage_capacity_units }}'
query_capacity_units: '{{ query_capacity_units }}'
- name: user_context_policy
value: '{{ user_context_policy }}'
- name: user_token_configurations
value:
- jwt_token_type_configuration:
key_location: '{{ key_location }}'
url: '{{ url }}'
secret_manager_arn: null
user_name_attribute_field: '{{ user_name_attribute_field }}'
group_attribute_field: '{{ group_attribute_field }}'
issuer: '{{ issuer }}'
claim_regex: '{{ claim_regex }}'
json_token_type_configuration:
user_name_attribute_field: null
group_attribute_field: null
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:
| Parameter | Description |
|---|---|
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:
- Create
- Read
- Update
- Delete
- List
kendra:CreateIndex,
kendra:DescribeIndex,
kendra:UpdateIndex,
kendra:ListTagsForResource,
iam:PassRole,
kendra:TagResource,
kms:DescribeKey,
kms:CreateGrant
kendra:DescribeIndex,
kendra:ListTagsForResource
kendra:DescribeIndex,
kendra:UpdateIndex,
kendra:ListTagsForResource,
kendra:TagResource,
kendra:UntagResource,
iam:PassRole
kendra:DescribeIndex,
kendra:DeleteIndex,
kms:RetireGrant
kendra:ListIndices