:doc:`ResourceExplorer <../../resource-explorer-2>` / Client / update_index_type

*****************
update_index_type
*****************



.. py:method:: ResourceExplorer.Client.update_index_type(**kwargs)

  

  Changes the type of the index from one of the following types to the other. For more information about indexes and the role they perform in Amazon Web Services Resource Explorer, see `Turning on cross-Region search by creating an aggregator index <https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html>`__ in the *Amazon Web Services Resource Explorer User Guide*.

   

  
  * ``AGGREGATOR`` index type The index contains information about resources from all Amazon Web Services Regions in the Amazon Web Services account in which you've created a Resource Explorer index. Resource information from all other Regions is replicated to this Region's index. When you change the index type to ``AGGREGATOR``, Resource Explorer turns on replication of all discovered resource information from the other Amazon Web Services Regions in your account to this index. You can then, from this Region only, perform resource search queries that span all Amazon Web Services Regions in the Amazon Web Services account. Turning on replication from all other Regions is performed by asynchronous background tasks. You can check the status of the asynchronous tasks by using the  GetIndex operation. When the asynchronous tasks complete, the ``Status`` response of that operation changes from ``UPDATING`` to ``ACTIVE``. After that, you can start to see results from other Amazon Web Services Regions in query results. However, it can take several hours for replication from all other Regions to complete. 

  .. warning::

    You can have only one aggregator index per Amazon Web Services account. Before you can promote a different index to be the aggregator index for the account, you must first demote the existing aggregator index to type ``LOCAL``.

  
   
  * ``LOCAL`` index type The index contains information about resources in only the Amazon Web Services Region in which the index exists. If an aggregator index in another Region exists, then information in this local index is replicated to the aggregator index. When you change the index type to ``LOCAL``, Resource Explorer turns off the replication of resource information from all other Amazon Web Services Regions in the Amazon Web Services account to this Region. The aggregator index remains in the ``UPDATING`` state until all replication with other Regions successfully stops. You can check the status of the asynchronous task by using the  GetIndex operation. When Resource Explorer successfully stops all replication with other Regions, the ``Status`` response of that operation changes from ``UPDATING`` to ``ACTIVE``. Separately, the resource information from other Regions that was previously stored in the index is deleted within 30 days by another background task. Until that asynchronous task completes, some results from other Regions can continue to appear in search results. 

  .. warning::

    After you demote an aggregator index to a local index, you must wait 24 hours before you can promote another index to be the new aggregator index for the account.

  
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/resource-explorer-2-2022-07-28/UpdateIndexType>`_  


  **Request Syntax**
  ::

    response = client.update_index_type(
        Arn='string',
        Type='LOCAL'|'AGGREGATOR'
    )
    
  :type Arn: string
  :param Arn: **[REQUIRED]** 

    The `Amazon resource name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the index that you want to update.

    

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

    The type of the index. To understand the difference between ``LOCAL`` and ``AGGREGATOR``, see `Turning on cross-Region search <https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html>`__ in the *Amazon Web Services Resource Explorer User Guide*.

    

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

    
    ::

      {
          'Arn': 'string',
          'Type': 'LOCAL'|'AGGREGATOR',
          'State': 'CREATING'|'ACTIVE'|'DELETING'|'DELETED'|'UPDATING',
          'LastUpdatedAt': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Arn** *(string) --* 

        The `Amazon resource name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the index that you updated.

        
      

      - **Type** *(string) --* 

        Specifies the type of the specified index after the operation completes.

        
      

      - **State** *(string) --* 

        Indicates the state of the request to update the index. This operation is asynchronous. Call the  GetIndex operation to check for changes.

        
      

      - **LastUpdatedAt** *(datetime) --* 

        The date and timestamp when the index was last updated.

        
  
  **Exceptions**
  
  *   :py:class:`ResourceExplorer.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`ResourceExplorer.Client.exceptions.InternalServerException`

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

  
  *   :py:class:`ResourceExplorer.Client.exceptions.ConflictException`

  
  *   :py:class:`ResourceExplorer.Client.exceptions.ServiceQuotaExceededException`

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

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

  