AWS Storage Gateway

2016/12/20 - AWS Storage Gateway - 5 new5 updated api methods

Changes  Update storagegateway client to latest version

ListFileShares (new) Link ¶

Gets a list of the file shares for a specific file gateway, or the list of file shares that belong to the calling user account.

See also: AWS API Documentation

Request Syntax

client.list_file_shares(
    GatewayARN='string',
    Limit=123,
    Marker='string'
)
type GatewayARN:

string

param GatewayARN:

The Amazon resource Name (ARN) of the gateway whose file shares you want to list. If this field is not present, all file shares under your account are listed.

type Limit:

integer

param Limit:

The maximum number of file shares to return in the response. The value must be an integer with a value greater than zero. Optional.

type Marker:

string

param Marker:

Opaque pagination token returned from a previous ListFileShares operation. If present, Marker specifies where to continue the list from after a previous call to ListFileShares. Optional.

rtype:

dict

returns:

Response Syntax

{
    'Marker': 'string',
    'NextMarker': 'string',
    'FileShareInfoList': [
        {
            'FileShareARN': 'string',
            'FileShareId': 'string',
            'FileShareStatus': 'string',
            'GatewayARN': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    ListFileShareOutput

    • Marker (string) --

      If the request includes Marker, the response returns that value in this field.

    • NextMarker (string) --

      If a value is present, there are more file shares to return. In a subsequent request, use NextMarker as the value for Marker to retrieve the next set of file shares.

    • FileShareInfoList (list) --

      An array of information about the file gateway's file shares.

      • (dict) --

        Describes a file share.

        • FileShareARN (string) --

          The Amazon Resource Name (ARN) of the file share.

        • FileShareId (string) --

          The ID of the file share.

        • FileShareStatus (string) --

          The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE and DELETING.

        • GatewayARN (string) --

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

DescribeNFSFileShares (new) Link ¶

Gets a description for one or more file shares from a file gateway.

See also: AWS API Documentation

Request Syntax

client.describe_nfs_file_shares(
    FileShareARNList=[
        'string',
    ]
)
type FileShareARNList:

list

param FileShareARNList:

[REQUIRED]

An array containing the Amazon Resource Name (ARN) of each file share to be described.

  • (string) --

    The Amazon Resource Name (ARN) of the file share.

rtype:

dict

returns:

Response Syntax

{
    'NFSFileShareInfoList': [
        {
            'NFSFileShareDefaults': {
                'FileMode': 'string',
                'DirectoryMode': 'string',
                'GroupId': 123,
                'OwnerId': 123
            },
            'FileShareARN': 'string',
            'FileShareId': 'string',
            'FileShareStatus': 'string',
            'GatewayARN': 'string',
            'KMSEncrypted': True|False,
            'KMSKey': 'string',
            'Path': 'string',
            'Role': 'string',
            'LocationARN': 'string',
            'DefaultStorageClass': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    DescribeNFSFileSharesOutput

    • NFSFileShareInfoList (list) --

      An array containing a description for each requested file share.

      • (dict) --

        The Unix file permissions and ownership information assigned, by default, to native S3 objects when Storage Gateway discovers them in S3 buckets.

        • NFSFileShareDefaults (dict) --

          Describes file share default values. Files and folders stored as Amazon S3 objects in S3 buckets don't, by default, have Unix file permissions assigned to them. Upon discovery in an S3 bucket by Storage Gateway, the S3 objects that represent files and folders are assigned these default Unix permissions.

          • FileMode (string) --

            The Unix file mode in the form "nnnn". For example, "0666" represents the default file mode inside the file share. The default value is 0666.

          • DirectoryMode (string) --

            The Unix directory mode in the form "nnnn". For example, "0666" represents the default access mode for all directories inside the file share. The default value is 0777.

          • GroupId (integer) --

            The default group ID for the file share (unless the files have another group ID specified). The default value is nfsnobody.

          • OwnerId (integer) --

            The default owner ID for files in the file share (unless the files have another owner ID specified). The default value is nfsnobody.

        • FileShareARN (string) --

          The Amazon Resource Name (ARN) of the file share.

        • FileShareId (string) --

          The ID of the file share.

        • FileShareStatus (string) --

          The status of the file share. Possible values are CREATING, UPDATING, AVAILABLE and DELETING.

        • GatewayARN (string) --

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

        • KMSEncrypted (boolean) --

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

        • KMSKey (string) --

          The ARN of the KMS key used for Amazon S3 server side encryption.

        • Path (string) --

          The file share path used by the NFS client to identify the mount point.

        • Role (string) --

          The ARN of the IAM role that file gateway assumes when it accesses the underlying storage.

        • LocationARN (string) --

          The ARN of the backend storage used for storing file data.

        • DefaultStorageClass (string) --

          The default storage class for objects put into an Amazon S3 bucket by file gateway. Possible values are S3_STANDARD or S3_STANDARD_IA. If this field is not populated, the default value S3_STANDARD is used. Optional.

DeleteFileShare (new) Link ¶

Deletes a file share from a file gateway.

See also: AWS API Documentation

Request Syntax

client.delete_file_share(
    FileShareARN='string'
)
type FileShareARN:

string

param FileShareARN:

[REQUIRED]

The Amazon Resource Name (ARN) of the file share to be deleted.

rtype:

dict

returns:

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    DeleteFileShareOutput

    • FileShareARN (string) --

      The Amazon Resource Name (ARN) of the deleted file share.

UpdateNFSFileShare (new) Link ¶

Updates a file share.

See also: AWS API Documentation

Request Syntax

client.update_nfs_file_share(
    FileShareARN='string',
    KMSEncrypted=True|False,
    KMSKey='string',
    NFSFileShareDefaults={
        'FileMode': 'string',
        'DirectoryMode': 'string',
        'GroupId': 123,
        'OwnerId': 123
    },
    DefaultStorageClass='string'
)
type FileShareARN:

string

param FileShareARN:

[REQUIRED]

The Amazon Resource Name (ARN) of the file share to be updated.

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

type NFSFileShareDefaults:

dict

param NFSFileShareDefaults:

The default values for the file share. Optional.

  • FileMode (string) --

    The Unix file mode in the form "nnnn". For example, "0666" represents the default file mode inside the file share. The default value is 0666.

  • DirectoryMode (string) --

    The Unix directory mode in the form "nnnn". For example, "0666" represents the default access mode for all directories inside the file share. The default value is 0777.

  • GroupId (integer) --

    The default group ID for the file share (unless the files have another group ID specified). The default value is nfsnobody.

  • OwnerId (integer) --

    The default owner ID for files in the file share (unless the files have another owner ID specified). The default value is nfsnobody.

type DefaultStorageClass:

string

param DefaultStorageClass:

The default storage class for objects put into an Amazon S3 bucket by a file gateway. Possible values are S3_STANDARD or S3_STANDARD_IA. If this field is not populated, the default value S3_STANDARD is used. Optional.

rtype:

dict

returns:

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    UpdateNFSFileShareOutput

    • FileShareARN (string) --

      The Amazon Resource Name (ARN) of the updated file share.

CreateNFSFileShare (new) Link ¶

Creates a file share on an existing file gateway. In Storage Gateway, a file share is a file system mount point backed by Amazon S3 cloud storage. Storage Gateway exposes file shares using a Network File System (NFS) interface.

See also: AWS API Documentation

Request Syntax

client.create_nfs_file_share(
    ClientToken='string',
    NFSFileShareDefaults={
        'FileMode': 'string',
        'DirectoryMode': 'string',
        'GroupId': 123,
        'OwnerId': 123
    },
    GatewayARN='string',
    KMSEncrypted=True|False,
    KMSKey='string',
    Role='string',
    LocationARN='string',
    DefaultStorageClass='string'
)
type ClientToken:

string

param ClientToken:

[REQUIRED]

A unique string value that you supply that is used by file gateway to ensure idempotent file share creation.

type NFSFileShareDefaults:

dict

param NFSFileShareDefaults:

File share default values. Optional.

  • FileMode (string) --

    The Unix file mode in the form "nnnn". For example, "0666" represents the default file mode inside the file share. The default value is 0666.

  • DirectoryMode (string) --

    The Unix directory mode in the form "nnnn". For example, "0666" represents the default access mode for all directories inside the file share. The default value is 0777.

  • GroupId (integer) --

    The default group ID for the file share (unless the files have another group ID specified). The default value is nfsnobody.

  • OwnerId (integer) --

    The default owner ID for files in the file share (unless the files have another owner ID specified). The default value is nfsnobody.

type GatewayARN:

string

param GatewayARN:

[REQUIRED]

The Amazon Resource Name (ARN) of the file gateway on which you want to create a file share.

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

type Role:

string

param Role:

[REQUIRED]

The ARN of the AWS Identity and Access Management (IAM) role that a file gateway assumes when it accesses the underlying storage.

type LocationARN:

string

param LocationARN:

[REQUIRED]

The ARN of the backend storage used for storing file data.

type DefaultStorageClass:

string

param DefaultStorageClass:

The default storage class for objects put into an Amazon S3 bucket by file gateway. Possible values are S3_STANDARD or S3_STANDARD_IA. If this field is not populated, the default value S3_STANDARD is used. Optional.

rtype:

dict

returns:

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    CreateNFSFileShareOutput

    • FileShareARN (string) --

      The Amazon Resource Name (ARN) of the newly created file share.

CreateCachediSCSIVolume (updated) Link ¶
Changes (request)
{'SourceVolumeARN': 'string'}

Creates a cached volume on a specified cached gateway. This operation is supported only for the gateway-cached volume architecture.

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, AWS Storage 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'
)
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]

rtype:

dict

returns:

Response Syntax

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

Response Structure

  • (dict) --

    • VolumeARN (string) --

    • TargetARN (string) --

DescribeCachediSCSIVolumes (updated) Link ¶
Changes (response)
{'CachediSCSIVolumes': {'CreatedDate': 'timestamp'}}

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

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)
        },
    ]
}

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 of the volume in bytes.

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

