AWS Storage Gateway

2018/06/11 - AWS Storage Gateway - 6 updated api methods

Changes  AWS Storage Gateway now enables you to create cached volumes and tapes with AWS KMS support.

CreateCachediSCSIVolume (updated) Link ¶
Changes (request)
{'KMSEncrypted': 'boolean', 'KMSKey': 'string'}

Creates a cached volume on a specified cached volume gateway. This operation is only supported in the cached volume gateway type.

Note

Cache storage must be allocated to the gateway before you can create a cached volume. Use the AddCache operation to add cache storage to a gateway.

In the request, you must specify the gateway, size of the volume in bytes, the iSCSI target name, an IP address on which to expose the target, and a unique client token. In response, the gateway creates the volume and returns information about it. This information includes the volume Amazon Resource Name (ARN), its size, and the iSCSI target ARN that initiators can use to connect to the volume target.

Optionally, you can provide the ARN for an existing volume as the SourceVolumeARN for this cached volume, which creates an exact copy of the existing volume’s latest recovery point. The VolumeSizeInBytes value must be equal to or larger than the size of the copied volume, in bytes.

See also: AWS API Documentation

Request Syntax

client.create_cached_iscsi_volume(
    GatewayARN='string',
    VolumeSizeInBytes=123,
    SnapshotId='string',
    TargetName='string',
    SourceVolumeARN='string',
    NetworkInterfaceId='string',
    ClientToken='string',
    KMSEncrypted=True|False,
    KMSKey='string'
)
type GatewayARN

string

param GatewayARN

[REQUIRED]

The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and region.

type VolumeSizeInBytes

integer

param VolumeSizeInBytes

[REQUIRED]

type SnapshotId

string

param SnapshotId

type TargetName

string

param TargetName

[REQUIRED]

type SourceVolumeARN

string

param SourceVolumeARN

The ARN for an existing volume. Specifying this ARN makes the new volume into an exact copy of the specified existing volume's latest recovery point. The VolumeSizeInBytes value for this new volume must be equal to or larger than the size of the existing volume, in bytes.

type NetworkInterfaceId

string

param NetworkInterfaceId

[REQUIRED]

type ClientToken

string

param ClientToken

[REQUIRED]

type KMSEncrypted

boolean

param KMSEncrypted

True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by Amazon S3. Optional.

type KMSKey

string

param KMSKey

The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side encryption. This value can only be set when KMSEncrypted is true. Optional.

rtype

dict

returns

Response Syntax

{
    'VolumeARN': 'string',
    'TargetARN': 'string'
}

Response Structure

  • (dict) --

    • VolumeARN (string) --

    • TargetARN (string) --

CreateTapeWithBarcode (updated) Link ¶
Changes (request)
{'KMSEncrypted': 'boolean', 'KMSKey': 'string'}

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 can not 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.

Note

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.

See also: AWS API Documentation

Request Syntax

client.create_tape_with_barcode(
    GatewayARN='string',
    TapeSizeInBytes=123,
    TapeBarcode='string',
    KMSEncrypted=True|False,
    KMSKey='string'
)
type GatewayARN

string

param GatewayARN

[REQUIRED]

The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tape with. Use the ListGateways operation to return a list of gateways for your account and region.

type TapeSizeInBytes

integer

param TapeSizeInBytes

[REQUIRED]

The size, in bytes, of the virtual tape that you want to create.

Note

The size must be aligned by gigabyte (1024*1024*1024 byte).

type TapeBarcode

string

param TapeBarcode

[REQUIRED]

The barcode that you want to assign to the tape.

Note

Barcodes cannot be reused. This includes barcodes used for tapes that have been deleted.

type KMSEncrypted

boolean

param KMSEncrypted

True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by Amazon S3. Optional.

type KMSKey

string

param KMSKey

The Amazon Resource Name (ARN) of the KMS Key used for Amazon S3 server side encryption. This value can only be set when KMSEncrypted is true. Optional.

rtype

dict

returns

Response Syntax

{
    'TapeARN': 'string'
}

Response Structure

  • (dict) --

    CreateTapeOutput

    • TapeARN (string) --

      A unique Amazon Resource Name (ARN) that represents the virtual tape that was created.

CreateTapes (updated) Link ¶
Changes (request)
{'KMSEncrypted': 'boolean', 'KMSKey': 'string'}

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.

Note

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.

