AWS Storage Gateway

2019/04/24 - AWS Storage Gateway - 3 updated api methods

Changes  AWS Storage Gateway now supports Access Control Lists (ACLs) on File Gateway SMB shares, enabling you to apply fine grained access controls for Active Directory users and groups.

CreateSMBFileShare (updated) Link ¶
Changes (request)
{'SMBACLEnabled': 'boolean'}

Creates a Server Message Block (SMB) 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 expose file shares using a SMB interface. This operation is only supported for file gateways.

Warning

File gateways require AWS Security Token Service (AWS STS) to be activated to enable you to create a file share. Make sure that AWS STS is activated in the AWS Region you are creating your file gateway in. If AWS STS is not activated in this AWS 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 gateways don't support creating hard or symbolic links on a file share.

See also: AWS API Documentation

Request Syntax

client.create_smb_file_share(
    ClientToken='string',
    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',
    ReadOnly=True|False,
    GuessMIMETypeEnabled=True|False,
    RequesterPays=True|False,
    SMBACLEnabled=True|False,
    ValidUserList=[
        'string',
    ],
    InvalidUserList=[
        'string',
    ],
    Authentication='string',
    Tags=[
        {
            'Key': 'string',
            'Value': '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 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 Amazon Resource Name (ARN) of the AWS 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 the file gateway. Possible values are S3_STANDARD , S3_STANDARD_IA , or S3_ONEZONE_IA . If this field is not populated, the default value S3_STANDARD is used. Optional.

type ObjectACL

string

param ObjectACL

A value that 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 ReadOnly

boolean

param ReadOnly

A value that 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

A value that 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

A value that sets who pays the cost of the request and the cost associated with data download from the S3 bucket. If this value is set to true, the requester pays the costs. Otherwise the S3 bucket owner pays. However, the S3 bucket owner always pays the cost of storing data.

Note

RequesterPays is a configuration for the S3 bucket that backs the file share, so make sure that the configuration on the file share is the same as the S3 bucket configuration.

type SMBACLEnabled

boolean

param SMBACLEnabled

Set this value to "true to enable ACL (access control list) on the SMB file share. Set it to "false" to map file and directory permissions to the POSIX permissions.

type ValidUserList

list

param ValidUserList

A list of users or groups in the Active Directory that are allowed to access the file share. A group must be prefixed with the @ character. For example @group1 . Can only be set if Authentication is set to ActiveDirectory .

  • (string) --

type InvalidUserList

list

param InvalidUserList

A list of users or groups in the Active Directory that are not allowed to access the file share. A group must be prefixed with the @ character. For example @group1 . Can only be set if Authentication is set to ActiveDirectory .

  • (string) --

type Authentication

string

param Authentication

The authentication method that users use to access the file share.

Valid values are ActiveDirectory or GuestAccess . The default is ActiveDirectory .

type Tags

list

param Tags

A list of up to 50 tags that can be assigned to the NFS file share. Each tag is a key-value pair.

Note

Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256.

  • (dict) --

    A key-value pair that helps you manage, filter, and search for your resource. Allowed characters: letters, white space, and numbers, representable in UTF-8, and the following characters: + - = . _ : /

    • Key (string) -- [REQUIRED]

      Tag key (String). The key can't start with aws:.

    • Value (string) -- [REQUIRED]

      Value of the tag key.

rtype

dict

returns

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    CreateSMBFileShareOutput

    • FileShareARN (string) --

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

DescribeSMBFileShares (updated) Link ¶
Changes (response)
{'SMBFileShareInfoList': {'SMBACLEnabled': 'boolean'}}

Gets a description for one or more Server Message Block (SMB) file shares from a file gateway. This operation is only supported for file gateways.

See also: AWS API Documentation

Request Syntax

client.describe_smb_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

{
    'SMBFileShareInfoList': [
        {
            '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',
            'ReadOnly': True|False,
            'GuessMIMETypeEnabled': True|False,
            'RequesterPays': True|False,
            'SMBACLEnabled': True|False,
            'ValidUserList': [
                'string',
            ],
            'InvalidUserList': [
                'string',
            ],
            'Authentication': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    DescribeSMBFileSharesOutput

    • SMBFileShareInfoList (list) --

      An array containing a description for each requested file share.

      • (dict) --

        The Windows 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 for file gateways.

        • 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 AWS KMS key, or false to use a key managed by Amazon S3. Optional.

        • KMSKey (string) --

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

        • Path (string) --

          The file share path used by the SMB 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 the file gateway. Possible values are S3_STANDARD , S3_STANDARD_IA , or S3_ONEZONE_IA . If this field is not populated, the default value S3_STANDARD is used. Optional.

        • ObjectACL (string) --

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

        • ReadOnly (boolean) --

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

        • GuessMIMETypeEnabled (boolean) --

          A value that 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) --

          A value that sets who pays the cost of the request and the cost associated with data download from the S3 bucket. If this value is set to true, the requester pays the costs. Otherwise the S3 bucket owner pays. However, the S3 bucket owner always pays the cost of storing data.

          Note

          RequesterPays is a configuration for the S3 bucket that backs the file share, so make sure that the configuration on the file share is the same as the S3 bucket configuration.

        • SMBACLEnabled (boolean) --

          If this value is set to "true", indicates that ACL (access control list) is enabled on the SMB file share. If it is set to "false", it indicates that file and directory permissions are mapped to the POSIX permission.

        • ValidUserList (list) --

          A list of users or groups in the Active Directory that are allowed to access the file share. A group must be prefixed with the @ character. For example @group1 . Can only be set if Authentication is set to ActiveDirectory .

          • (string) --

        • InvalidUserList (list) --

          A list of users or groups in the Active Directory that are not allowed to access the file share. A group must be prefixed with the @ character. For example @group1 . Can only be set if Authentication is set to ActiveDirectory .

          • (string) --

        • Authentication (string) --

          The authentication method of the file share.

          Valid values are ActiveDirectory or GuestAccess . The default is ActiveDirectory .

        • Tags (list) --

          A list of up to 50 tags assigned to the SMB file share, sorted alphabetically by key name. Each tag is a key-value pair. For a gateway with more than 10 tags assigned, you can view all tags using the ListTagsForResource API operation.

          • (dict) --

            A key-value pair that helps you manage, filter, and search for your resource. Allowed characters: letters, white space, and numbers, representable in UTF-8, and the following characters: + - = . _ : /

            • Key (string) --

              Tag key (String). The key can't start with aws:.

            • Value (string) --

              Value of the tag key.

UpdateSMBFileShare (updated) Link ¶
Changes (request)
{'SMBACLEnabled': 'boolean'}

Updates a Server Message Block (SMB) file share.

Note

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

Warning

File gateways require AWS Security Token Service (AWS STS) to be activated to enable you to create a file share. Make sure that AWS STS is activated in the AWS Region you are creating your file gateway in. If AWS STS is not activated in this AWS 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 gateways don't support creating hard or symbolic links on a file share.

See also: AWS API Documentation

Request Syntax

client.update_smb_file_share(
    FileShareARN='string',
    KMSEncrypted=True|False,
    KMSKey='string',
    DefaultStorageClass='string',
    ObjectACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'bucket-owner-read'|'bucket-owner-full-control'|'aws-exec-read',
    ReadOnly=True|False,
    GuessMIMETypeEnabled=True|False,
    RequesterPays=True|False,
    SMBACLEnabled=True|False,
    ValidUserList=[
        'string',
    ],
    InvalidUserList=[
        'string',
    ]
)
type FileShareARN

string

param FileShareARN

[REQUIRED]

The Amazon Resource Name (ARN) of the SMB file share that you want to update.

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

type DefaultStorageClass

string

param DefaultStorageClass

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

type ObjectACL

string

param ObjectACL

A value that 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 ReadOnly

boolean

param ReadOnly

A value that 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

A value that 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

A value that sets who pays the cost of the request and the cost associated with data download from the S3 bucket. If this value is set to true, the requester pays the costs. Otherwise the S3 bucket owner pays. However, the S3 bucket owner always pays the cost of storing data.

Note

RequesterPays is a configuration for the S3 bucket that backs the file share, so make sure that the configuration on the file share is the same as the S3 bucket configuration.

type SMBACLEnabled

boolean

param SMBACLEnabled

Set this value to "true to enable ACL (access control list) on the SMB file share. Set it to "false" to map file and directory permissions to the POSIX permissions.

type ValidUserList

list

param ValidUserList

A list of users or groups in the Active Directory that are allowed to access the file share. A group must be prefixed with the @ character. For example @group1 . Can only be set if Authentication is set to ActiveDirectory .

  • (string) --

type InvalidUserList

list

param InvalidUserList

A list of users or groups in the Active Directory that are not allowed to access the file share. A group must be prefixed with the @ character. For example @group1 . Can only be set if Authentication is set to ActiveDirectory .

  • (string) --

rtype

dict

returns

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    UpdateSMBFileShareOutput

    • FileShareARN (string) --

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