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

*********************
restore_from_snapshot
*********************



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

  

  Restores a directory using an existing directory snapshot.

   

  When you restore a directory from a snapshot, any changes made to the directory after the snapshot date are overwritten.

   

  This action returns as soon as the restore operation is initiated. You can monitor the progress of the restore operation by calling the  DescribeDirectories operation with the directory identifier. When the **DirectoryDescription.Stage** value changes to ``Active``, the restore operation is complete.

  

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


  **Request Syntax**
  ::

    response = client.restore_from_snapshot(
        SnapshotId='string'
    )
    
  :type SnapshotId: string
  :param SnapshotId: **[REQUIRED]** 

    The identifier of the snapshot to restore from.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the results of the  RestoreFromSnapshot operation.

      
  
  **Exceptions**
  
  *   :py:class:`DirectoryService.Client.exceptions.EntityDoesNotExistException`

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

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

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

  