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

*************
delete_backup
*************



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

  

  Deletes an Amazon FSx backup. After deletion, the backup no longer exists, and its data is gone.

   

  The ``DeleteBackup`` call returns instantly. The backup won't show up in later ``DescribeBackups`` calls.

   

  .. warning::

     

    The data in a deleted backup is also deleted and can't be recovered by any means.

    

  

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


  **Request Syntax**
  ::

    response = client.delete_backup(
        BackupId='string',
        ClientRequestToken='string'
    )
    
  :type BackupId: string
  :param BackupId: **[REQUIRED]** 

    The ID of the backup that you want to delete.

    

  
  :type ClientRequestToken: string
  :param ClientRequestToken: 

    A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This parameter is automatically filled on your behalf when using the CLI or SDK.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'BackupId': 'string',
          'Lifecycle': 'AVAILABLE'|'CREATING'|'TRANSFERRING'|'DELETED'|'FAILED'|'PENDING'|'COPYING'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The response object for the ``DeleteBackup`` operation.

      
      

      - **BackupId** *(string) --* 

        The ID of the backup that was deleted.

        
      

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

        The lifecycle status of the backup. If the ``DeleteBackup`` operation is successful, the status is ``DELETED``.

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

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

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

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

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

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

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

  

  **Examples**

  This operation deletes an Amazon FSx file system backup.
  ::

    response = client.delete_backup(
        BackupId='backup-03e3c82e0183b7b6b',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'BackupId': 'backup-03e3c82e0183b7b6b',
        'Lifecycle': 'DELETED',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  