StorageGateway / Client / delete_tape

delete_tape#

StorageGateway.Client.delete_tape(**kwargs)#

Deletes the specified virtual tape. This operation is only supported in the tape gateway type.

See also: AWS API Documentation

Request Syntax

response = client.delete_tape(
    GatewayARN='string',
    TapeARN='string',
    BypassGovernanceRetention=True|False
)
Parameters:
  • GatewayARN (string) –

    [REQUIRED]

    The unique Amazon Resource Name (ARN) of the gateway that the virtual tape to delete is associated with. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.

  • TapeARN (string) –

    [REQUIRED]

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

  • BypassGovernanceRetention (boolean) – 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.

Return type:

dict

Returns:

Response Syntax

{
    'TapeARN': 'string'
}

Response Structure

  • (dict) –

    DeleteTapeOutput

    • TapeARN (string) –

      The Amazon Resource Name (ARN) of the deleted virtual tape.

Exceptions

Examples

This example deletes the specified virtual tape.

response = client.delete_tape(
    GatewayARN='arn:aws:storagegateway:us-east-1:204469490176:gateway/sgw-12A3456B',
    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': {
        '...': '...',
    },
}