indexes
Creates, updates, deletes, gets or lists an indexes resource.
Overview
| Name | indexes |
| Type | Resource |
| Id | aws.qbusiness.indexes |
Fields
The following fields are returned by SELECT queries:
- get_index
| Name | Datatype | Description |
|---|---|---|
application_id | string | The identifier of the Amazon Q Business application associated with the index. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]{35}</code>) |
capacity_configuration | object | Provides information about index capacity configuration. |
created_at | string (date-time) | The Unix timestamp when the Amazon Q Business index was created. |
description | string | The description for the Amazon Q Business index. (pattern: <code>[\s\S]*</code>) |
display_name | string | The name of the Amazon Q Business index. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9_-]*</code>) |
document_attribute_configurations | array | Configuration information for document attributes or metadata. Document metadata are fields associated with your documents. For example, the company department name associated with each document. For more information, see Understanding document attributes. |
error | object | Provides information about a Amazon Q Business request error. |
index_arn | string | The Amazon Resource Name (ARN) of the Amazon Q Business index. (pattern: <code>arn:[a-z0-9-.]{1,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[^/].{0,1023}</code>) |
index_id | string | The identifier of the Amazon Q Business index. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]{35}</code>) |
index_statistics | object | Provides information about the number of documents indexed. |
status | string | The current status of the index. When the value is ACTIVE, the index is ready for use. If the Status field value is FAILED, the ErrorMessage field contains a message that explains why. (CREATING, ACTIVE, DELETING, FAILED, UPDATING) |
type_ | string | The type of index attached to your Amazon Q Business application. (ENTERPRISE, STARTER) |
updated_at | string (date-time) | The Unix timestamp when the Amazon Q Business index was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_index | select | application_id, index_id, region | Gets information about an existing Amazon Q Business index. | |
create_index | insert | application_id, region, displayName | Creates an Amazon Q Business index. To determine if index creation has completed, check the Status field returned from a call to DescribeIndex. The Status field is set to ACTIVE when the index is ready to use. Once the index is active, you can index your documents using the BatchPutDocument API or the CreateDataSource API. | |
update_index | update | application_id, index_id, region | Updates an Amazon Q Business index. | |
delete_index | delete | application_id, index_id, region | Deletes an Amazon Q Business index. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The identifier of the Amazon Q Business application the Amazon Q Business index is linked to. |
index_id | string | The identifier of the Amazon Q Business index. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_index
Gets information about an existing Amazon Q Business index.
SELECT
application_id,
capacity_configuration,
created_at,
description,
display_name,
document_attribute_configurations,
error,
index_arn,
index_id,
index_statistics,
status,
type_,
updated_at
FROM aws.qbusiness.indexes
WHERE application_id = '{{ application_id }}' -- required
AND index_id = '{{ index_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_index
- Manifest
Creates an Amazon Q Business index. To determine if index creation has completed, check the Status field returned from a call to DescribeIndex. The Status field is set to ACTIVE when the index is ready to use. Once the index is active, you can index your documents using the BatchPutDocument API or the CreateDataSource API.
INSERT INTO aws.qbusiness.indexes (
displayName,
description,
type,
tags,
capacityConfiguration,
clientToken,
application_id,
region
)
SELECT
'{{ displayName }}' /* required */,
'{{ description }}',
'{{ type }}',
'{{ tags }}',
'{{ capacityConfiguration }}',
'{{ clientToken }}',
'{{ application_id }}',
'{{ region }}'
RETURNING
index_arn,
index_id
;
# Description fields are for documentation purposes
- name: indexes
props:
- name: application_id
value: "{{ application_id }}"
description: Required parameter for the indexes resource.
- name: region
value: "{{ region }}"
description: Required parameter for the indexes resource.
- name: displayName
value: "{{ displayName }}"
- name: description
value: "{{ description }}"
- name: type
value: "{{ type }}"
valid_values: ['ENTERPRISE', 'STARTER']
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: capacityConfiguration
description: |
Provides information about index capacity configuration.
value:
units: {{ units }}
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_index
Updates an Amazon Q Business index.
UPDATE aws.qbusiness.indexes
SET
displayName = '{{ displayName }}',
description = '{{ description }}',
capacityConfiguration = '{{ capacityConfiguration }}',
documentAttributeConfigurations = '{{ documentAttributeConfigurations }}'
WHERE
application_id = '{{ application_id }}' --required
AND index_id = '{{ index_id }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_index
Deletes an Amazon Q Business index.
DELETE FROM aws.qbusiness.indexes
WHERE application_id = '{{ application_id }}' --required
AND index_id = '{{ index_id }}' --required
AND region = '{{ region }}' --required
;