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 | aws.kendra.indices |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, RoleArn, Edition, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.kendra.indices (
Name,
RoleArn,
Edition,
region
)
SELECT
'{{ Name }}',
'{{ RoleArn }}',
'{{ Edition }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.kendra.indices (
Description,
ServerSideEncryptionConfiguration,
Tags,
Name,
RoleArn,
Edition,
DocumentMetadataConfigurations,
CapacityUnits,
UserContextPolicy,
UserTokenConfigurations,
region
)
SELECT
'{{ Description }}',
'{{ ServerSideEncryptionConfiguration }}',
'{{ Tags }}',
'{{ Name }}',
'{{ RoleArn }}',
'{{ Edition }}',
'{{ DocumentMetadataConfigurations }}',
'{{ CapacityUnits }}',
'{{ UserContextPolicy }}',
'{{ UserTokenConfigurations }}',
'{{ region }}';
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: ServerSideEncryptionConfiguration
value:
KmsKeyId: '{{ KmsKeyId }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: Name
value: '{{ Name }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: Edition
value: '{{ Edition }}'
- name: DocumentMetadataConfigurations
value:
- Name: '{{ Name }}'
Type: '{{ Type }}'
Relevance:
Freshness: '{{ Freshness }}'
Importance: '{{ Importance }}'
Duration: '{{ Duration }}'
RankOrder: '{{ RankOrder }}'
ValueImportanceItems:
- Key: '{{ Key }}'
Value: null
Search:
Facetable: '{{ Facetable }}'
Searchable: '{{ Searchable }}'
Displayable: '{{ Displayable }}'
Sortable: '{{ Sortable }}'
- name: CapacityUnits
value:
StorageCapacityUnits: '{{ StorageCapacityUnits }}'
QueryCapacityUnits: '{{ QueryCapacityUnits }}'
- name: UserContextPolicy
value: '{{ UserContextPolicy }}'
- name: UserTokenConfigurations
value:
- JwtTokenTypeConfiguration:
KeyLocation: '{{ KeyLocation }}'
URL: '{{ URL }}'
SecretManagerArn: null
UserNameAttributeField: '{{ UserNameAttributeField }}'
GroupAttributeField: '{{ GroupAttributeField }}'
Issuer: '{{ Issuer }}'
ClaimRegex: '{{ ClaimRegex }}'
JsonTokenTypeConfiguration:
UserNameAttributeField: null
GroupAttributeField: null
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