describe_tape_archives

describe_tape_archives(**kwargs)

Returns a description of specified virtual tapes in the virtual tape shelf (VTS). This operation is only supported in the tape gateway type.

If a specific TapeARN is not specified, Storage Gateway returns a description of all virtual tapes found in the VTS associated with your account.

See also: AWS API Documentation

Request Syntax

response = client.describe_tape_archives(
    TapeARNs=[
        'string',
    ],
    Marker='string',
    Limit=123
)
Parameters
  • TapeARNs (list) --

    Specifies one or more unique Amazon Resource Names (ARNs) that represent the virtual tapes you want to describe.

    • (string) --
  • Marker (string) -- An opaque string that indicates the position at which to begin describing virtual tapes.
  • Limit (integer) -- Specifies that the number of virtual tapes described be limited to the specified number.
Return type

dict

Returns

Response Syntax

{
    'TapeArchives': [
        {
            'TapeARN': 'string',
            'TapeBarcode': 'string',
            'TapeCreatedDate': datetime(2015, 1, 1),
            'TapeSizeInBytes': 123,
            'CompletionTime': datetime(2015, 1, 1),
            'RetrievedTo': 'string',
            'TapeStatus': 'string',
            'TapeUsedInBytes': 123,
            'KMSKey': 'string',
            'PoolId': 'string',
            'Worm': True|False,
            'RetentionStartDate': datetime(2015, 1, 1),
            'PoolEntryDate': datetime(2015, 1, 1)
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    DescribeTapeArchivesOutput

    • TapeArchives (list) --

      An array of virtual tape objects in the virtual tape shelf (VTS). The description includes of the Amazon Resource Name (ARN) of the virtual tapes. The information returned includes the Amazon Resource Names (ARNs) of the tapes, size of the tapes, status of the tapes, progress of the description, and tape barcode.

      • (dict) --

        Represents a virtual tape that is archived in the virtual tape shelf (VTS).

        • TapeARN (string) --

          The Amazon Resource Name (ARN) of an archived virtual tape.

        • TapeBarcode (string) --

          The barcode that identifies the archived virtual tape.

        • TapeCreatedDate (datetime) --

          The date the virtual tape was created.

        • TapeSizeInBytes (integer) --

          The size, in bytes, of the archived virtual tape.

        • CompletionTime (datetime) --

          The time that the archiving of the virtual tape was completed.

          The default timestamp format is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z' format.

        • RetrievedTo (string) --

          The Amazon Resource Name (ARN) of the tape gateway that the virtual tape is being retrieved to.

          The virtual tape is retrieved from the virtual tape shelf (VTS).

        • TapeStatus (string) --

          The current state of the archived virtual tape.

        • TapeUsedInBytes (integer) --

          The size, in bytes, of data stored on the virtual tape.

          Note

          This value is not available for tapes created prior to May 13, 2015.

        • KMSKey (string) --

          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.

        • PoolId (string) --

          The ID of the pool that was used to archive the tape. The tapes in this pool are archived in the S3 storage class that is associated with the pool.

        • Worm (boolean) --

          Set to true if the archived tape is stored as write-once-read-many (WORM).

        • RetentionStartDate (datetime) --

          If the archived tape is subject to tape retention lock, the date that the archived tape started being retained.

        • PoolEntryDate (datetime) --

          The time that the tape entered the custom tape pool.

          The default timestamp format is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z' format.

    • Marker (string) --

      An opaque string that indicates the position at which the virtual tapes that were fetched for description ended. Use this marker in your next request to fetch the next set of virtual tapes in the virtual tape shelf (VTS). If there are no more virtual tapes to describe, this field does not appear in the response.

Exceptions

  • StorageGateway.Client.exceptions.InvalidGatewayRequestException
  • StorageGateway.Client.exceptions.InternalServerError

Examples

Returns a description of specified virtual tapes in the virtual tape shelf (VTS).

response = client.describe_tape_archives(
    Limit=123,
    Marker='1',
    TapeARNs=[
        'arn:aws:storagegateway:us-east-1:999999999999:tape/AM08A1AD',
        'arn:aws:storagegateway:us-east-1:999999999999:tape/AMZN01A2A4',
    ],
)

print(response)

Expected Output:

{
    'Marker': '1',
    'TapeArchives': [
        {
            'CompletionTime': datetime(2016, 12, 16, 13, 50, 0, 4, 351, 0),
            'TapeARN': 'arn:aws:storagegateway:us-east-1:999999999:tape/AM08A1AD',
            'TapeBarcode': 'AM08A1AD',
            'TapeSizeInBytes': 107374182400,
            'TapeStatus': 'ARCHIVED',
        },
        {
            'CompletionTime': datetime(2016, 12, 16, 13, 59, 0, 4, 351, 0),
            'TapeARN': 'arn:aws:storagegateway:us-east-1:999999999:tape/AMZN01A2A4',
            'TapeBarcode': 'AMZN01A2A4',
            'TapeSizeInBytes': 429496729600,
            'TapeStatus': 'ARCHIVED',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}