See also: AWS API Documentation

Request Syntax

client.create_tapes(
    GatewayARN='string',
    TapeSizeInBytes=123,
    ClientToken='string',
    NumTapesToCreate=123,
    TapeBarcodePrefix='string',
    KMSEncrypted=True|False,
    KMSKey='string'
)
type GatewayARN

string

param GatewayARN

[REQUIRED]

The unique Amazon Resource Name (ARN) that represents the gateway to associate the virtual tapes with. Use the ListGateways operation to return a list of gateways for your account and region.

type TapeSizeInBytes

integer

param TapeSizeInBytes

[REQUIRED]

The size, in bytes, of the virtual tapes that you want to create.

Note

The size must be aligned by gigabyte (1024*1024*1024 byte).

type ClientToken

string

param ClientToken

[REQUIRED]

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.

Note

Using the same ClientToken prevents creating the tape multiple times.

type NumTapesToCreate

integer

param NumTapesToCreate

[REQUIRED]

The number of virtual tapes that you want to create.

type TapeBarcodePrefix

string

param TapeBarcodePrefix

[REQUIRED]

A prefix that you append to the barcode of the virtual tape you are creating. This prefix makes the barcode unique.

Note

The prefix must be 1 to 4 characters in length and must be one of the uppercase letters from A to Z.

type KMSEncrypted

boolean

param KMSEncrypted

True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by Amazon S3. Optional.

type KMSKey

string

param KMSKey

The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side encryption. This value can only be set when KMSEncrypted is true. Optional.

rtype

dict

returns

Response Syntax

{
    'TapeARNs': [
        'string',
    ]
}

Response Structure

  • (dict) --

    CreateTapeOutput

    • TapeARNs (list) --

      A list of unique Amazon Resource Names (ARNs) that represents the virtual tapes that were created.

      • (string) --

DescribeCachediSCSIVolumes (updated) Link ¶
Changes (response)
{'CachediSCSIVolumes': {'KMSKey': 'string'}}

Returns a description of the gateway volumes specified in the request. This operation is only supported in the cached volume gateway types.

The list of gateway volumes in the request must be from one gateway. In the response Amazon Storage Gateway returns volume information sorted by volume Amazon Resource Name (ARN).

See also: AWS API Documentation

Request Syntax

client.describe_cached_iscsi_volumes(
    VolumeARNs=[
        'string',
    ]
)
type VolumeARNs

list

param VolumeARNs

[REQUIRED]

  • (string) --

rtype

dict

returns

Response Syntax

