2025/08/06 - OpenSearch Service Serverless - 4 new api methods
Changes Features: add Index APIs in OpenSearchServerless to support managed semantic enrichment
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
client.create_index( id='string', indexName='string', indexSchema={...}|[...]|123|123.4|'string'|True|None )
string
[REQUIRED]
The unique identifier of the collection in which to create the index.
string
[REQUIRED]
The name of the index to create. Index names must be lowercase and can't begin with underscores (_) or hyphens (-).
:ref:`document<document>`
The JSON schema definition for the index, including field mappings and settings.
dict
Response Syntax
{}
Response Structure
(dict) --
Updates an existing index in an OpenSearch Serverless collection. This operation allows you to modify the index schema, including adding new fields or changing field mappings. You can also enable automatic semantic enrichment ingestion and search. For more information, see About automatic semantic enrichment.
See also: AWS API Documentation
Request Syntax
client.update_index( id='string', indexName='string', indexSchema={...}|[...]|123|123.4|'string'|True|None )
string
[REQUIRED]
The unique identifier of the collection containing the index to update.
string
[REQUIRED]
The name of the index to update.
:ref:`document<document>`
The updated JSON schema definition for the index, including field mappings and settings.
dict
Response Syntax
{}
Response Structure
(dict) --
Retrieves information about an index in an OpenSearch Serverless collection, including its schema definition. The index might be configured to conduct automatic semantic enrichment ingestion and search. For more information, see About automatic semantic enrichment.
See also: AWS API Documentation
Request Syntax
client.get_index( id='string', indexName='string' )
string
[REQUIRED]
The unique identifier of the collection containing the index.
string
[REQUIRED]
The name of the index to retrieve information about.
dict
Response Syntax
{ 'indexSchema': {...}|[...]|123|123.4|'string'|True|None }
Response Structure
(dict) --
indexSchema (:ref:`document<document>`) --
The JSON schema definition for the index, including field mappings and settings.
Deletes an index from an OpenSearch Serverless collection. Be aware that the index might be configured to conduct automatic semantic enrichment ingestion and search. For more information, see About automatic semantic enrichment.
See also: AWS API Documentation
Request Syntax
client.delete_index( id='string', indexName='string' )
string
[REQUIRED]
The unique identifier of the collection containing the index to delete.
string
[REQUIRED]
The name of the index to delete.
dict
Response Syntax
{}
Response Structure
(dict) --