:doc:`OpenSearchService <../../opensearch>` / Client / update_index

************
update_index
************



.. py:method:: OpenSearchService.Client.update_index(**kwargs)

  

  Updates an existing OpenSearch index schema and semantic enrichment configuration. This operation allows modification of field mappings and semantic search settings for text fields. Changes to semantic enrichment configuration will apply to newly ingested documents.

  

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


  **Request Syntax**
  ::

    response = client.update_index(
        DomainName='string',
        IndexName='string',
        IndexSchema={...}|[...]|123|123.4|'string'|True|None
    )
    
  :type DomainName: string
  :param DomainName: **[REQUIRED]** 

    The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.

    

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

    The name of the index to update.

    

  
  :type IndexSchema: :ref:`document<document>`
  :param IndexSchema: **[REQUIRED]** 

    The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Status': 'CREATED'|'UPDATED'|'DELETED'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Status** *(string) --* 

        The status of the index update operation.

        
  
  **Exceptions**
  
  *   :py:class:`OpenSearchService.Client.exceptions.ValidationException`

  
  *   :py:class:`OpenSearchService.Client.exceptions.AccessDeniedException`

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

  
  *   :py:class:`OpenSearchService.Client.exceptions.InternalException`

  
  *   :py:class:`OpenSearchService.Client.exceptions.DisabledOperationException`

  
  *   :py:class:`OpenSearchService.Client.exceptions.DependencyFailureException`

  
  *   :py:class:`OpenSearchService.Client.exceptions.ThrottlingException`

  