:doc:`DirectoryService <../../ds>` / Client / remove_region

*************
remove_region
*************



.. py:method:: DirectoryService.Client.remove_region(**kwargs)

  

  Stops all replication and removes the domain controllers from the specified Region. You cannot remove the primary Region with this operation. Instead, use the ``DeleteDirectory`` API.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RemoveRegion>`_  


  **Request Syntax**
  ::

    response = client.remove_region(
        DirectoryId='string'
    )
    
  :type DirectoryId: string
  :param DirectoryId: **[REQUIRED]** 

    The identifier of the directory for which you want to remove Region replication.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`DirectoryService.Client.exceptions.DirectoryUnavailableException`

  
  *   :py:class:`DirectoryService.Client.exceptions.DirectoryDoesNotExistException`

  
  *   :py:class:`DirectoryService.Client.exceptions.UnsupportedOperationException`

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

  
  *   :py:class:`DirectoryService.Client.exceptions.ClientException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ServiceException`

  