Skip to main content

tapes

Creates, updates, deletes, gets or lists a tapes resource.

Overview

Nametapes
TypeResource
Idaws.storagegateway.tapes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
kms_keystringOptional. The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption. Storage Gateway does not support asymmetric CMKs. This value must be set if KMSEncrypted is true, or if EncryptionType is SseKms or DsseKms. (pattern: <code>(^arn:(aws(|-cn|-us-gov|-iso[A-Za-z0-9_-]*|-eusc)):kms:([a-zA-Z0-9-]+):([0-9]+):(key|alias)/(\S+)$)|(^alias/(\S+)$)</code>)
pool_entry_datestring (date-time)The date that the tape enters a custom tape pool.
pool_idstringThe ID of the pool that contains tapes that will be archived. The tapes in this pool are archived in the S3 storage class that is associated with the pool. When you use your backup application to eject the tape, the tape is archived directly into the storage class (S3 Glacier or S3 Glacier Deep Archive) that corresponds to the pool.
progressnumber (double)For archiving virtual tapes, indicates how much data remains to be uploaded before archiving is complete. Range: 0 (not started) to 100 (complete).
retention_start_datestring (date-time)The date that the tape is first archived with tape retention lock enabled.
tape_arnstringThe Amazon Resource Name (ARN) of the virtual tape. (pattern: <code>arn:(aws(|-cn|-us-gov|-iso[A-Za-z0-9_-]*|-eusc)):storagegateway:[a-z-0-9]+:[0-9]+:tape/[0-9A-Z]{5,16}$</code>)
tape_barcodestringThe barcode that identifies a specific virtual tape. (pattern: <code>^[A-Z0-9]*$</code>)
tape_created_datestring (date-time)The date the virtual tape was created.
tape_size_in_bytesinteger (int64)The size, in bytes, of the virtual tape capacity.
tape_statusstringThe current state of the virtual tape.
tape_used_in_bytesinteger (int64)The size, in bytes, of data stored on the virtual tape. This value is not available for tapes created prior to May 13, 2015.
vtl_devicestringThe virtual tape library (VTL) device that the virtual tape is associated with.
wormbooleanIf the tape is archived as write-once-read-many (WORM), this value is true.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_tapesselectregionReturns a description of virtual tapes that correspond to the specified Amazon Resource Names (ARNs). If TapeARN is not specified, returns a description of the virtual tapes associated with the specified gateway. This operation is only supported for the tape gateway type. The operation supports pagination. By default, the operation returns a maximum of up to 100 tapes. You can optionally specify the Limit field in the body to limit the number of tapes in the response. If the number of tapes returned in the response is truncated, the response includes a Marker field. You can use this Marker value in your subsequent request to retrieve the next set of tapes.
list_tapesselectregionLists virtual tapes in your virtual tape library (VTL) and your virtual tape shelf (VTS). You specify the tapes to list by specifying one or more tape Amazon Resource Names (ARNs). If you don't specify a tape ARN, the operation lists all virtual tapes in both your VTL and VTS. This operation supports pagination. By default, the operation returns a maximum of up to 100 tapes. You can optionally specify the Limit parameter in the body to limit the number of tapes in the response. If the number of tapes returned in the response is truncated, the response includes a Marker element that you can use in your subsequent request to retrieve the next set of tapes. This operation is only supported in the tape gateway type.
create_tapesinsertregion, GatewayARN, TapeSizeInBytes, ClientToken, NumTapesToCreate, TapeBarcodePrefixCreates one or more virtual tapes. You write data to the virtual tapes and then archive the tapes. This operation is only supported in the tape gateway type. Cache storage must be allocated to the gateway before you can create virtual tapes. Use the AddCache operation to add cache storage to a gateway.
create_tape_with_barcodeinsertregion, GatewayARN, TapeSizeInBytes, TapeBarcodeCreates a virtual tape by using your own barcode. You write data to the virtual tape and then archive the tape. A barcode is unique and cannot be reused if it has already been used on a tape. This applies to barcodes used on deleted tapes. This operation is only supported in the tape gateway type. Cache storage must be allocated to the gateway before you can create a virtual tape. Use the AddCache operation to add cache storage to a gateway.
delete_tapedeleteregionDeletes the specified virtual tape. This operation is only supported in the tape gateway type.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a description of virtual tapes that correspond to the specified Amazon Resource Names (ARNs). If TapeARN is not specified, returns a description of the virtual tapes associated with the specified gateway. This operation is only supported for the tape gateway type. The operation supports pagination. By default, the operation returns a maximum of up to 100 tapes. You can optionally specify the Limit field in the body to limit the number of tapes in the response. If the number of tapes returned in the response is truncated, the response includes a Marker field. You can use this Marker value in your subsequent request to retrieve the next set of tapes.

SELECT
kms_key,
pool_entry_date,
pool_id,
progress,
retention_start_date,
tape_arn,
tape_barcode,
tape_created_date,
tape_size_in_bytes,
tape_status,
tape_used_in_bytes,
vtl_device,
worm
FROM aws.storagegateway.tapes
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates one or more virtual tapes. You write data to the virtual tapes and then archive the tapes. This operation is only supported in the tape gateway type. Cache storage must be allocated to the gateway before you can create virtual tapes. Use the AddCache operation to add cache storage to a gateway.

INSERT INTO aws.storagegateway.tapes (
GatewayARN,
TapeSizeInBytes,
ClientToken,
NumTapesToCreate,
TapeBarcodePrefix,
KMSEncrypted,
KMSKey,
PoolId,
Worm,
Tags,
region
)
SELECT
'{{ GatewayARN }}' /* required */,
{{ TapeSizeInBytes }} /* required */,
'{{ ClientToken }}' /* required */,
{{ NumTapesToCreate }} /* required */,
'{{ TapeBarcodePrefix }}' /* required */,
{{ KMSEncrypted }},
'{{ KMSKey }}',
'{{ PoolId }}',
{{ Worm }},
'{{ Tags }}',
'{{ region }}'
RETURNING
tape_arns
;

DELETE examples

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

DELETE FROM aws.storagegateway.tapes
WHERE region = '{{ region }}' --required
;