AWS DataSync

2019/08/22 - AWS DataSync - 2 new api methods

Changes  Update datasync client to latest version

CreateLocationSmb (new) Link ¶

Creates an endpoint for a Server Message Block (SMB) file system.

See also: AWS API Documentation

Request Syntax

client.create_location_smb(
    Subdirectory='string',
    ServerHostname='string',
    User='string',
    Domain='string',
    Password='string',
    AgentArns=[
        'string',
    ],
    MountOptions={
        'Version': 'AUTOMATIC'|'SMB2'|'SMB3'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type Subdirectory:

string

param Subdirectory:

[REQUIRED]

The subdirectory in the SMB file system that is used to read data from the SMB source location or write data to the SMB destination. The SMB path should be a path that's exported by the SMB server, or a subdirectory of that path. The path should be such that it can be mounted by other SMB clients in your network.

To transfer all the data in the folder you specified, DataSync needs to have permissions to mount the SMB share, as well as to access all the data in that share. To ensure this, either ensure that the user/password specified belongs to the user who can mount the share, and who has the appropriate permissions for all of the files and directories that you want DataSync to access, or use credentials of a member of the Backup Operators group to mount the share. Doing either enables the agent to access the data. For the agent to access directories, you must additionally enable all execute access.

type ServerHostname:

string

param ServerHostname:

[REQUIRED]

The name of the SMB server. This value is the IP address or Domain Name Service (DNS) name of the SMB server. An agent that is installed on-premises uses this host name to mount the SMB server in a network.

type User:

string

param User:

[REQUIRED]

The user who can mount the share, has the permissions to access files and directories in the SMB share.

type Domain:

string

param Domain:

The name of the domain that the SMB server belongs to.

type Password:

string

param Password:

[REQUIRED]

The password of the user who has permission to access the SMB server.

type AgentArns:

list

param AgentArns:

[REQUIRED]

The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location.

  • (string) --

type MountOptions:

dict

param MountOptions:

The mount options that are available for DataSync to use to access an SMB location.

  • Version (string) --

    The specific SMB version that you want DataSync to use to mount your SMB share. If you don't specify a version, DataSync defaults to AUTOMATIC. That is, DataSync automatically selects a version based on negotiation with the SMB Server server.

type Tags:

list

param Tags:

The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.

  • (dict) --

    Represents a single entry in a list of AWS resource tags. TagListEntry returns an array that contains a list of tasks when the ListTagsForResource operation is called.

    • Key (string) -- [REQUIRED]

      The key for an AWS resource tag.

    • Value (string) --

      The value for an AWS resource tag.

rtype:

dict

returns:

Response Syntax

{
    'LocationArn': 'string'
}

Response Structure

  • (dict) --

    CreateLocationSmbResponse

    • LocationArn (string) --

      The Amazon Resource Name (ARN) of the source SMB file system location that is created.

DescribeLocationSmb (new) Link ¶

Returns metadata, such as the path and user information about a SMB location.

See also: AWS API Documentation

Request Syntax

client.describe_location_smb(
    LocationArn='string'
)
type LocationArn:

string

param LocationArn:

[REQUIRED]

The Amazon resource Name (ARN) of the SMB location to describe.

rtype:

dict

returns:

Response Syntax

{
    'LocationArn': 'string',
    'LocationUri': 'string',
    'AgentArns': [
        'string',
    ],
    'User': 'string',
    'Domain': 'string',
    'MountOptions': {
        'Version': 'AUTOMATIC'|'SMB2'|'SMB3'
    },
    'CreationTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    DescribeLocationSmbResponse

    • LocationArn (string) --

      The Amazon resource Name (ARN) of the SMB location that was described.

    • LocationUri (string) --

      The URL of the source SBM location that was described.

    • AgentArns (list) --

      The Amazon Resource Name (ARN) of the source SMB file system location that is created.

      • (string) --

    • User (string) --

      The user who is logged on the SMB server.

    • Domain (string) --

      The name of the domain that the SMB server belongs to.

    • MountOptions (dict) --

      The mount options that are available for DataSync to use to access an SMB location.

      • Version (string) --

        The specific SMB version that you want DataSync to use to mount your SMB share. If you don't specify a version, DataSync defaults to AUTOMATIC. That is, DataSync automatically selects a version based on negotiation with the SMB Server server.

    • CreationTime (datetime) --

      The time that the SMB location was created.