tapes
Creates, updates, deletes, gets or lists a tapes resource.
Overview
| Name | tapes |
| Type | Resource |
| Id | aws.storagegateway.tapes |
Fields
The following fields are returned by SELECT queries:
- describe_tapes
- list_tapes
| Name | Datatype | Description |
|---|---|---|
kms_key | string | Optional. 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_date | string (date-time) | The date that the tape enters a custom tape pool. |
pool_id | string | The 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. |
progress | number (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_date | string (date-time) | The date that the tape is first archived with tape retention lock enabled. |
tape_arn | string | The 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_barcode | string | The barcode that identifies a specific virtual tape. (pattern: <code>^[A-Z0-9]*$</code>) |
tape_created_date | string (date-time) | The date the virtual tape was created. |
tape_size_in_bytes | integer (int64) | The size, in bytes, of the virtual tape capacity. |
tape_status | string | The current state of the virtual tape. |
tape_used_in_bytes | integer (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_device | string | The virtual tape library (VTL) device that the virtual tape is associated with. |
worm | boolean | If the tape is archived as write-once-read-many (WORM), this value is true. |
| Name | Datatype | Description |
|---|---|---|
gateway_arn | string | The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region. |
pool_entry_date | string (date-time) | The date that the tape entered the custom tape pool with tape retention lock enabled. |
pool_id | string | The ID of the pool that you want to add your tape to for archiving. The tape in this pool is 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. |
retention_start_date | string (date-time) | The date that the tape became subject to tape retention lock. |
tape_arn | string | The Amazon Resource Name (ARN) of a 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_barcode | string | The barcode that identifies a specific virtual tape. (pattern: <code>^[A-Z0-9]*$</code>) |
tape_size_in_bytes | integer (int64) | The size, in bytes, of a virtual tape. |
tape_status | string | The status of the tape. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_tapes | select | region | 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. | |
list_tapes | select | region | Lists 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_tapes | insert | region, GatewayARN, TapeSizeInBytes, ClientToken, NumTapesToCreate, TapeBarcodePrefix | 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. | |
create_tape_with_barcode | insert | region, GatewayARN, TapeSizeInBytes, TapeBarcode | Creates 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_tape | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_tapes
- list_tapes
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
;
Lists 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.
SELECT
gateway_arn,
pool_entry_date,
pool_id,
retention_start_date,
tape_arn,
tape_barcode,
tape_size_in_bytes,
tape_status
FROM aws.storagegateway.tapes
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_tapes
- create_tape_with_barcode
- Manifest
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
;
Creates 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.
INSERT INTO aws.storagegateway.tapes (
GatewayARN,
TapeSizeInBytes,
TapeBarcode,
KMSEncrypted,
KMSKey,
PoolId,
Worm,
Tags,
region
)
SELECT
'{{ GatewayARN }}' /* required */,
{{ TapeSizeInBytes }} /* required */,
'{{ TapeBarcode }}' /* required */,
{{ KMSEncrypted }},
'{{ KMSKey }}',
'{{ PoolId }}',
{{ Worm }},
'{{ Tags }}',
'{{ region }}'
RETURNING
tape_arn
;
# Description fields are for documentation purposes
- name: tapes
props:
- name: region
value: "{{ region }}"
description: Required parameter for the tapes resource.
- name: GatewayARN
value: "{{ GatewayARN }}"
description: |
The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region.
- name: TapeSizeInBytes
value: {{ TapeSizeInBytes }}
description: |
The size, in bytes, of the virtual tape that you want to create. The size must be aligned by gigabyte (1024*1024*1024 bytes).
- name: ClientToken
value: "{{ ClientToken }}"
description: |
A unique identifier that you use to retry a request. If you retry a request, use the same ClientToken you specified in the initial request. Using the same ClientToken prevents creating the tape multiple times.
- name: NumTapesToCreate
value: {{ NumTapesToCreate }}
description: |
The number of virtual tapes that you want to create.
- name: TapeBarcodePrefix
value: "{{ TapeBarcodePrefix }}"
description: |
A prefix that you append to the barcode of the virtual tape you are creating. This prefix makes the barcode unique. The prefix must be 1-4 characters in length and must be one of the uppercase letters from A to Z.
- name: KMSEncrypted
value: {{ KMSEncrypted }}
description: |
Set to true to use Amazon S3 server-side encryption with your own KMS key, or false to use a key managed by Amazon S3. Optional. Valid Values: true | false
- name: KMSKey
value: "{{ KMSKey }}"
description: |
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 can only be set when KMSEncrypted is true. Optional.
- name: PoolId
value: "{{ PoolId }}"
description: |
The ID of the pool that you want to add your tape to for archiving. The tape in this pool is 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 Deep Archive) that corresponds to the pool.
- name: Worm
value: {{ Worm }}
description: |
Set to TRUE if the tape you are creating is to be configured as a write-once-read-many (WORM) tape.
- name: Tags
description: |
A list of up to 50 tags that can be assigned to a virtual tape that has a barcode. Each tag is a key-value pair. Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: TapeBarcode
value: "{{ TapeBarcode }}"
description: |
The barcode that you want to assign to the tape. Barcodes cannot be reused. This includes barcodes used for tapes that have been deleted.
DELETE examples
- delete_tape
Deletes the specified virtual tape. This operation is only supported in the tape gateway type.
DELETE FROM aws.storagegateway.tapes
WHERE region = '{{ region }}' --required
;