QBusiness / Client / create_index
create_index#
- QBusiness.Client.create_index(**kwargs)#
Creates an Amazon Q index.
To determine if index creation has completed, check the
Status
field returned from a call toDescribeIndex
. TheStatus
field is set toACTIVE
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.
See also: AWS API Documentation
Request Syntax
response = client.create_index( applicationId='string', capacityConfiguration={ 'units': 123 }, clientToken='string', description='string', displayName='string', tags=[ { 'key': 'string', 'value': 'string' }, ] )
- Parameters:
applicationId (string) –
[REQUIRED]
The identifier of the Amazon Q application using the index.
capacityConfiguration (dict) –
The capacity units you want to provision for your index. You can add and remove capacity to fit your usage needs.
units (integer) –
The number of storage units configured for an Amazon Q index.
clientToken (string) –
A token that you provide to identify the request to create an index. Multiple calls to the
CreateIndex
API with the same client token will create only one index.This field is autopopulated if not provided.
description (string) – A description for the Amazon Q index.
displayName (string) –
[REQUIRED]
A name for the Amazon Q index.
tags (list) –
A list of key-value pairs that identify or categorize the index. You can also use tags to help control access to the index. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
(dict) –
A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
key (string) – [REQUIRED]
The key for the tag. Keys are not case sensitive and must be unique for the Amazon Q application or data source.
value (string) – [REQUIRED]
The value associated with the tag. The value may be an empty string but it can’t be null.
- Return type:
dict
- Returns:
Response Syntax
{ 'indexArn': 'string', 'indexId': 'string' }
Response Structure
(dict) –
indexArn (string) –
The Amazon Resource Name (ARN) of an Amazon Q index.
indexId (string) –
The identifier for the Amazon Q index.
Exceptions
QBusiness.Client.exceptions.ResourceNotFoundException
QBusiness.Client.exceptions.InternalServerException
QBusiness.Client.exceptions.ConflictException
QBusiness.Client.exceptions.ThrottlingException
QBusiness.Client.exceptions.ValidationException
QBusiness.Client.exceptions.AccessDeniedException
QBusiness.Client.exceptions.ServiceQuotaExceededException