:doc:`WorkSpaces <../../workspaces>` / Client / restore_workspace

*****************
restore_workspace
*****************



.. py:method:: WorkSpaces.Client.restore_workspace(**kwargs)

  

  Restores the specified WorkSpace to its last known healthy state.

   

  You cannot restore a WorkSpace unless its state is ``AVAILABLE``, ``ERROR``, ``UNHEALTHY``, or ``STOPPED``.

   

  Restoring a WorkSpace is a potentially destructive action that can result in the loss of data. For more information, see `Restore a WorkSpace <https://docs.aws.amazon.com/workspaces/latest/adminguide/restore-workspace.html>`__.

   

  This operation is asynchronous and returns before the WorkSpace is completely restored.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RestoreWorkspace>`_  


  **Request Syntax**
  ::

    response = client.restore_workspace(
        WorkspaceId='string'
    )
    
  :type WorkspaceId: string
  :param WorkspaceId: **[REQUIRED]** 

    The identifier of the WorkSpace.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`WorkSpaces.Client.exceptions.InvalidParameterValuesException`

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

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

  
  *   :py:class:`WorkSpaces.Client.exceptions.OperationNotSupportedException`

  