AWS Storage Gateway

2017/02/10 - AWS Storage Gateway - 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. This is done by creating Nfs file shares using existing APIs CreateNfsFileShare. Using the feature in this update, the customer can restrict the clients that have read/write access to the gateway by specifying the list of clients as a list of IP addresses or CIDR blocks. This list can be specified using the API CreateNfsFileShare while creating new file shares, or UpdateNfsFileShare while update existing file shares. To find out the list of clients that have access, the existing API DescribeNfsFileShare will now output the list of clients that have access.

CreateNFSFileShare (updated) Link ¶
Changes (request)
{'ClientList': ['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.

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

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': {'ClientList': ['string']}}

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',
            'ClientList': [
                '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.

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

UpdateNFSFileShare (updated) Link ¶
Changes (request)
{'ClientList': ['string']}

Updates a file share.

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

rtype

dict

returns

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    UpdateNFSFileShareOutput

    • FileShareARN (string) --

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