:doc:`OpenSearchServiceServerless <../../opensearchserverless>` / Client / get_index

*********
get_index
*********



.. py:method:: OpenSearchServiceServerless.Client.get_index(**kwargs)

  

  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 <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-manage.html#serverless-semantic-enrichment>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/opensearchserverless-2021-11-01/GetIndex>`_  


  **Request Syntax**
  ::

    response = client.get_index(
        id='string',
        indexName='string'
    )
    
  :type id: string
  :param id: **[REQUIRED]** 

    The unique identifier of the collection containing the index.

    

  
  :type indexName: string
  :param indexName: **[REQUIRED]** 

    The name of the index to retrieve information about.

    

  
  
  :rtype: dict
  :returns: 
    
    **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.

        
  
  **Exceptions**
  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.InternalServerException`

  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.ValidationException`

  