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

***************
create_snapshot
***************



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

  

  Creates a snapshot of a Simple AD or Microsoft AD directory in the Amazon Web Services cloud.

   

  .. note::

    

    You cannot take snapshots of AD Connector directories.

    

  

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


  **Request Syntax**
  ::

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

    The identifier of the directory of which to take a snapshot.

    

  
  :type Name: string
  :param Name: 

    The descriptive name to apply to the snapshot.

    

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

    
    ::

      {
          'SnapshotId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the results of the  CreateSnapshot operation.

      
      

      - **SnapshotId** *(string) --* 

        The identifier of the snapshot that was created.

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

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

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

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

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

  