:doc:`FSx <../../fsx>` / Client / delete_snapshot

***************
delete_snapshot
***************



.. py:method:: FSx.Client.delete_snapshot(**kwargs)

  

  Deletes an Amazon FSx for OpenZFS snapshot. After deletion, the snapshot no longer exists, and its data is gone. Deleting a snapshot doesn't affect snapshots stored in a file system backup.

   

  The ``DeleteSnapshot`` operation returns instantly. The snapshot appears with the lifecycle status of ``DELETING`` until the deletion is complete.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DeleteSnapshot>`_  


  **Request Syntax**
  ::

    response = client.delete_snapshot(
        ClientRequestToken='string',
        SnapshotId='string'
    )
    
  :type ClientRequestToken: string
  :param ClientRequestToken: 

    (Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.

    This field is autopopulated if not provided.

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

    The ID of the snapshot that you want to delete.

    

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

    
    ::

      {
          'SnapshotId': 'string',
          'Lifecycle': 'PENDING'|'CREATING'|'DELETING'|'AVAILABLE'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The ID of the deleted snapshot.

        
      

      - **Lifecycle** *(string) --* 

        The lifecycle status of the snapshot. If the ``DeleteSnapshot`` operation is successful, this status is ``DELETING``.

        
  
  **Exceptions**
  
  *   :py:class:`FSx.Client.exceptions.BadRequest`

  
  *   :py:class:`FSx.Client.exceptions.InternalServerError`

  
  *   :py:class:`FSx.Client.exceptions.SnapshotNotFound`

  