AWS Storage Gateway

2018/06/28 - AWS Storage Gateway - 6 new 1 updated api methods

Changes  AWS Storage Gateway now enables you to use Server Message Block (SMB) protocol to store and access objects in Amazon Simple Storage Service (S3).

UpdateSMBFileShare (new) Link ¶

Updates a Server Message Block (SMB) 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. 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.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,
    ValidUserList=[
        'string',
    ],
    InvalidUserList=[
        'string',
    ]
)
type FileShareARN

string

param FileShareARN

[REQUIRED]

The Amazon Resource Name (ARN) of the SMB file share 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) 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 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

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

type ValidUserList

list

param ValidUserList

A list of users in the Active Directory that are allowed to access the file share. Can only be set if Authentication is set to "ActiveDirectory".

  • (string) --

type InvalidUserList

list

param InvalidUserList

A list of users in the Active Directory that are not allowed to access the file share. 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.

DescribeSMBSettings (new) Link ¶

Gets a description of a Server Message Block (SMB) file share settings from a file gateway. This operation is only supported in the file gateway type.

See also: AWS API Documentation

Request Syntax

client.describe_smb_settings(
    GatewayARN='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.

rtype

dict

returns

Response Syntax

{
    'GatewayARN': 'string',
    'DomainName': 'string',
    'SMBGuestPasswordSet': True|False
}

Response Structure

  • (dict) --

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

    • DomainName (string) --

      The name of the domain that the gateway is joined to.

    • SMBGuestPasswordSet (boolean) --

      This value is true if a password for the guest user “smbguest” is set, and otherwise false.

CreateSMBFileShare (new) Link ¶

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 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_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,
    ValidUserList=[
        'string',
    ],
    InvalidUserList=[
        'string',
    ],
    Authentication='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) 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, 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

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

type ValidUserList

list

param ValidUserList

A list of users in the Active Directory that are allowed to access the file share. Can only be set if Authentication is set to "ActiveDirectory".

  • (string) --

type InvalidUserList

list

param InvalidUserList

A list of users in the Active Directory that are not allowed to access the file share. 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: "ActiveDirectory" or "GuestAccess". The default is "ActiveDirectory".

rtype

dict

returns

Response Syntax

{
    'FileShareARN': 'string'
}

Response Structure

  • (dict) --

    CreateSMBFileShareOutput

    • FileShareARN (string) --

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

SetSMBGuestPassword (new) Link ¶

Sets the password for the guest user “smbguest”. "smbguest" is the user when the Authentication method for the file share is “GuestAccess”.

See also: AWS API Documentation

Request Syntax

client.set_smb_guest_password(
    GatewayARN='string',
    Password='string'
)
type GatewayARN

string

param GatewayARN

[REQUIRED]

The Amazon Resource Name (ARN) of the file gateway the SMB file share is associated with.

type Password

string

param Password

[REQUIRED]

The password you want to set for your SMB Server.

rtype

dict

returns

Response Syntax

{
    'GatewayARN': 'string'
}

Response Structure

  • (dict) --

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

JoinDomain (new) Link ¶

Adds a file gateway to an Active Directory domain. This operation is only supported in the file gateway type that supports the SMB file protocol.

See also: AWS API Documentation

Request Syntax

client.join_domain(
    GatewayARN='string',
    DomainName='string',
    UserName='string',
    Password='string'
)
type GatewayARN

string

param GatewayARN

[REQUIRED]

The unique Amazon Resource Name of the file gateway you want to add to the Active Directory domain.

type DomainName

string

param DomainName

[REQUIRED]

The name of the domain that you want the gateway to join.

type UserName

string

param UserName

[REQUIRED]

Sets the user name of user who has permission to add the gateway to the Active Directory domain.

type Password

string

param Password

[REQUIRED]

Sets the password of the user who has permission to add the gateway to the Active Directory domain.

rtype

dict

returns

Response Syntax

{
    'GatewayARN': 'string'
}

Response Structure

  • (dict) --

    JoinDomainOutput

    • GatewayARN (string) --

      The unique Amazon Resource Name of the gateway that joined the domain.

DescribeSMBFileShares (new) Link ¶

Gets a description for one or more Server Message Block (SMB) 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_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,
            'ValidUserList': [
                'string',
            ],
            'InvalidUserList': [
                'string',
            ],
            'Authentication': '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 in 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 KMS key, or false to use a key managed by Amazon S3. Optional.

        • KMSKey (string) --

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

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

          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.

        • ValidUserList (list) --

          A list of users in the Active Directory that are allowed to access the file share. Can only be set if Authentication is set to "ActiveDirectory".

          • (string) --

        • InvalidUserList (list) --

          A list of users in the Active Directory that are not allowed to access the file share. Can only be set if Authentication is set to "ActiveDirectory".

          • (string) --

        • Authentication (string) --

          The authentication method of the file share. Valid values: "ActiveDirectory" or "GuestAccess". The default is "ActiveDirectory".

ListFileShares (updated) Link ¶
Changes (response)
{'FileShareInfoList': {'FileShareType': 'NFS | SMB'}}

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

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': [
        {
            'FileShareType': 'NFS'|'SMB',
            '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.

        • FileShareType (string) --

          The type of the 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.