{
    'CachediSCSIVolumes': [
        {
            'VolumeARN': 'string',
            'VolumeId': 'string',
            'VolumeType': 'string',
            'VolumeStatus': 'string',
            'VolumeSizeInBytes': 123,
            'VolumeProgress': 123.0,
            'SourceSnapshotId': 'string',
            'VolumeiSCSIAttributes': {
                'TargetARN': 'string',
                'NetworkInterfaceId': 'string',
                'NetworkInterfacePort': 123,
                'LunNumber': 123,
                'ChapEnabled': True|False
            },
            'CreatedDate': datetime(2015, 1, 1),
            'VolumeUsedInBytes': 123,
            'KMSKey': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    A JSON object containing the following fields:

    • CachediSCSIVolumes (list) --

      An array of objects where each object contains metadata about one cached volume.

      • (dict) --

        Describes an iSCSI cached volume.

        • VolumeARN (string) --

          The Amazon Resource Name (ARN) of the storage volume.

        • VolumeId (string) --

          The unique identifier of the volume, e.g. vol-AE4B946D.

        • VolumeType (string) --

          One of the VolumeType enumeration values that describes the type of the volume.

        • VolumeStatus (string) --

          One of the VolumeStatus values that indicates the state of the storage volume.

        • VolumeSizeInBytes (integer) --

          The size, in bytes, of the volume capacity.

        • VolumeProgress (float) --

          Represents the percentage complete if the volume is restoring or bootstrapping that represents the percent of data transferred. This field does not appear in the response if the cached volume is not restoring or bootstrapping.

        • SourceSnapshotId (string) --

          If the cached volume was created from a snapshot, this field contains the snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included.

        • VolumeiSCSIAttributes (dict) --

          An VolumeiSCSIAttributes object that represents a collection of iSCSI attributes for one stored volume.

          • TargetARN (string) --

            The Amazon Resource Name (ARN) of the volume target.

          • NetworkInterfaceId (string) --

            The network interface identifier.

          • NetworkInterfacePort (integer) --

            The port used to communicate with iSCSI targets.

          • LunNumber (integer) --

            The logical disk number.

          • ChapEnabled (boolean) --

            Indicates whether mutual CHAP is enabled for the iSCSI target.

        • CreatedDate (datetime) --

          The date the volume was created. Volumes created prior to March 28, 2017 don’t have this time stamp.

        • VolumeUsedInBytes (integer) --

          The size of the data stored on the volume in bytes.

          Note

          This value is not available for volumes created prior to May 13, 2015, until you store data on the volume.

        • KMSKey (string) --

          The Amazon Resource Name (ARN) of the KMS key used for Amazon S3 server side encryption. This value can only be set when KMSEncrypted is true. Optional.

DescribeTapeArchives (updated) Link ¶
Changes (response)
{'TapeArchives': {'KMSKey': 'string'}}

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, AWS Storage Gateway returns a description of all virtual tapes found in the VTS associated with your account.

See also: AWS API Documentation

Request Syntax

client.describe_tape_archives(
    TapeARNs=[
        'string',
    ],
    Marker='string',
    Limit=123
)
type TapeARNs

list

param TapeARNs

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

  • (string) --

type Marker

string

param Marker

An opaque string that indicates the position at which to begin describing virtual tapes.

type Limit

integer

param Limit

Specifies that the number of virtual tapes descried be limited to the specified number.

rtype

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'
        },
    ],
    '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 time stamp 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 the KMS key used for Amazon S3 server side encryption. This value can only be set when KMSEncrypted is true. Optional.

    • 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.

DescribeTapes (updated) Link ¶
Changes (response)
{'Tapes': {'KMSKey': 'string'}}

Returns a description of the specified Amazon Resource Name (ARN) of virtual tapes. If a TapeARN is not specified, returns a description of all virtual tapes associated with the specified gateway. This operation is only supported in the tape gateway type.

See also: AWS API Documentation

Request Syntax

client.describe_tapes(
    GatewayARN='string',
    TapeARNs=[
        'string',
    ],
    Marker='string',
    Limit=123
)
type GatewayARN

string

param GatewayARN

[REQUIRED]

The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and region.

type TapeARNs

list

param TapeARNs

Specifies one or more unique Amazon Resource Names (ARNs) that represent the virtual tapes you want to describe. If this parameter is not specified, Tape gateway returns a description of all virtual tapes associated with the specified gateway.

  • (string) --

type Marker

string

param Marker

A marker value, obtained in a previous call to DescribeTapes . This marker indicates which page of results to retrieve.

If not specified, the first page of results is retrieved.

type Limit

integer

param Limit

Specifies that the number of virtual tapes described be limited to the specified number.

Note

Amazon Web Services may impose its own limit, if this field is not set.

rtype

dict

returns

Response Syntax

{
    'Tapes': [
        {
            'TapeARN': 'string',
            'TapeBarcode': 'string',
            'TapeCreatedDate': datetime(2015, 1, 1),
            'TapeSizeInBytes': 123,
            'TapeStatus': 'string',
            'VTLDevice': 'string',
            'Progress': 123.0,
            'TapeUsedInBytes': 123,
            'KMSKey': 'string'
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    DescribeTapesOutput

    • Tapes (list) --

      An array of virtual tape descriptions.

      • (dict) --

        Describes a virtual tape object.

        • TapeARN (string) --

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

        • TapeBarcode (string) --

          The barcode that identifies a specific virtual tape.

        • TapeCreatedDate (datetime) --

          The date the virtual tape was created.

        • TapeSizeInBytes (integer) --

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

        • TapeStatus (string) --

          The current state of the virtual tape.

        • VTLDevice (string) --

          The virtual tape library (VTL) device that the virtual tape is associated with.

        • Progress (float) --

          For archiving virtual tapes, indicates how much data remains to be uploaded before archiving is complete.

          Range: 0 (not started) to 100 (complete).

        • 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 the KMS key used for Amazon S3 server side encryption. This value can only be set when KMSEncrypted is true. Optional.

    • Marker (string) --

      An opaque string which can be used as part of a subsequent DescribeTapes call to retrieve the next page of results.

      If a response does not contain a marker, then there are no more results to be retrieved.