Skip to main content

indexes

Creates, updates, deletes, gets or lists an indexes resource.

Overview

Nameindexes
TypeResource
Idaws.qbusiness.indexes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
application_idstringThe identifier of the Amazon Q Business application associated with the index. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]{35}</code>)
capacity_configurationobjectProvides information about index capacity configuration.
created_atstring (date-time)The Unix timestamp when the Amazon Q Business index was created.
descriptionstringThe description for the Amazon Q Business index. (pattern: <code>[\s\S]*</code>)
display_namestringThe name of the Amazon Q Business index. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9_-]*</code>)
document_attribute_configurationsarrayConfiguration 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.
errorobjectProvides information about a Amazon Q Business request error.
index_arnstringThe 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_idstringThe identifier of the Amazon Q Business index. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-]{35}</code>)
index_statisticsobjectProvides information about the number of documents indexed.
statusstringThe 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_stringThe type of index attached to your Amazon Q Business application. (ENTERPRISE, STARTER)
updated_atstring (date-time)The Unix timestamp when the Amazon Q Business index was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_indexselectapplication_id, index_id, regionGets information about an existing Amazon Q Business index.
create_indexinsertapplication_id, region, displayNameCreates 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_indexupdateapplication_id, index_id, regionUpdates an Amazon Q Business index.
delete_indexdeleteapplication_id, index_id, regionDeletes 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.

NameDatatypeDescription
application_idstringThe identifier of the Amazon Q Business application the Amazon Q Business index is linked to.
index_idstringThe identifier of the Amazon Q Business index.
regionstringAWS region (default: us-east-1)

SELECT examples

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

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
;

UPDATE examples

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

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
;