2025/03/05 - AWS DataSync - 3 updated api methods
Changes AWS DataSync now supports modifying ServerHostname while updating locations SMB, NFS, and ObjectStorage.
{'ServerHostname': 'string'}
Modifies the following configuration parameters of the Network File System (NFS) transfer location that you're using with DataSync.
For more information, see Configuring transfers with an NFS file server.
See also: AWS API Documentation
Request Syntax
client.update_location_nfs( LocationArn='string', Subdirectory='string', ServerHostname='string', OnPremConfig={ 'AgentArns': [ 'string', ] }, MountOptions={ 'Version': 'AUTOMATIC'|'NFS3'|'NFS4_0'|'NFS4_1' } )
string
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the NFS transfer location that you want to update.
string
Specifies the export path in your NFS file server that you want DataSync to mount.
This path (or a subdirectory of the path) is where DataSync transfers data to or from. For information on configuring an export for DataSync, see Accessing NFS file servers.
string
Specifies the DNS name or IP version 4 (IPv4) address of the NFS file server that your DataSync agent connects to.
dict
The DataSync agents that can connect to your Network File System (NFS) file server.
AgentArns (list) -- [REQUIRED]
The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your NFS file server.
You can specify more than one agent. For more information, see Using multiple DataSync agents.
(string) --
dict
Specifies how DataSync can access a location using the NFS protocol.
Version (string) --
Specifies the NFS version that you want DataSync to use when mounting your NFS share. If the server refuses to use the version specified, the task fails.
You can specify the following options:
AUTOMATIC (default): DataSync chooses NFS version 4.1.
NFS3: Stateless protocol version that allows for asynchronous writes on the server.
NFSv4_0: Stateful, firewall-friendly protocol version that supports delegations and pseudo file systems.
NFSv4_1: Stateful protocol version that supports sessions, directory delegations, and parallel data processing. NFS version 4.1 also includes all features available in version 4.0.
dict
Response Syntax
{}
Response Structure
(dict) --
{'ServerHostname': 'string'}
Modifies the following configuration parameters of the object storage transfer location that you're using with DataSync.
For more information, see Configuring DataSync transfers with an object storage system.
See also: AWS API Documentation
Request Syntax
client.update_location_object_storage( LocationArn='string', ServerPort=123, ServerProtocol='HTTPS'|'HTTP', Subdirectory='string', ServerHostname='string', AccessKey='string', SecretKey='string', AgentArns=[ 'string', ], ServerCertificate=b'bytes' )
string
[REQUIRED]
Specifies the ARN of the object storage system location that you're updating.
integer
Specifies the port that your object storage server accepts inbound network traffic on (for example, port 443).
string
Specifies the protocol that your object storage server uses to communicate.
string
Specifies the object prefix for your object storage server. If this is a source location, DataSync only copies objects with this prefix. If this is a destination location, DataSync writes all objects with this prefix.
string
Specifies the domain name or IP version 4 (IPv4) address of the object storage server that your DataSync agent connects to.
string
Specifies the access key (for example, a user name) if credentials are required to authenticate with the object storage server.
string
Specifies the secret key (for example, a password) if credentials are required to authenticate with the object storage server.
list
Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can connect with your object storage system.
(string) --
bytes
Specifies a certificate chain for DataSync to authenticate with your object storage system if the system uses a private or self-signed certificate authority (CA). You must specify a single .pem file with a full certificate chain (for example, file:///home/user/.ssh/object_storage_certificates.pem).
The certificate chain might include:
The object storage system's certificate
All intermediate certificates (if there are any)
The root certificate of the signing CA
You can concatenate your certificates into a .pem file (which can be up to 32768 bytes before base64 encoding). The following example cat command creates an object_storage_certificates.pem file that includes three certificates:
cat object_server_certificate.pem intermediate_certificate.pem ca_root_certificate.pem > object_storage_certificates.pem
To use this parameter, configure ServerProtocol to HTTPS.
Updating this parameter doesn't interfere with tasks that you have in progress.
dict
Response Syntax
{}
Response Structure
(dict) --
{'ServerHostname': 'string'}
Modifies the following configuration parameters of the Server Message Block (SMB) transfer location that you're using with DataSync.
For more information, see Configuring DataSync transfers with an SMB file server.
See also: AWS API Documentation
Request Syntax
client.update_location_smb( LocationArn='string', Subdirectory='string', ServerHostname='string', User='string', Domain='string', Password='string', AgentArns=[ 'string', ], MountOptions={ 'Version': 'AUTOMATIC'|'SMB2'|'SMB3'|'SMB1'|'SMB2_0' }, AuthenticationType='NTLM'|'KERBEROS', DnsIpAddresses=[ 'string', ], KerberosPrincipal='string', KerberosKeytab=b'bytes', KerberosKrb5Conf=b'bytes' )
string
[REQUIRED]
Specifies the ARN of the SMB location that you want to update.
string
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 specified subdirectory, DataSync must be able to mount the SMB share and access all of its data. For more information, see Providing DataSync access to SMB file servers.
string
Specifies the domain name or IP address of the SMB file server that your DataSync agent connects to.
Remember the following when configuring this parameter:
You can't specify an IP version 6 (IPv6) address.
If you're using Kerberos authentication, you must specify a domain name.
string
Specifies the user name that can mount your SMB file server and has permission to access the files and folders involved in your transfer. This parameter applies only if AuthenticationType is set to NTLM.
For information about choosing a user with the right level of access for your transfer, see Providing DataSync access to SMB file servers.
string
Specifies the Windows domain name that your SMB file server belongs to. This parameter applies only if AuthenticationType is set to NTLM.
If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right file server.
string
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. This parameter applies only if AuthenticationType is set to NTLM.
list
Specifies the DataSync agent (or agents) that can connect to your SMB file server. You specify an agent by using its Amazon Resource Name (ARN).
(string) --
dict
Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an 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 an Operation 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.
string
Specifies the authentication protocol that DataSync uses to connect to your SMB file server. DataSync supports NTLM (default) and KERBEROS authentication.
For more information, see Providing DataSync access to SMB file servers.
list
Specifies the IPv4 addresses for the DNS servers that your SMB file server belongs to. This parameter applies only if AuthenticationType is set to KERBEROS.
If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right SMB file server.
(string) --
string
Specifies a Kerberos prinicpal, which is an identity in your Kerberos realm that has permission to access the files, folders, and file metadata in your SMB file server.
A Kerberos principal might look like HOST/kerberosuser@MYDOMAIN.ORG.
Principal names are case sensitive. Your DataSync task execution will fail if the principal that you specify for this parameter doesn’t exactly match the principal that you use to create the keytab file.
bytes
Specifies your Kerberos key table (keytab) file, which includes mappings between your Kerberos principal and encryption keys.
The file must be base64 encoded. If you're using the CLI, the encoding is done for you.
To avoid task execution errors, make sure that the Kerberos principal that you use to create the keytab file matches exactly what you specify for KerberosPrincipal.
bytes
Specifies a Kerberos configuration file ( krb5.conf) that defines your Kerberos realm configuration.
The file must be base64 encoded. If you're using the CLI, the encoding is done for you.
dict
Response Syntax
{}
Response Structure
(dict) --