AWS Storage Gateway

2017/03/30 - AWS Storage Gateway - 1 new 3 updated api methods

Changes  File gateway mode in AWS Storage gateway provides access to objects in S3 as files on a Network File System (NFS) mount point. Once a file share is created, any changes made externally to the S3 bucket will not be reflected by the gateway. Using the cache refresh feature in this update, the customer can trigger an on-demand scan of the keys in their S3 bucket and refresh the file namespace cached on the gateway. It takes as an input the fileShare ARN and refreshes the cache for only that file share. Additionally there is new functionality on file gateway that allows you configure what squash options they would like on their file share, this allows a customer to configure their gateway to not squash root permissions. This can be done by setting options in NfsOptions for CreateNfsFileShare and UpdateNfsFileShare APIs.

RefreshCache (new) Link ¶

Refreshes the cache for the specified file share. This operation finds objects in the Amazon S3 bucket that were added or removed since the gateway last listed the bucket's contents and cached the results.

See also: AWS API Documentation

Request Syntax

client.refresh_cache(
    FileShareARN='string'
)
type FileShareARN

string

param FileShareARN

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    • FileShareARN (string) --

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

CreateNFSFileShare (updated) Link ¶
Changes (request)
{'ReadOnly': 'boolean', 'Squash': 'string'}

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. This operation is only supported in file gateways.

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',
    ClientList=[
        'string',
    ],
    Squash='string',
    ReadOnly=True|False
)
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.

type ClientList

list

param ClientList

The list of clients that are allowed to access the file gateway. The list must contain either valid IP addresses or valid CIDR blocks.

  • (string) --

type Squash

string

param Squash

Maps a user to anonymous user. Valid options: "RootSquash" - Only root is mapped to anonymous user, "NoSquash" - No one is mapped to anonymous user or "AllSquash" - Everyone is mapped to anonymous user.

type ReadOnly

boolean

param ReadOnly

Sets the write status of a file share. "true", if the write status is read-only; otherwise "false.

rtype

dict

returns

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    CreateNFSFileShareOutput

    • FileShareARN (string) --

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

DescribeNFSFileShares (updated) Link ¶
Changes (response)
{'NFSFileShareInfoList': {'ReadOnly': 'boolean', 'Squash': 'string'}}

Gets a description for one or more file shares from a file gateway. This operation is only supported in file gateways.

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',
            'ClientList': [
                'string',
            ],
            'Squash': 'string',
            'ReadOnly': True|False
        },
    ]
}

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. This operation is only supported in file gateways.

        • 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. This operation is only supported in file gateways.

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

        • ClientList (list) --

          The list of clients that are allowed to access the file gateway. The list must contain either valid IP addresses or valid CIDR blocks.

          • (string) --

        • Squash (string) --

          Indicates the user mapped to anonymous user. Valid options: "RootSquash" - Only root is mapped to anonymous user, "NoSquash" - No one is mapped to anonymous user or "AllSquash" - Everyone is mapped to anonymous user.

        • ReadOnly (boolean) --

          Indicates whether the write status of a file share is read-only. "true", if write status is read-only; otherwise "false".

UpdateNFSFileShare (updated) Link ¶
Changes (request)
{'ReadOnly': 'boolean', 'Squash': 'string'}

Updates a file share. This operation is only supported in file gateways.

Note

To leave a file share field unchanged, set the corresponding input field to null.

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',
    ClientList=[
        'string',
    ],
    Squash='string',
    ReadOnly=True|False
)
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.

type ClientList

list

param ClientList

The list of clients that are allowed to access the file gateway. The list must contain either valid IP addresses or valid CIDR blocks.

  • (string) --

type Squash

string

param Squash

Indicates the user mapped to anonymous user. Valid options: "RootSquash" - Only root is mapped to anonymous user, "NoSquash" - No one is mapped to anonymous user or "AllSquash" - Everyone is mapped to anonymous user.

type ReadOnly

boolean

param ReadOnly

Sets the write status of a file share. "true", if the write status is read-only; otherwise "false.

rtype

dict

returns

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    UpdateNFSFileShareOutput

    • FileShareARN (string) --

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