DescribeStorediSCSIVolumes (updated) Link ¶
Changes (response)
{'StorediSCSIVolumes': {'CreatedDate': 'timestamp'}}

Returns the description of the gateway volumes specified in the request. 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 ARNs.

See also: AWS API Documentation

Request Syntax

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

list

param VolumeARNs:

[REQUIRED]

An array of strings where each string represents the Amazon Resource Name (ARN) of a stored volume. All of the specified stored volumes must from the same gateway. Use ListVolumes to get volume ARNs for a gateway.

  • (string) --

rtype:

dict

returns:

Response Syntax

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

Response Structure

  • (dict) --

    • StorediSCSIVolumes (list) --

      • (dict) --

        Describes an iSCSI stored 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 describing the type of the volume.

        • VolumeStatus (string) --

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

        • VolumeSizeInBytes (integer) --

          The size of the volume in bytes.

        • 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 stored volume is not restoring or bootstrapping.

        • VolumeDiskId (string) --

          The ID of the local disk that was specified in the CreateStorediSCSIVolume operation.

        • SourceSnapshotId (string) --

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

        • PreservedExistingData (boolean) --

          Indicates if when the stored volume was created, existing data on the underlying local disk was preserved.

          Valid Values: true, false

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

DescribeTapeArchives (updated) Link ¶
Changes (response)
{'TapeArchives': {'TapeCreatedDate': 'timestamp'}}

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

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'
        },
    ],
    '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) --

        • 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 string format of the completion time is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z' format.

        • RetrievedTo (string) --

          The Amazon Resource Name (ARN) of the gateway-VTL 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.

    • 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': {'TapeCreatedDate': 'timestamp'}}

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.

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, AWS Storage 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.

rtype:

dict

returns:

Response Syntax

{
    'Tapes': [
        {
            'TapeARN': 'string',
            'TapeBarcode': 'string',
            'TapeCreatedDate': datetime(2015, 1, 1),
            'TapeSizeInBytes': 123,
            'TapeStatus': 'string',
            'VTLDevice': 'string',
            'Progress': 123.0
        },
    ],
    '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) --

        • TapeSizeInBytes (integer) --

          The size, in bytes, of the virtual tape.

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

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