DataSync / Client / create_location_smb
create_location_smb#
- DataSync.Client.create_location_smb(**kwargs)#
Creates a transfer location for a Server Message Block (SMB) file server. DataSync can use this location as a source or destination for transferring data.
Before you begin, make sure that you understand how DataSync accesses SMB file servers.
See also: AWS API Documentation
Request Syntax
response = client.create_location_smb( Subdirectory='string', ServerHostname='string', User='string', Domain='string', Password='string', AgentArns=[ 'string', ], MountOptions={ 'Version': 'AUTOMATIC'|'SMB2'|'SMB3'|'SMB1'|'SMB2_0' }, Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
Subdirectory (string) –
[REQUIRED]
Specifies the name of the share exported by your SMB file server where DataSync will read or write data. You can include a subdirectory in the share path (for example,
/path/to/subdirectory
). Make sure that other SMB clients in your network can also mount this path.To copy all data in the subdirectory, DataSync must be able to mount the SMB share and access all of its data. For more information, see required permissions for SMB locations.
ServerHostname (string) –
[REQUIRED]
Specifies the Domain Name Service (DNS) name or IP address of the SMB file server that your DataSync agent will mount.
Note
You can’t specify an IP version 6 (IPv6) address.
User (string) –
[REQUIRED]
Specifies the user that can mount and access the files, folders, and file metadata in your SMB file server.
For information about choosing a user with the right level of access for your transfer, see required permissions for SMB locations.
Domain (string) –
Specifies the name of the Active Directory domain that your SMB file server belongs to.
If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file server.
Password (string) –
[REQUIRED]
Specifies the password of the user who can mount your SMB file server and has permission to access the files and folders involved in your transfer.
For more information, see required permissions for SMB locations.
AgentArns (list) –
[REQUIRED]
Specifies the DataSync agent (or agents) which you want to connect to your SMB file server. You specify an agent by using its Amazon Resource Name (ARN).
(string) –
MountOptions (dict) –
Specifies the version of the SMB protocol that DataSync uses to access your SMB file server.
Version (string) –
By default, DataSync automatically chooses an SMB protocol version based on negotiation with your SMB file server. You also can configure DataSync to use a specific SMB version, but we recommend doing this only if DataSync has trouble negotiating with the SMB file server automatically.
These are the following options for configuring the SMB version:
AUTOMATIC
(default): DataSync and the SMB file server negotiate the highest version of SMB that they mutually support between 2.1 and 3.1.1. This is the recommended option. If you instead choose a specific version that your file server doesn’t support, you may get anOperation Not Supported
error.SMB3
: Restricts the protocol negotiation to only SMB version 3.0.2.SMB2
: Restricts the protocol negotiation to only SMB version 2.1.SMB2_0
: Restricts the protocol negotiation to only SMB version 2.0.SMB1
: Restricts the protocol negotiation to only SMB version 1.0.
Note
The
SMB1
option isn’t available when creating an Amazon FSx for NetApp ONTAP location.
Tags (list) –
Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.
(dict) –
A key-value pair representing a single tag that’s been applied to an Amazon Web Services resource.
Key (string) – [REQUIRED]
The key for an Amazon Web Services resource tag.
Value (string) –
The value for an Amazon Web Services resource tag.
- Return type:
dict
- Returns:
Response Syntax
{ 'LocationArn': 'string' }
Response Structure
(dict) –
CreateLocationSmbResponse
LocationArn (string) –
The ARN of the SMB location that you created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException