OpenSearchServiceServerless / Client / create_index
create_index¶
- OpenSearchServiceServerless.Client.create_index(**kwargs)¶
Creates an index within an OpenSearch Serverless collection. Unlike other OpenSearch indexes, indexes created by this API are automatically configured to conduct automatic semantic enrichment ingestion and search. For more information, see About automatic semantic enrichment in the OpenSearch User Guide.
See also: AWS API Documentation
Request Syntax
response = client.create_index( id='string', indexName='string', indexSchema={...}|[...]|123|123.4|'string'|True|None )
- Parameters:
id (string) –
[REQUIRED]
The unique identifier of the collection in which to create the index.
indexName (string) –
[REQUIRED]
The name of the index to create. Index names must be lowercase and can’t begin with underscores (_) or hyphens (-).
indexSchema (document) – The JSON schema definition for the index, including field mappings and settings.
- Return type:
dict
- Returns:
Response Syntax
{}
Response Structure
(dict) –
Exceptions
OpenSearchServiceServerless.Client.exceptions.InternalServerException
OpenSearchServiceServerless.Client.exceptions.ConflictException
OpenSearchServiceServerless.Client.exceptions.ResourceNotFoundException
OpenSearchServiceServerless.Client.exceptions.ValidationException