AWS Storage Gateway

2018/03/01 - AWS Storage Gateway - 3 updated api methods

Changes  AWS Storage Gateway (File) support for two new file share attributes are added. 1. Users can specify the S3 Canned ACL to use for new objects created in the file share. 2. Users can create file shares for requester-pays buckets.

CreateNFSFileShare (updated) Link ¶
Changes (request)
{'ObjectACL': 'private | public-read | public-read-write | authenticated-read '
              '| bucket-owner-read | bucket-owner-full-control | aws-exec-read',
 'RequesterPays': 'boolean'}

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 the file gateway type.

Warning

File gateway requires AWS Security Token Service (AWS STS) to be activated to enable you create a file share. Make sure AWS STS is activated in the region you are creating your file gateway in. If AWS STS is not activated in the region, activate it. For information about how to activate AWS STS, see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity and Access Management User Guide.

File gateway does not support creating hard or symbolic links on a file share.

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',
    ObjectACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'bucket-owner-read'|'bucket-owner-full-control'|'aws-exec-read',
    ClientList=[
        'string',
    ],
    Squash='string',
    ReadOnly=True|False,
    GuessMIMETypeEnabled=True|False,
    RequesterPays=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 backed 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 ObjectACL

string

param ObjectACL

Sets the access control list permission for objects in the Amazon S3 bucket that a file gateway puts objects into. The default value is "private".

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 are the following:

  • "RootSquash" - Only root is mapped to anonymous user.

  • "NoSquash" - No one is mapped to anonymous user.

  • "AllSquash" - Everyone is mapped to anonymous user.

type ReadOnly

boolean

param ReadOnly

Sets the write status of a file share. This value is true if the write status is read-only, and otherwise false.

type GuessMIMETypeEnabled

boolean

param GuessMIMETypeEnabled

Enables guessing of the MIME type for uploaded objects based on file extensions. Set this value to true to enable MIME type guessing, and otherwise to false. The default value is true.

type RequesterPays

boolean

param RequesterPays

Sets who pays the cost of the request and the data download from the Amazon S3 bucket. Set this value to true if you want the requester to pay instead of the bucket owner, and otherwise to 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': {'ObjectACL': 'private | public-read | '
                                       'public-read-write | authenticated-read '
                                       '| bucket-owner-read | '
                                       'bucket-owner-full-control | '
                                       'aws-exec-read',
                          'RequesterPays': 'boolean'}}

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

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',
            'ObjectACL': 'private'|'public-read'|'public-read-write'|'authenticated-read'|'bucket-owner-read'|'bucket-owner-full-control'|'aws-exec-read',
            'ClientList': [
                'string',
            ],
            'Squash': 'string',
            'ReadOnly': True|False,
            'GuessMIMETypeEnabled': True|False,
            'RequesterPays': 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 file 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 the file gateway type.

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

        • ObjectACL (string) --

          Sets the access control list permission for objects in the S3 bucket that a file gateway puts objects into. The default value is "private".

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

          The user mapped to anonymous user. Valid options are the following:

          • "RootSquash" - Only root is mapped to anonymous user.

          • "NoSquash" - No one is mapped to anonymous user

          • "AllSquash" - Everyone is mapped to anonymous user.

        • ReadOnly (boolean) --

          Sets the write status of a file share. This value is true if the write status is read-only, and otherwise false.

        • GuessMIMETypeEnabled (boolean) --

          Enables guessing of the MIME type for uploaded objects based on file extensions. Set this value to true to enable MIME type guessing, and otherwise to false. The default value is true.

        • RequesterPays (boolean) --

          Sets who pays the cost of the request and the data download from the Amazon S3 bucket. Set this value to true if you want the requester to pay instead of the bucket owner, and otherwise to false.

UpdateNFSFileShare (updated) Link ¶
Changes (request)
{'ObjectACL': 'private | public-read | public-read-write | authenticated-read '
              '| bucket-owner-read | bucket-owner-full-control | aws-exec-read',
 'RequesterPays': 'boolean'}

Updates a file share. This operation is only supported in the file gateway type.

Note

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

Updates the following file share setting:

  • Default storage class for your S3 bucket

  • Metadata defaults for your S3 bucket

  • Allowed NFS clients for your file share

  • Squash settings

  • Write status of your file share

Note

To leave a file share field unchanged, set the corresponding input field to null. This operation is only supported in file gateways.

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',
    ObjectACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'bucket-owner-read'|'bucket-owner-full-control'|'aws-exec-read',
    ClientList=[
        'string',
    ],
    Squash='string',
    ReadOnly=True|False,
    GuessMIMETypeEnabled=True|False,
    RequesterPays=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 ObjectACL

string

param ObjectACL

Sets the access control list permission for objects in the S3 bucket that a file gateway puts objects into. The default value is "private".

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

The user mapped to anonymous user. Valid options are the following:

  • "RootSquash" - Only root is mapped to anonymous user.

  • "NoSquash" - No one is mapped to anonymous user

  • "AllSquash" - Everyone is mapped to anonymous user.

type ReadOnly

boolean

param ReadOnly

Sets the write status of a file share. This value is true if the write status is read-only, and otherwise false.

type GuessMIMETypeEnabled

boolean

param GuessMIMETypeEnabled

Enables guessing of the MIME type for uploaded objects based on file extensions. Set this value to true to enable MIME type guessing, and otherwise to false. The default value is true.

type RequesterPays

boolean

param RequesterPays

Sets who pays the cost of the request and the data download from the Amazon S3 bucket. Set this value to true if you want the requester to pay instead of the bucket owner, and otherwise to false.

rtype

dict

returns

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    UpdateNFSFileShareOutput

    • FileShareARN (string) --

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