:doc:`StorageGateway <../../storagegateway>` / Client / delete_tape_archive

*******************
delete_tape_archive
*******************



.. py:method:: StorageGateway.Client.delete_tape_archive(**kwargs)

  

  Deletes the specified virtual tape from the virtual tape shelf (VTS). This operation is only supported in the tape gateway type.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTapeArchive>`_  


  **Request Syntax**
  ::

    response = client.delete_tape_archive(
        TapeARN='string',
        BypassGovernanceRetention=True|False
    )
    
  :type TapeARN: string
  :param TapeARN: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the virtual tape to delete from the virtual tape shelf (VTS).

    

  
  :type BypassGovernanceRetention: boolean
  :param BypassGovernanceRetention: 

    Set to ``TRUE`` to delete an archived tape that belongs to a custom pool with tape retention lock. Only archived tapes with tape retention lock set to ``governance`` can be deleted. Archived tapes with tape retention lock set to ``compliance`` can't be deleted.

    

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

    
    ::

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

    

    - *(dict) --* 

      DeleteTapeArchiveOutput

      
      

      - **TapeARN** *(string) --* 

        The Amazon Resource Name (ARN) of the virtual tape that was deleted from the virtual tape shelf (VTS).

        
  
  **Exceptions**
  
  *   :py:class:`StorageGateway.Client.exceptions.InvalidGatewayRequestException`

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

  

  **Examples**

  Deletes the specified virtual tape from the virtual tape shelf (VTS).
  ::

    response = client.delete_tape_archive(
        TapeARN='arn:aws:storagegateway:us-east-1:204469490176:tape/TEST05A2A0',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'TapeARN': 'arn:aws:storagegateway:us-east-1:204469490176:tape/TEST05A2A0',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  