Table of Contents
DataSync.
Client
¶A low-level client representing AWS DataSync
DataSync is a managed data transfer service that makes it simpler for you to automate moving data between on-premises storage and Amazon Web Services storage services. You also can use DataSync to transfer data between other cloud providers and Amazon Web Services storage services.
This API interface reference includes documentation for using DataSync programmatically. For complete information, see the DataSync User Guide .
import boto3
client = boto3.client('datasync')
These are the available methods:
can_paginate()
cancel_task_execution()
close()
create_agent()
create_location_efs()
create_location_fsx_lustre()
create_location_fsx_ontap()
create_location_fsx_open_zfs()
create_location_fsx_windows()
create_location_hdfs()
create_location_nfs()
create_location_object_storage()
create_location_s3()
create_location_smb()
create_task()
delete_agent()
delete_location()
delete_task()
describe_agent()
describe_location_efs()
describe_location_fsx_lustre()
describe_location_fsx_ontap()
describe_location_fsx_open_zfs()
describe_location_fsx_windows()
describe_location_hdfs()
describe_location_nfs()
describe_location_object_storage()
describe_location_s3()
describe_location_smb()
describe_task()
describe_task_execution()
get_paginator()
get_waiter()
list_agents()
list_locations()
list_tags_for_resource()
list_task_executions()
list_tasks()
start_task_execution()
tag_resource()
untag_resource()
update_agent()
update_location_hdfs()
update_location_nfs()
update_location_object_storage()
update_location_smb()
update_task()
update_task_execution()
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.cancel_task_execution
(**kwargs)¶Stops an DataSync task execution that's in progress. The transfer of some files are abruptly interrupted. File contents that're transferred to the destination might be incomplete or inconsistent with the source files.
However, if you start a new task execution using the same task and allow it to finish, file content on the destination will be complete and consistent. This applies to other unexpected failures that interrupt a task execution. In all of these cases, DataSync successfully completes the transfer when you start the next task execution.
See also: AWS API Documentation
Request Syntax
response = client.cancel_task_execution(
TaskExecutionArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the task execution to stop.
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
close
()¶Closes underlying endpoint connections.
create_agent
(**kwargs)¶Activates an DataSync agent that you have deployed in your storage environment. The activation process associates your agent with your account. In the activation process, you specify information such as the Amazon Web Services Region that you want to activate the agent in. You activate the agent in the Amazon Web Services Region where your target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created in this Amazon Web Services Region.
You can activate the agent in a VPC (virtual private cloud) or provide the agent access to a VPC endpoint so you can run tasks without going over the public internet.
You can use an agent for more than one location. If a task uses multiple agents, all of them need to have status AVAILABLE for the task to run. If you use multiple agents for a source location, the status of all the agents must be AVAILABLE for the task to run.
Agents are automatically updated by Amazon Web Services on a regular basis, using a mechanism that ensures minimal interruption to your tasks.
See also: AWS API Documentation
Request Syntax
response = client.create_agent(
ActivationKey='string',
AgentName='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
VpcEndpointId='string',
SubnetArns=[
'string',
],
SecurityGroupArns=[
'string',
]
)
[REQUIRED]
Your agent activation key. You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the DataSync console.
The redirect URL returned in the response provides you the activation key for your agent in the query string parameter activationKey
. It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent.
For more information, see Activating an Agent in the DataSync User Guide.
The key-value pair that represents the tag that you want to associate with the agent. The value can be an empty string. This value helps you manage, filter, and search for your agents.
Note
Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
The ID of the VPC (virtual private cloud) endpoint that the agent has access to. This is the client-side VPC endpoint, also called a PrivateLink. If you don't have a PrivateLink VPC endpoint, see Creating a VPC Endpoint Service Configuration in the Amazon VPC User Guide.
VPC endpoint ID looks like this: vpce-01234d5aff67890e1
.
The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task. The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.
The ARNs of the security groups used to protect your data transfer task subnets. See SecurityGroupArns.
dict
Response Syntax
{
'AgentArn': 'string'
}
Response Structure
(dict) --
CreateAgentResponse
AgentArn (string) --
The Amazon Resource Name (ARN) of the agent. Use the ListAgents
operation to return a list of agents for your account and Amazon Web Services Region.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
create_location_efs
(**kwargs)¶Creates an endpoint for an Amazon EFS file system that DataSync can access for a transfer. For more information, see Creating a location for Amazon EFS.
See also: AWS API Documentation
Request Syntax
response = client.create_location_efs(
Subdirectory='string',
EfsFilesystemArn='string',
Ec2Config={
'SubnetArn': 'string',
'SecurityGroupArns': [
'string',
]
},
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
AccessPointArn='string',
FileSystemAccessRoleArn='string',
InTransitEncryption='NONE'|'TLS1_2'
)
Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location). By default, DataSync uses the root directory, but you can also include subdirectories.
Note
You must specify a value with forward slashes (for example, /path/to/folder
).
[REQUIRED]
Specifies the ARN for the Amazon EFS file system.
[REQUIRED]
Specifies the subnet and security groups DataSync uses to access your Amazon EFS file system.
Specifies the ARN of a subnet where DataSync creates the network interfaces for managing traffic during your transfer.
The subnet must be located:
Note
You don't need to specify a subnet that includes a file system mount target.
Specifies the Amazon Resource Names (ARNs) of the security groups associated with an Amazon EFS file system's mount target.
Specifies the key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it copies data to or from the Amazon EFS file system.
If you specify an access point using AccessPointArn
or an IAM role using FileSystemAccessRoleArn
, you must set this parameter to TLS1_2
.
dict
Response Syntax
{
'LocationArn': 'string'
}
Response Structure
(dict) --
CreateLocationEfs
LocationArn (string) --
The Amazon Resource Name (ARN) of the Amazon EFS file system location that you create.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
create_location_fsx_lustre
(**kwargs)¶Creates an endpoint for an Amazon FSx for Lustre file system.
See also: AWS API Documentation
Request Syntax
response = client.create_location_fsx_lustre(
FsxFilesystemArn='string',
SecurityGroupArns=[
'string',
],
Subdirectory='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) for the FSx for Lustre file system.
[REQUIRED]
The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.
The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
dict
Response Syntax
{
'LocationArn': 'string'
}
Response Structure
(dict) --
LocationArn (string) --
The Amazon Resource Name (ARN) of the FSx for Lustre file system location that's created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
create_location_fsx_ontap
(**kwargs)¶Creates an endpoint for an Amazon FSx for NetApp ONTAP file system that DataSync can access for a transfer. For more information, see Creating a location for FSx for ONTAP.
See also: AWS API Documentation
Request Syntax
response = client.create_location_fsx_ontap(
Protocol={
'NFS': {
'MountOptions': {
'Version': 'AUTOMATIC'|'NFS3'|'NFS4_0'|'NFS4_1'
}
},
'SMB': {
'Domain': 'string',
'MountOptions': {
'Version': 'AUTOMATIC'|'SMB2'|'SMB3'|'SMB1'|'SMB2_0'
},
'Password': 'string',
'User': 'string'
}
},
SecurityGroupArns=[
'string',
],
StorageVirtualMachineArn='string',
Subdirectory='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.
Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).
Specifies how DataSync can access a location using the NFS protocol.
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.Note
DataSync currently only supports NFS version 3 with Amazon FSx for NetApp ONTAP locations.
Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's SVM.
Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.
Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.
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 a protocol version that they mutually support. (DataSync supports SMB versions 1.0 and later.) 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.Note
The SMB1
option isn't available when creating an Amazon FSx for NetApp ONTAP location.
Specifies the password of a user who has permission to access your SVM.
Specifies a user name that can mount the location and access the files, folders, and metadata that you need in the SVM.
If you provide a user in your Active Directory, note the following:
Make sure that the user has the permissions it needs to copy the data you want:
SE_TCB_NAME
: Required to set object ownership and file metadata. With this privilege, you also can copy NTFS discretionary access lists (DACLs).SE_SECURITY_NAME
: May be needed to copy NTFS system access control lists (SACLs). This operation specifically requires the Windows privilege, which is granted to members of the Domain Admins group. If you configure your task to copy SACLs, make sure that the user has the required privileges. For information about copying SACLs, see Ownership and permissions-related options.[REQUIRED]
Specifies the Amazon EC2 security groups that provide access to your file system's preferred subnet.
The security groups must allow outbound traffic on the following ports (depending on the protocol you use):
Your file system's security groups must also allow inbound traffic on the same ports.
[REQUIRED]
Specifies the ARN of the storage virtual machine (SVM) in your file system where you want to copy data to or from.
Specifies a path to the file share in the SVM where you'll copy your data.
You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be /vol1
, /vol1/tree1
, or /share1
.
Note
Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide .
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.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
dict
Response Syntax
{
'LocationArn': 'string'
}
Response Structure
(dict) --
LocationArn (string) --
Specifies the ARN of the FSx for ONTAP file system location that you create.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
create_location_fsx_open_zfs
(**kwargs)¶Creates an endpoint for an Amazon FSx for OpenZFS file system that DataSync can access for a transfer. For more information, see Creating a location for FSx for OpenZFS.
Note
Request parameters related to SMB
aren't supported with the CreateLocationFsxOpenZfs
operation.
See also: AWS API Documentation
Request Syntax
response = client.create_location_fsx_open_zfs(
FsxFilesystemArn='string',
Protocol={
'NFS': {
'MountOptions': {
'Version': 'AUTOMATIC'|'NFS3'|'NFS4_0'|'NFS4_1'
}
},
'SMB': {
'Domain': 'string',
'MountOptions': {
'Version': 'AUTOMATIC'|'SMB2'|'SMB3'|'SMB1'|'SMB2_0'
},
'Password': 'string',
'User': 'string'
}
},
SecurityGroupArns=[
'string',
],
Subdirectory='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the FSx for OpenZFS file system.
[REQUIRED]
The type of protocol that DataSync uses to access your file system.
Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).
Specifies how DataSync can access a location using the NFS protocol.
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.Note
DataSync currently only supports NFS version 3 with Amazon FSx for NetApp ONTAP locations.
Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's SVM.
Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.
Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.
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 a protocol version that they mutually support. (DataSync supports SMB versions 1.0 and later.) 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.Note
The SMB1
option isn't available when creating an Amazon FSx for NetApp ONTAP location.
Specifies the password of a user who has permission to access your SVM.
Specifies a user name that can mount the location and access the files, folders, and metadata that you need in the SVM.
If you provide a user in your Active Directory, note the following:
Make sure that the user has the permissions it needs to copy the data you want:
SE_TCB_NAME
: Required to set object ownership and file metadata. With this privilege, you also can copy NTFS discretionary access lists (DACLs).SE_SECURITY_NAME
: May be needed to copy NTFS system access control lists (SACLs). This operation specifically requires the Windows privilege, which is granted to members of the Domain Admins group. If you configure your task to copy SACLs, make sure that the user has the required privileges. For information about copying SACLs, see Ownership and permissions-related options.[REQUIRED]
The ARNs of the security groups that are used to configure the FSx for OpenZFS file system.
/fsx
. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
dict
Response Syntax
{
'LocationArn': 'string'
}
Response Structure
(dict) --
LocationArn (string) --
The ARN of the FSx for OpenZFS file system location that you created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
create_location_fsx_windows
(**kwargs)¶Creates an endpoint for an Amazon FSx for Windows File Server file system.
See also: AWS API Documentation
Request Syntax
response = client.create_location_fsx_windows(
Subdirectory='string',
FsxFilesystemArn='string',
SecurityGroupArns=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
User='string',
Domain='string',
Password='string'
)
[REQUIRED]
Specifies the Amazon Resource Name (ARN) for the FSx for Windows File Server file system.
[REQUIRED]
Specifies the ARNs of the security groups that provide access to your file system's preferred subnet.
Note
If you choose a security group that doesn't allow connections from within itself, do one of the following:
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.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
[REQUIRED]
Specifies the user who has the permissions to access files and folders in the file system.
For information about choosing a user name that ensures sufficient permissions to files, folders, and metadata, see user.
[REQUIRED]
Specifies the password of the user who has the permissions to access files and folders in the file system.
dict
Response Syntax
{
'LocationArn': 'string'
}
Response Structure
(dict) --
LocationArn (string) --
The ARN of the FSx for Windows File Server file system location you created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
create_location_hdfs
(**kwargs)¶Creates an endpoint for a Hadoop Distributed File System (HDFS).
See also: AWS API Documentation
Request Syntax
response = client.create_location_hdfs(
Subdirectory='string',
NameNodes=[
{
'Hostname': 'string',
'Port': 123
},
],
BlockSize=123,
ReplicationFactor=123,
KmsKeyProviderUri='string',
QopConfiguration={
'RpcProtection': 'DISABLED'|'AUTHENTICATION'|'INTEGRITY'|'PRIVACY',
'DataTransferProtection': 'DISABLED'|'AUTHENTICATION'|'INTEGRITY'|'PRIVACY'
},
AuthenticationType='SIMPLE'|'KERBEROS',
SimpleUser='string',
KerberosPrincipal='string',
KerberosKeytab=b'bytes',
KerberosKrb5Conf=b'bytes',
AgentArns=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
/
.[REQUIRED]
The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.
The NameNode of the Hadoop Distributed File System (HDFS). The NameNode manages the file system's namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes.
The hostname of the NameNode in the HDFS cluster. This value is the IP address or Domain Name Service (DNS) name of the NameNode. An agent that's installed on-premises uses this hostname to communicate with the NameNode in the network.
The port that the NameNode uses to listen to client requests.
The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster. If QopConfiguration
isn't specified, RpcProtection
and DataTransferProtection
default to PRIVACY
. If you set RpcProtection
or DataTransferProtection
, the other parameter assumes the same value.
The RPC protection setting configured on the HDFS cluster. This setting corresponds to your hadoop.rpc.protection
setting in your core-site.xml
file on your Hadoop cluster.
The data transfer protection setting configured on the HDFS cluster. This setting corresponds to your dfs.data.transfer.protection
setting in the hdfs-site.xml
file on your Hadoop cluster.
[REQUIRED]
The type of authentication used to determine the identity of the user.
The user name used to identify the client on the host operating system.
Note
If SIMPLE
is specified for AuthenticationType
, this parameter is required.
The Kerberos principal with access to the files and folders on the HDFS cluster.
Note
If KERBEROS
is specified for AuthenticationType
, this parameter is required.
The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address. If you're using the CLI, it performs base64 encoding for you. Otherwise, provide the base64-encoded text.
Note
If KERBEROS
is specified for AuthenticationType
, this parameter is required.
The krb5.conf
file that contains the Kerberos configuration information. You can load the krb5.conf
file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.
Note
If KERBEROS
is specified for AuthenticationType
, this parameter is required.
[REQUIRED]
The Amazon Resource Names (ARNs) of the agents that are used to connect to the HDFS cluster.
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.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
dict
Response Syntax
{
'LocationArn': 'string'
}
Response Structure
(dict) --
LocationArn (string) --
The ARN of the source HDFS cluster location that's created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
create_location_nfs
(**kwargs)¶Defines a file system on a Network File System (NFS) server that can be read from or written to.
See also: AWS API Documentation
Request Syntax
response = client.create_location_nfs(
Subdirectory='string',
ServerHostname='string',
OnPremConfig={
'AgentArns': [
'string',
]
},
MountOptions={
'Version': 'AUTOMATIC'|'NFS3'|'NFS4_0'|'NFS4_1'
},
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination. The NFS path should be a path that's exported by the NFS server, or a subdirectory of that path. The path should be such that it can be mounted by other NFS clients in your network.
To see all the paths exported by your NFS server, run " showmount -e nfs-server-name
" from an NFS client that has access to your server. You can specify any directory that appears in the results, and any subdirectory of that directory. Ensure that the NFS export is accessible without Kerberos authentication.
To transfer all the data in the folder you specified, DataSync needs to have permissions to read all the data. To ensure this, either configure the NFS export with no_root_squash,
or ensure that the permissions for all of the files that you want DataSync allow read access for all users. Doing either enables the agent to read the files. For the agent to access directories, you must additionally enable all execute access.
If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information.
For information about NFS export configuration, see 18.7. The /etc/exports Configuration File in the Red Hat Enterprise Linux documentation.
[REQUIRED]
The name of the NFS server. This value is the IP address or Domain Name Service (DNS) name of the NFS server. An agent that is installed on-premises uses this hostname to mount the NFS server in a network.
If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information.
Note
This name must either be DNS-compliant or must be an IP version 4 (IPv4) address.
[REQUIRED]
Contains a list of Amazon Resource Names (ARNs) of agents that are used to connect to an NFS server.
If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information.
ARNs of the agents to use for an NFS location.
The NFS mount options that DataSync can use to mount your NFS share.
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.Note
DataSync currently only supports NFS version 3 with Amazon FSx for NetApp ONTAP locations.
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.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
dict
Response Syntax
{
'LocationArn': 'string'
}
Response Structure
(dict) --
CreateLocationNfsResponse
LocationArn (string) --
The Amazon Resource Name (ARN) of the source NFS file system location that is created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
create_location_object_storage
(**kwargs)¶Creates an endpoint for an object storage system that DataSync can access for a transfer. For more information, see Creating a location for object storage.
See also: AWS API Documentation
Request Syntax
response = client.create_location_object_storage(
ServerHostname='string',
ServerPort=123,
ServerProtocol='HTTPS'|'HTTP',
Subdirectory='string',
BucketName='string',
AccessKey='string',
SecretKey='string',
AgentArns=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
ServerCertificate=b'bytes'
)
[REQUIRED]
Specifies the domain name or IP address of the object storage server. A DataSync agent uses this hostname to mount the object storage server in a network.
[REQUIRED]
Specifies the name of the object storage bucket involved in the transfer.
[REQUIRED]
Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can securely connect with your location.
Specifies the key-value pair that represents a tag that you want to add to the resource. Tags can help you manage, filter, and search for your resources. We recommend creating a name tag for your location.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
Specifies a certificate to authenticate with an object storage system that uses a private or self-signed certificate authority (CA). You must specify a Base64-encoded .pem
file (for example, file:///home/user/.ssh/storage_sys_certificate.pem
). The certificate can be up to 32768 bytes (before Base64 encoding).
To use this parameter, configure ServerProtocol
to HTTPS
.
dict
Response Syntax
{
'LocationArn': 'string'
}
Response Structure
(dict) --
CreateLocationObjectStorageResponse
LocationArn (string) --
Specifies the ARN of the object storage system location that you create.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
create_location_s3
(**kwargs)¶Creates an endpoint for an Amazon S3 bucket that DataSync can access for a transfer. For more information, see Create an Amazon S3 location.
See also: AWS API Documentation
Request Syntax
response = client.create_location_s3(
Subdirectory='string',
S3BucketArn='string',
S3StorageClass='STANDARD'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER'|'DEEP_ARCHIVE'|'OUTPOSTS'|'GLACIER_INSTANT_RETRIEVAL',
S3Config={
'BucketAccessRoleArn': 'string'
},
AgentArns=[
'string',
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The ARN of the Amazon S3 bucket. If the bucket is on an Amazon Web Services Outpost, this must be an access point ARN.
The Amazon S3 storage class that you want to store your files in when this location is used as a task destination. For buckets in Amazon Web Services Regions, the storage class defaults to Standard. For buckets on Outposts, the storage class defaults to Amazon Web Services S3 Outposts.
For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
[REQUIRED]
The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role used to access an Amazon S3 bucket.
For detailed information about using such a role, see Creating a Location for Amazon S3 in the DataSync User Guide .
The ARN of the IAM role for accessing the S3 bucket.
If you're using DataSync on an Amazon Web Services Outpost, specify the Amazon Resource Names (ARNs) of the DataSync agents deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services Outpost, see Deploy your DataSync agent on Outposts.
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.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
dict
Response Syntax
{
'LocationArn': 'string'
}
Response Structure
(dict) --
CreateLocationS3Response
LocationArn (string) --
The Amazon Resource Name (ARN) of the source Amazon S3 bucket location that is created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
create_location_smb
(**kwargs)¶Creates an endpoint for a Server Message Block (SMB) file server that DataSync can access for a transfer. For more information, see Creating an SMB location.
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'
},
]
)
[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 specified 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.
[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.
[REQUIRED]
Specifies the user name that can mount your SMB file server and has permission to access the files and folders involved in your transfer.
For information about choosing a user with the right level of access for your transfer, see required permissions for SMB locations.
Specifies the Windows domain name that your SMB file server belongs to.
For more information, see required permissions for SMB locations.
[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.
[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).
Specifies the version of the SMB protocol that DataSync uses to access your SMB file server.
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 a protocol version that they mutually support. (DataSync supports SMB versions 1.0 and later.) 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.Note
The SMB1
option isn't available when creating an Amazon FSx for NetApp ONTAP location.
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.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
dict
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
create_task
(**kwargs)¶Configures a task, which defines where and how DataSync transfers your data.
A task includes a source location, a destination location, and the preferences for how and when you want to transfer your data (such as bandwidth limits, scheduling, among other options).
See also: AWS API Documentation
Request Syntax
response = client.create_task(
SourceLocationArn='string',
DestinationLocationArn='string',
CloudWatchLogGroupArn='string',
Name='string',
Options={
'VerifyMode': 'POINT_IN_TIME_CONSISTENT'|'ONLY_FILES_TRANSFERRED'|'NONE',
'OverwriteMode': 'ALWAYS'|'NEVER',
'Atime': 'NONE'|'BEST_EFFORT',
'Mtime': 'NONE'|'PRESERVE',
'Uid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'Gid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'PreserveDeletedFiles': 'PRESERVE'|'REMOVE',
'PreserveDevices': 'NONE'|'PRESERVE',
'PosixPermissions': 'NONE'|'PRESERVE',
'BytesPerSecond': 123,
'TaskQueueing': 'ENABLED'|'DISABLED',
'LogLevel': 'OFF'|'BASIC'|'TRANSFER',
'TransferMode': 'CHANGED'|'ALL',
'SecurityDescriptorCopyFlags': 'NONE'|'OWNER_DACL'|'OWNER_DACL_SACL',
'ObjectTags': 'PRESERVE'|'NONE'
},
Excludes=[
{
'FilterType': 'SIMPLE_PATTERN',
'Value': 'string'
},
],
Schedule={
'ScheduleExpression': 'string'
},
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
Includes=[
{
'FilterType': 'SIMPLE_PATTERN',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the source location for the task.
[REQUIRED]
The Amazon Resource Name (ARN) of an Amazon Web Services storage resource's location.
Specifies the configuration options for a task. Some options include preserving file or object metadata and verifying data integrity.
You can also override these options before starting an individual run of a task (also known as a task execution ). For more information, see StartTaskExecution.
Specifies how and when DataSync checks the integrity of your data during a transfer.
Default value: POINT_IN_TIME_CONSISTENT
ONLY_FILES_TRANSFERRED
(recommended): DataSync calculates the checksum of transferred files and metadata at the source location. At the end of the transfer, DataSync then compares this checksum to the checksum calculated on those files at the destination.
We recommend this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
POINT_IN_TIME_CONSISTENT
: At the end of the transfer, DataSync scans the entire source and destination to verify that both locations are fully synchronized.
You can't use this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
NONE
: DataSync doesn't run additional verification at the end of the transfer. All data transmissions are still integrity-checked with checksum verification during the transfer.
Specifies whether data at the destination location should be overwritten or preserved. If set to NEVER
, a destination file for example will not be replaced by a source file (even if the destination file differs from the source file). If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.
Some storage classes have specific behaviors that can affect your Amazon S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Specifies whether to preserve metadata indicating the last time a file was read or written to. If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the original Atime
attribute on all source files (that is, the version before the PREPARING
phase of the task execution).
Note
The behavior of Atime
isn't fully standard across platforms, so DataSync can only do this on a best-effort basis.
Default value: BEST_EFFORT
BEST_EFFORT
: Attempt to preserve the per-fileAtime
value (recommended).
NONE
: IgnoreAtime
.
Note
If Atime
is set to BEST_EFFORT
, Mtime
must be set to PRESERVE
.
If Atime
is set to NONE
, Mtime
must also be NONE
.
Specifies whether to preserve metadata indicating the last time that a file was written to before the PREPARING
phase of your task execution. This option is required when you need to run the a task more than once.
Default Value: PRESERVE
PRESERVE
: Preserve originalMtime
(recommended)
NONE
: IgnoreMtime
.
Note
If Mtime
is set to PRESERVE
, Atime
must be set to BEST_EFFORT
.
If Mtime
is set to NONE
, Atime
must also be set to NONE
.
Specifies the POSIX user ID (UID) of the file's owner.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
NONE
: Ignore UID and GID.
Specifies the POSIX group ID (GID) of the file's owners.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
NONE
: Ignore UID and GID.
Specifies whether files in the destination location that don't exist in the source should be preserved. This option can affect your Amazon S3 storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Default value: PRESERVE
PRESERVE
: Ignore such destination files (recommended).
REMOVE
: Delete destination files that aren’t present in the source.
Note
If you set this parameter to REMOVE
, you can't set TransferMode
to ALL
. When you transfer all data, DataSync doesn't scan your destination location and doesn't know what to delete.
Specifies whether DataSync should preserve the metadata of block and character devices in the source location and recreate the files with that device name and metadata on the destination. DataSync copies only the name and metadata of such devices.
Note
DataSync can't copy the actual contents of these devices because they're nonterminal and don't return an end-of-file (EOF) marker.
Default value: NONE
NONE
: Ignore special devices (recommended).
PRESERVE
: Preserve character and block device metadata. This option currently isn't supported for Amazon EFS.
Specifies which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
For more information, see Metadata copied by DataSync.
Default value: PRESERVE
PRESERVE
: Preserve POSIX-style permissions (recommended).
NONE
: Ignore permissions.
Note
DataSync can preserve extant permissions of a source location.
Limits the bandwidth used by a DataSync task. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576
( =1024*1024
).
Specifies whether tasks should be queued before executing the tasks. The default is ENABLED
, which means the tasks will be queued.
If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Specifies the type of logs that DataSync publishes to a Amazon CloudWatch Logs log group. To specify the log group, see CloudWatchLogGroupArn.
If you set LogLevel
to OFF
, no logs are published. BASIC
publishes logs on errors for individual files transferred. TRANSFER
publishes logs for every file or object that is transferred and integrity checked.
Determines whether DataSync transfers only the data and metadata that differ between the source and the destination location or transfers all the content from the source (without comparing what's in the destination).
CHANGED
: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL
: DataSync copies all source location content to the destination (without comparing what's in the destination).
Specifies which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations or between two FSx for Windows File Server locations. For more information, see how DataSync handles metadata.
Default value: OWNER_DACL
OWNER_DACL
: For each copied object, DataSync copies the following metadata:
OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
NONE
: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Specifies whether object tags are preserved when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE
value.
Default Value: PRESERVE
Specifies a list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
Specifies a schedule used to periodically transfer files from a source to a destination location. The schedule should be specified in UTC time. For more information, see Scheduling your task.
A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.
Specifies the tags that you want to apply to the Amazon Resource Name (ARN) representing the task.
Tags are key-value pairs that help you manage, filter, and search for your DataSync resources.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
Specifies a list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
dict
Response Syntax
{
'TaskArn': 'string'
}
Response Structure
(dict) --
CreateTaskResponse
TaskArn (string) --
The Amazon Resource Name (ARN) of the task.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
delete_agent
(**kwargs)¶Deletes an agent. To specify which agent to delete, use the Amazon Resource Name (ARN) of the agent in your request. The operation disassociates the agent from your Amazon Web Services account. However, it doesn't delete the agent virtual machine (VM) from your on-premises environment.
See also: AWS API Documentation
Request Syntax
response = client.delete_agent(
AgentArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the agent to delete. Use the ListAgents
operation to return a list of agents for your account and Amazon Web Services Region.
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
delete_location
(**kwargs)¶Deletes the configuration of a location used by DataSync.
See also: AWS API Documentation
Request Syntax
response = client.delete_location(
LocationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the location to delete.
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
delete_task
(**kwargs)¶Deletes an DataSync task.
See also: AWS API Documentation
Request Syntax
response = client.delete_task(
TaskArn='string'
)
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the task that you want to delete.
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_agent
(**kwargs)¶Returns metadata about an DataSync agent, such as its name, endpoint type, and status.
See also: AWS API Documentation
Request Syntax
response = client.describe_agent(
AgentArn='string'
)
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the DataSync agent to describe.
{
'AgentArn': 'string',
'Name': 'string',
'Status': 'ONLINE'|'OFFLINE',
'LastConnectionTime': datetime(2015, 1, 1),
'CreationTime': datetime(2015, 1, 1),
'EndpointType': 'PUBLIC'|'PRIVATE_LINK'|'FIPS',
'PrivateLinkConfig': {
'VpcEndpointId': 'string',
'PrivateLinkEndpoint': 'string',
'SubnetArns': [
'string',
],
'SecurityGroupArns': [
'string',
]
}
}
Response Structure
DescribeAgentResponse
The ARN of the agent.
The name of the agent.
The status of the agent. If the status is ONLINE, then the agent is configured properly and is available to use. The Running status is the normal running status for an agent. If the status is OFFLINE, the agent's VM is turned off or the agent is in an unhealthy state. When the issue that caused the unhealthy state is resolved, the agent returns to ONLINE status.
The time that the agent last connected to DataSync.
The time that the agent was activated (that is, created in your account).
The type of endpoint that your agent is connected to. If the endpoint is a VPC endpoint, the agent is not accessible over the public internet.
The subnet and the security group that DataSync used to access a VPC endpoint.
The ID of the VPC endpoint that is configured for an agent. An agent that is configured with a VPC endpoint will not be accessible over the public internet.
The private endpoint that is configured for an agent that has access to IP addresses in a PrivateLink. An agent that is configured with this endpoint will not be accessible over the public internet.
The Amazon Resource Names (ARNs) of the subnets that are configured for an agent activated in a VPC or an agent that has access to a VPC endpoint.
The Amazon Resource Names (ARNs) of the security groups that are configured for the EC2 resource that hosts an agent activated in a VPC or an agent that has access to a VPC endpoint.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_location_efs
(**kwargs)¶Returns metadata about your DataSync location for an Amazon EFS file system.
See also: AWS API Documentation
Request Syntax
response = client.describe_location_efs(
LocationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the Amazon EFS file system location that you want information about.
{
'LocationArn': 'string',
'LocationUri': 'string',
'Ec2Config': {
'SubnetArn': 'string',
'SecurityGroupArns': [
'string',
]
},
'CreationTime': datetime(2015, 1, 1),
'AccessPointArn': 'string',
'FileSystemAccessRoleArn': 'string',
'InTransitEncryption': 'NONE'|'TLS1_2'
}
Response Structure
DescribeLocationEfsResponse
The ARN of the Amazon EFS file system location.
The URL of the Amazon EFS file system location.
The subnet and security groups that DataSync uses to access your Amazon EFS file system.
Specifies the ARN of a subnet where DataSync creates the network interfaces for managing traffic during your transfer.
The subnet must be located:
Note
You don't need to specify a subnet that includes a file system mount target.
Specifies the Amazon Resource Names (ARNs) of the security groups associated with an Amazon EFS file system's mount target.
The time that the location was created.
The ARN of the access point that DataSync uses to access the Amazon EFS file system.
The Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
Describes whether DataSync uses Transport Layer Security (TLS) encryption when copying data to or from the Amazon EFS file system.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_location_fsx_lustre
(**kwargs)¶Provides details about how an DataSync location for an Amazon FSx for Lustre file system is configured.
See also: AWS API Documentation
Request Syntax
response = client.describe_location_fsx_lustre(
LocationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the FSx for Lustre location to describe.
{
'LocationArn': 'string',
'LocationUri': 'string',
'SecurityGroupArns': [
'string',
],
'CreationTime': datetime(2015, 1, 1)
}
Response Structure
The Amazon Resource Name (ARN) of the FSx for Lustre location that was described.
The URI of the FSx for Lustre location that was described.
The Amazon Resource Names (ARNs) of the security groups that are configured for the FSx for Lustre file system.
The time that the FSx for Lustre location was created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_location_fsx_ontap
(**kwargs)¶Provides details about how an DataSync location for an Amazon FSx for NetApp ONTAP file system is configured.
Note
If your location uses SMB, the DescribeLocationFsxOntap
operation doesn't actually return a Password
.
See also: AWS API Documentation
Request Syntax
response = client.describe_location_fsx_ontap(
LocationArn='string'
)
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP file system location that you want information about.
{
'CreationTime': datetime(2015, 1, 1),
'LocationArn': 'string',
'LocationUri': 'string',
'Protocol': {
'NFS': {
'MountOptions': {
'Version': 'AUTOMATIC'|'NFS3'|'NFS4_0'|'NFS4_1'
}
},
'SMB': {
'Domain': 'string',
'MountOptions': {
'Version': 'AUTOMATIC'|'SMB2'|'SMB3'|'SMB1'|'SMB2_0'
},
'Password': 'string',
'User': 'string'
}
},
'SecurityGroupArns': [
'string',
],
'StorageVirtualMachineArn': 'string',
'FsxFilesystemArn': 'string'
}
Response Structure
The time that the location was created.
The ARN of the FSx for ONTAP file system location.
The uniform resource identifier (URI) of the FSx for ONTAP file system location.
Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.
Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).
Specifies how DataSync can access a location using the NFS protocol.
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.Note
DataSync currently only supports NFS version 3 with Amazon FSx for NetApp ONTAP locations.
Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's SVM.
Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.
Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.
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 a protocol version that they mutually support. (DataSync supports SMB versions 1.0 and later.) 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.Note
The SMB1
option isn't available when creating an Amazon FSx for NetApp ONTAP location.
Specifies the password of a user who has permission to access your SVM.
Specifies a user name that can mount the location and access the files, folders, and metadata that you need in the SVM.
If you provide a user in your Active Directory, note the following:
Make sure that the user has the permissions it needs to copy the data you want:
SE_TCB_NAME
: Required to set object ownership and file metadata. With this privilege, you also can copy NTFS discretionary access lists (DACLs).SE_SECURITY_NAME
: May be needed to copy NTFS system access control lists (SACLs). This operation specifically requires the Windows privilege, which is granted to members of the Domain Admins group. If you configure your task to copy SACLs, make sure that the user has the required privileges. For information about copying SACLs, see Ownership and permissions-related options.The security groups that DataSync uses to access your FSx for ONTAP file system.
The ARN of the storage virtual machine (SVM) on your FSx for ONTAP file system where you're copying data to or from.
The ARN of the FSx for ONTAP file system.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_location_fsx_open_zfs
(**kwargs)¶Provides details about how an DataSync location for an Amazon FSx for OpenZFS file system is configured.
Note
Response elements related to SMB
aren't supported with the DescribeLocationFsxOpenZfs
operation.
See also: AWS API Documentation
Request Syntax
response = client.describe_location_fsx_open_zfs(
LocationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the FSx for OpenZFS location to describe.
{
'LocationArn': 'string',
'LocationUri': 'string',
'SecurityGroupArns': [
'string',
],
'Protocol': {
'NFS': {
'MountOptions': {
'Version': 'AUTOMATIC'|'NFS3'|'NFS4_0'|'NFS4_1'
}
},
'SMB': {
'Domain': 'string',
'MountOptions': {
'Version': 'AUTOMATIC'|'SMB2'|'SMB3'|'SMB1'|'SMB2_0'
},
'Password': 'string',
'User': 'string'
}
},
'CreationTime': datetime(2015, 1, 1)
}
Response Structure
The ARN of the FSx for OpenZFS location that was described.
The uniform resource identifier (URI) of the FSx for OpenZFS location that was described.
Example: fsxz://us-west-2.fs-1234567890abcdef02/fsx/folderA/folder
The ARNs of the security groups that are configured for the FSx for OpenZFS file system.
The type of protocol that DataSync uses to access your file system.
Specifies the Network File System (NFS) protocol configuration that DataSync uses to access your FSx for OpenZFS file system or FSx for ONTAP file system's storage virtual machine (SVM).
Specifies how DataSync can access a location using the NFS protocol.
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.Note
DataSync currently only supports NFS version 3 with Amazon FSx for NetApp ONTAP locations.
Specifies the Server Message Block (SMB) protocol configuration that DataSync uses to access your FSx for ONTAP file system's SVM.
Specifies the fully qualified domain name (FQDN) of the Microsoft Active Directory that your storage virtual machine (SVM) belongs to.
Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.
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 a protocol version that they mutually support. (DataSync supports SMB versions 1.0 and later.) 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.Note
The SMB1
option isn't available when creating an Amazon FSx for NetApp ONTAP location.
Specifies the password of a user who has permission to access your SVM.
Specifies a user name that can mount the location and access the files, folders, and metadata that you need in the SVM.
If you provide a user in your Active Directory, note the following:
Make sure that the user has the permissions it needs to copy the data you want:
SE_TCB_NAME
: Required to set object ownership and file metadata. With this privilege, you also can copy NTFS discretionary access lists (DACLs).SE_SECURITY_NAME
: May be needed to copy NTFS system access control lists (SACLs). This operation specifically requires the Windows privilege, which is granted to members of the Domain Admins group. If you configure your task to copy SACLs, make sure that the user has the required privileges. For information about copying SACLs, see Ownership and permissions-related options.The time that the FSx for OpenZFS location was created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_location_fsx_windows
(**kwargs)¶Returns metadata about an Amazon FSx for Windows File Server location, such as information about its path.
See also: AWS API Documentation
Request Syntax
response = client.describe_location_fsx_windows(
LocationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the FSx for Windows File Server location to describe.
{
'LocationArn': 'string',
'LocationUri': 'string',
'SecurityGroupArns': [
'string',
],
'CreationTime': datetime(2015, 1, 1),
'User': 'string',
'Domain': 'string'
}
Response Structure
The Amazon Resource Name (ARN) of the FSx for Windows File Server location that was described.
The URL of the FSx for Windows File Server location that was described.
The Amazon Resource Names (ARNs) of the security groups that are configured for the FSx for Windows File Server file system.
The time that the FSx for Windows File Server location was created.
The user who has the permissions to access files and folders in the FSx for Windows File Server file system.
The name of the Windows domain that the FSx for Windows File Server belongs to.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_location_hdfs
(**kwargs)¶Returns metadata, such as the authentication information about the Hadoop Distributed File System (HDFS) location.
See also: AWS API Documentation
Request Syntax
response = client.describe_location_hdfs(
LocationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the HDFS cluster location to describe.
{
'LocationArn': 'string',
'LocationUri': 'string',
'NameNodes': [
{
'Hostname': 'string',
'Port': 123
},
],
'BlockSize': 123,
'ReplicationFactor': 123,
'KmsKeyProviderUri': 'string',
'QopConfiguration': {
'RpcProtection': 'DISABLED'|'AUTHENTICATION'|'INTEGRITY'|'PRIVACY',
'DataTransferProtection': 'DISABLED'|'AUTHENTICATION'|'INTEGRITY'|'PRIVACY'
},
'AuthenticationType': 'SIMPLE'|'KERBEROS',
'SimpleUser': 'string',
'KerberosPrincipal': 'string',
'AgentArns': [
'string',
],
'CreationTime': datetime(2015, 1, 1)
}
Response Structure
The ARN of the HDFS cluster location.
The URI of the HDFS cluster location.
The NameNode that manage the HDFS namespace.
The NameNode of the Hadoop Distributed File System (HDFS). The NameNode manages the file system's namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes.
The hostname of the NameNode in the HDFS cluster. This value is the IP address or Domain Name Service (DNS) name of the NameNode. An agent that's installed on-premises uses this hostname to communicate with the NameNode in the network.
The port that the NameNode uses to listen to client requests.
The size of the data blocks to write into the HDFS cluster.
The number of DataNodes to replicate the data to when writing to the HDFS cluster.
The URI of the HDFS cluster's Key Management Server (KMS).
The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster.
The RPC protection setting configured on the HDFS cluster. This setting corresponds to your hadoop.rpc.protection
setting in your core-site.xml
file on your Hadoop cluster.
The data transfer protection setting configured on the HDFS cluster. This setting corresponds to your dfs.data.transfer.protection
setting in the hdfs-site.xml
file on your Hadoop cluster.
The type of authentication used to determine the identity of the user.
The user name used to identify the client on the host operating system. This parameter is used if the AuthenticationType
is defined as SIMPLE
.
The Kerberos principal with access to the files and folders on the HDFS cluster. This parameter is used if the AuthenticationType
is defined as KERBEROS
.
The ARNs of the agents that are used to connect to the HDFS cluster.
The time that the HDFS location was created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_location_nfs
(**kwargs)¶Returns metadata, such as the path information, about an NFS location.
See also: AWS API Documentation
Request Syntax
response = client.describe_location_nfs(
LocationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the NFS location to describe.
{
'LocationArn': 'string',
'LocationUri': 'string',
'OnPremConfig': {
'AgentArns': [
'string',
]
},
'MountOptions': {
'Version': 'AUTOMATIC'|'NFS3'|'NFS4_0'|'NFS4_1'
},
'CreationTime': datetime(2015, 1, 1)
}
Response Structure
DescribeLocationNfsResponse
The Amazon Resource Name (ARN) of the NFS location that was described.
The URL of the source NFS location that was described.
A list of Amazon Resource Names (ARNs) of agents to use for a Network File System (NFS) location.
ARNs of the agents to use for an NFS location.
The NFS mount options that DataSync used to mount your NFS share.
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.Note
DataSync currently only supports NFS version 3 with Amazon FSx for NetApp ONTAP locations.
The time that the NFS location was created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_location_object_storage
(**kwargs)¶Returns metadata about your DataSync location for an object storage system.
See also: AWS API Documentation
Request Syntax
response = client.describe_location_object_storage(
LocationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the object storage system location that you want information about.
{
'LocationArn': 'string',
'LocationUri': 'string',
'AccessKey': 'string',
'ServerPort': 123,
'ServerProtocol': 'HTTPS'|'HTTP',
'AgentArns': [
'string',
],
'CreationTime': datetime(2015, 1, 1),
'ServerCertificate': b'bytes'
}
Response Structure
DescribeLocationObjectStorageResponse
The ARN of the object storage system location.
The URL of the object storage system location.
The access key (for example, a user name) required to authenticate with the object storage system.
The port that your object storage server accepts inbound network traffic on (for example, port 443).
The protocol that your object storage system uses to communicate.
The ARNs of the DataSync agents that can securely connect with your location.
The time that the location was created.
The self-signed certificate that DataSync uses to securely authenticate with your object storage system.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_location_s3
(**kwargs)¶Returns metadata, such as bucket name, about an Amazon S3 bucket location.
See also: AWS API Documentation
Request Syntax
response = client.describe_location_s3(
LocationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe.
{
'LocationArn': 'string',
'LocationUri': 'string',
'S3StorageClass': 'STANDARD'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER'|'DEEP_ARCHIVE'|'OUTPOSTS'|'GLACIER_INSTANT_RETRIEVAL',
'S3Config': {
'BucketAccessRoleArn': 'string'
},
'AgentArns': [
'string',
],
'CreationTime': datetime(2015, 1, 1)
}
Response Structure
DescribeLocationS3Response
The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.
The URL of the Amazon S3 location that was described.
The Amazon S3 storage class that you chose to store your files in when this location is used as a task destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role used to access an Amazon S3 bucket.
For detailed information about using such a role, see Creating a Location for Amazon S3 in the DataSync User Guide .
The ARN of the IAM role for accessing the S3 bucket.
If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2 agents deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services Outpost, see Deploy your DataSync agent on Outposts.
The time that the Amazon S3 bucket location was created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_location_smb
(**kwargs)¶Returns metadata, such as the path and user information about an SMB location.
See also: AWS API Documentation
Request Syntax
response = client.describe_location_smb(
LocationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the SMB location to describe.
{
'LocationArn': 'string',
'LocationUri': 'string',
'AgentArns': [
'string',
],
'User': 'string',
'Domain': 'string',
'MountOptions': {
'Version': 'AUTOMATIC'|'SMB2'|'SMB3'|'SMB1'|'SMB2_0'
},
'CreationTime': datetime(2015, 1, 1)
}
Response Structure
DescribeLocationSmbResponse
The Amazon Resource Name (ARN) of the SMB location that was described.
The URL of the source SMB location that was described.
The Amazon Resource Name (ARN) of the source SMB file system location that is created.
The user who can mount the share, has the permissions to access files and folders in the SMB share.
The name of the Windows domain that the SMB server belongs to.
The mount options that are available for DataSync to use to access an SMB location.
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 a protocol version that they mutually support. (DataSync supports SMB versions 1.0 and later.) 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.Note
The SMB1
option isn't available when creating an Amazon FSx for NetApp ONTAP location.
The time that the SMB location was created.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_task
(**kwargs)¶Returns metadata about a task.
See also: AWS API Documentation
Request Syntax
response = client.describe_task(
TaskArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the task to describe.
{
'TaskArn': 'string',
'Status': 'AVAILABLE'|'CREATING'|'QUEUED'|'RUNNING'|'UNAVAILABLE',
'Name': 'string',
'CurrentTaskExecutionArn': 'string',
'SourceLocationArn': 'string',
'DestinationLocationArn': 'string',
'CloudWatchLogGroupArn': 'string',
'SourceNetworkInterfaceArns': [
'string',
],
'DestinationNetworkInterfaceArns': [
'string',
],
'Options': {
'VerifyMode': 'POINT_IN_TIME_CONSISTENT'|'ONLY_FILES_TRANSFERRED'|'NONE',
'OverwriteMode': 'ALWAYS'|'NEVER',
'Atime': 'NONE'|'BEST_EFFORT',
'Mtime': 'NONE'|'PRESERVE',
'Uid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'Gid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'PreserveDeletedFiles': 'PRESERVE'|'REMOVE',
'PreserveDevices': 'NONE'|'PRESERVE',
'PosixPermissions': 'NONE'|'PRESERVE',
'BytesPerSecond': 123,
'TaskQueueing': 'ENABLED'|'DISABLED',
'LogLevel': 'OFF'|'BASIC'|'TRANSFER',
'TransferMode': 'CHANGED'|'ALL',
'SecurityDescriptorCopyFlags': 'NONE'|'OWNER_DACL'|'OWNER_DACL_SACL',
'ObjectTags': 'PRESERVE'|'NONE'
},
'Excludes': [
{
'FilterType': 'SIMPLE_PATTERN',
'Value': 'string'
},
],
'Schedule': {
'ScheduleExpression': 'string'
},
'ErrorCode': 'string',
'ErrorDetail': 'string',
'CreationTime': datetime(2015, 1, 1),
'Includes': [
{
'FilterType': 'SIMPLE_PATTERN',
'Value': 'string'
},
]
}
Response Structure
DescribeTaskResponse
The Amazon Resource Name (ARN) of the task that was described.
The status of the task that was described.
For detailed information about task execution statuses, see Understanding Task Statuses in the DataSync User Guide .
The name of the task that was described.
The Amazon Resource Name (ARN) of the task execution that is transferring files.
The Amazon Resource Name (ARN) of the source file system's location.
The Amazon Resource Name (ARN) of the Amazon Web Services storage resource's location.
The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was used to monitor and log events in the task.
For more information on these groups, see Working with Log Groups and Log Streams in the Amazon CloudWatch User Guide .
The Amazon Resource Names (ARNs) of the network interfaces created for your source location. For more information, see Network interface requirements.
The Amazon Resource Names (ARNs) of the network interfaces created for your destination location. For more information, see Network interface requirements.
The configuration options that control the behavior of the StartTaskExecution
operation. Some options include preserving file or object metadata and verifying data integrity.
You can override these options for each task execution. For more information, see StartTaskExecution.
Specifies how and when DataSync checks the integrity of your data during a transfer.
Default value: POINT_IN_TIME_CONSISTENT
ONLY_FILES_TRANSFERRED
(recommended): DataSync calculates the checksum of transferred files and metadata at the source location. At the end of the transfer, DataSync then compares this checksum to the checksum calculated on those files at the destination.
We recommend this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
POINT_IN_TIME_CONSISTENT
: At the end of the transfer, DataSync scans the entire source and destination to verify that both locations are fully synchronized.
You can't use this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
NONE
: DataSync doesn't run additional verification at the end of the transfer. All data transmissions are still integrity-checked with checksum verification during the transfer.
Specifies whether data at the destination location should be overwritten or preserved. If set to NEVER
, a destination file for example will not be replaced by a source file (even if the destination file differs from the source file). If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.
Some storage classes have specific behaviors that can affect your Amazon S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Specifies whether to preserve metadata indicating the last time a file was read or written to. If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the original Atime
attribute on all source files (that is, the version before the PREPARING
phase of the task execution).
Note
The behavior of Atime
isn't fully standard across platforms, so DataSync can only do this on a best-effort basis.
Default value: BEST_EFFORT
BEST_EFFORT
: Attempt to preserve the per-fileAtime
value (recommended).
NONE
: IgnoreAtime
.
Note
If Atime
is set to BEST_EFFORT
, Mtime
must be set to PRESERVE
.
If Atime
is set to NONE
, Mtime
must also be NONE
.
Specifies whether to preserve metadata indicating the last time that a file was written to before the PREPARING
phase of your task execution. This option is required when you need to run the a task more than once.
Default Value: PRESERVE
PRESERVE
: Preserve originalMtime
(recommended)
NONE
: IgnoreMtime
.
Note
If Mtime
is set to PRESERVE
, Atime
must be set to BEST_EFFORT
.
If Mtime
is set to NONE
, Atime
must also be set to NONE
.
Specifies the POSIX user ID (UID) of the file's owner.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
NONE
: Ignore UID and GID.
Specifies the POSIX group ID (GID) of the file's owners.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
NONE
: Ignore UID and GID.
Specifies whether files in the destination location that don't exist in the source should be preserved. This option can affect your Amazon S3 storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Default value: PRESERVE
PRESERVE
: Ignore such destination files (recommended).
REMOVE
: Delete destination files that aren’t present in the source.
Note
If you set this parameter to REMOVE
, you can't set TransferMode
to ALL
. When you transfer all data, DataSync doesn't scan your destination location and doesn't know what to delete.
Specifies whether DataSync should preserve the metadata of block and character devices in the source location and recreate the files with that device name and metadata on the destination. DataSync copies only the name and metadata of such devices.
Note
DataSync can't copy the actual contents of these devices because they're nonterminal and don't return an end-of-file (EOF) marker.
Default value: NONE
NONE
: Ignore special devices (recommended).
PRESERVE
: Preserve character and block device metadata. This option currently isn't supported for Amazon EFS.
Specifies which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
For more information, see Metadata copied by DataSync.
Default value: PRESERVE
PRESERVE
: Preserve POSIX-style permissions (recommended).
NONE
: Ignore permissions.
Note
DataSync can preserve extant permissions of a source location.
Limits the bandwidth used by a DataSync task. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576
( =1024*1024
).
Specifies whether tasks should be queued before executing the tasks. The default is ENABLED
, which means the tasks will be queued.
If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Specifies the type of logs that DataSync publishes to a Amazon CloudWatch Logs log group. To specify the log group, see CloudWatchLogGroupArn.
If you set LogLevel
to OFF
, no logs are published. BASIC
publishes logs on errors for individual files transferred. TRANSFER
publishes logs for every file or object that is transferred and integrity checked.
Determines whether DataSync transfers only the data and metadata that differ between the source and the destination location or transfers all the content from the source (without comparing what's in the destination).
CHANGED
: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL
: DataSync copies all source location content to the destination (without comparing what's in the destination).
Specifies which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations or between two FSx for Windows File Server locations. For more information, see how DataSync handles metadata.
Default value: OWNER_DACL
OWNER_DACL
: For each copied object, DataSync copies the following metadata:
OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
NONE
: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Specifies whether object tags are preserved when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE
value.
Default Value: PRESERVE
A list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
The schedule used to periodically transfer files from a source to a destination location.
A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.
Errors that DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.
Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.
The time that the task was created.
A list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
describe_task_execution
(**kwargs)¶Returns detailed metadata about a task that is being executed.
See also: AWS API Documentation
Request Syntax
response = client.describe_task_execution(
TaskExecutionArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the task that is being executed.
{
'TaskExecutionArn': 'string',
'Status': 'QUEUED'|'LAUNCHING'|'PREPARING'|'TRANSFERRING'|'VERIFYING'|'SUCCESS'|'ERROR',
'Options': {
'VerifyMode': 'POINT_IN_TIME_CONSISTENT'|'ONLY_FILES_TRANSFERRED'|'NONE',
'OverwriteMode': 'ALWAYS'|'NEVER',
'Atime': 'NONE'|'BEST_EFFORT',
'Mtime': 'NONE'|'PRESERVE',
'Uid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'Gid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'PreserveDeletedFiles': 'PRESERVE'|'REMOVE',
'PreserveDevices': 'NONE'|'PRESERVE',
'PosixPermissions': 'NONE'|'PRESERVE',
'BytesPerSecond': 123,
'TaskQueueing': 'ENABLED'|'DISABLED',
'LogLevel': 'OFF'|'BASIC'|'TRANSFER',
'TransferMode': 'CHANGED'|'ALL',
'SecurityDescriptorCopyFlags': 'NONE'|'OWNER_DACL'|'OWNER_DACL_SACL',
'ObjectTags': 'PRESERVE'|'NONE'
},
'Excludes': [
{
'FilterType': 'SIMPLE_PATTERN',
'Value': 'string'
},
],
'Includes': [
{
'FilterType': 'SIMPLE_PATTERN',
'Value': 'string'
},
],
'StartTime': datetime(2015, 1, 1),
'EstimatedFilesToTransfer': 123,
'EstimatedBytesToTransfer': 123,
'FilesTransferred': 123,
'BytesWritten': 123,
'BytesTransferred': 123,
'Result': {
'PrepareDuration': 123,
'PrepareStatus': 'PENDING'|'SUCCESS'|'ERROR',
'TotalDuration': 123,
'TransferDuration': 123,
'TransferStatus': 'PENDING'|'SUCCESS'|'ERROR',
'VerifyDuration': 123,
'VerifyStatus': 'PENDING'|'SUCCESS'|'ERROR',
'ErrorCode': 'string',
'ErrorDetail': 'string'
},
'BytesCompressed': 123
}
Response Structure
DescribeTaskExecutionResponse
The Amazon Resource Name (ARN) of the task execution that was described. TaskExecutionArn
is hierarchical and includes TaskArn
for the task that was executed.
For example, a TaskExecution
value with the ARN arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b
executed the task with the ARN arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2
.
The status of the task execution.
For detailed information about task execution statuses, see Understanding Task Statuses in the DataSync User Guide.
Configures your DataSync task settings. These options include how DataSync handles files, objects, and their associated metadata. You also can specify how DataSync verifies data integrity, set bandwidth limits for your task, among other options.
Each task setting has a default value. Unless you need to, you don't have to configure any of these Options
before starting your task.
Specifies how and when DataSync checks the integrity of your data during a transfer.
Default value: POINT_IN_TIME_CONSISTENT
ONLY_FILES_TRANSFERRED
(recommended): DataSync calculates the checksum of transferred files and metadata at the source location. At the end of the transfer, DataSync then compares this checksum to the checksum calculated on those files at the destination.
We recommend this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
POINT_IN_TIME_CONSISTENT
: At the end of the transfer, DataSync scans the entire source and destination to verify that both locations are fully synchronized.
You can't use this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
NONE
: DataSync doesn't run additional verification at the end of the transfer. All data transmissions are still integrity-checked with checksum verification during the transfer.
Specifies whether data at the destination location should be overwritten or preserved. If set to NEVER
, a destination file for example will not be replaced by a source file (even if the destination file differs from the source file). If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.
Some storage classes have specific behaviors that can affect your Amazon S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Specifies whether to preserve metadata indicating the last time a file was read or written to. If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the original Atime
attribute on all source files (that is, the version before the PREPARING
phase of the task execution).
Note
The behavior of Atime
isn't fully standard across platforms, so DataSync can only do this on a best-effort basis.
Default value: BEST_EFFORT
BEST_EFFORT
: Attempt to preserve the per-fileAtime
value (recommended).
NONE
: IgnoreAtime
.
Note
If Atime
is set to BEST_EFFORT
, Mtime
must be set to PRESERVE
.
If Atime
is set to NONE
, Mtime
must also be NONE
.
Specifies whether to preserve metadata indicating the last time that a file was written to before the PREPARING
phase of your task execution. This option is required when you need to run the a task more than once.
Default Value: PRESERVE
PRESERVE
: Preserve originalMtime
(recommended)
NONE
: IgnoreMtime
.
Note
If Mtime
is set to PRESERVE
, Atime
must be set to BEST_EFFORT
.
If Mtime
is set to NONE
, Atime
must also be set to NONE
.
Specifies the POSIX user ID (UID) of the file's owner.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
NONE
: Ignore UID and GID.
Specifies the POSIX group ID (GID) of the file's owners.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
NONE
: Ignore UID and GID.
Specifies whether files in the destination location that don't exist in the source should be preserved. This option can affect your Amazon S3 storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Default value: PRESERVE
PRESERVE
: Ignore such destination files (recommended).
REMOVE
: Delete destination files that aren’t present in the source.
Note
If you set this parameter to REMOVE
, you can't set TransferMode
to ALL
. When you transfer all data, DataSync doesn't scan your destination location and doesn't know what to delete.
Specifies whether DataSync should preserve the metadata of block and character devices in the source location and recreate the files with that device name and metadata on the destination. DataSync copies only the name and metadata of such devices.
Note
DataSync can't copy the actual contents of these devices because they're nonterminal and don't return an end-of-file (EOF) marker.
Default value: NONE
NONE
: Ignore special devices (recommended).
PRESERVE
: Preserve character and block device metadata. This option currently isn't supported for Amazon EFS.
Specifies which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
For more information, see Metadata copied by DataSync.
Default value: PRESERVE
PRESERVE
: Preserve POSIX-style permissions (recommended).
NONE
: Ignore permissions.
Note
DataSync can preserve extant permissions of a source location.
Limits the bandwidth used by a DataSync task. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576
( =1024*1024
).
Specifies whether tasks should be queued before executing the tasks. The default is ENABLED
, which means the tasks will be queued.
If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Specifies the type of logs that DataSync publishes to a Amazon CloudWatch Logs log group. To specify the log group, see CloudWatchLogGroupArn.
If you set LogLevel
to OFF
, no logs are published. BASIC
publishes logs on errors for individual files transferred. TRANSFER
publishes logs for every file or object that is transferred and integrity checked.
Determines whether DataSync transfers only the data and metadata that differ between the source and the destination location or transfers all the content from the source (without comparing what's in the destination).
CHANGED
: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL
: DataSync copies all source location content to the destination (without comparing what's in the destination).
Specifies which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations or between two FSx for Windows File Server locations. For more information, see how DataSync handles metadata.
Default value: OWNER_DACL
OWNER_DACL
: For each copied object, DataSync copies the following metadata:
OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
NONE
: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Specifies whether object tags are preserved when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE
value.
Default Value: PRESERVE
A list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
A list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
The time that the task execution was started.
The expected number of files that is to be transferred over the network. This value is calculated during the PREPARING
phase before the TRANSFERRING
phase of the task execution. This value is the expected number of files to be transferred. It's calculated based on comparing the content of the source and destination locations and finding the delta that needs to be transferred.
The estimated physical number of bytes that is to be transferred over the network.
The actual number of files that was transferred over the network. This value is calculated and updated on an ongoing basis during the TRANSFERRING
phase of the task execution. It's updated periodically when each file is read from the source and sent over the network.
If failures occur during a transfer, this value can be less than EstimatedFilesToTransfer
. In some cases, this value can also be greater than EstimatedFilesToTransfer
. This element is implementation-specific for some location types, so don't use it as an indicator for a correct file number or to monitor your task execution.
The number of logical bytes written to the destination Amazon Web Services storage resource.
The total number of bytes that are involved in the transfer. For the number of bytes sent over the network, see BytesCompressed
.
The result of the task execution.
The total time in milliseconds that DataSync spent in the PREPARING phase.
The status of the PREPARING phase.
The total time in milliseconds that DataSync took to transfer the file from the source to the destination location.
The total time in milliseconds that DataSync spent in the TRANSFERRING phase.
The status of the TRANSFERRING phase.
The total time in milliseconds that DataSync spent in the VERIFYING phase.
The status of the VERIFYING phase.
Errors that DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.
Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.
The physical number of bytes transferred over the network after compression was applied. In most cases, this number is less than BytesTransferred
unless the data isn't compressible.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
list_agents
(**kwargs)¶Returns a list of DataSync agents that belong to an Amazon Web Services account in the Amazon Web Services Region specified in the request.
With pagination, you can reduce the number of agents returned in a response. If you get a truncated list of agents in a response, the response contains a marker that you can specify in your next request to fetch the next page of agents.
ListAgents
is eventually consistent. This means the result of running the operation might not reflect that you just created or deleted an agent. For example, if you create an agent with CreateAgent and then immediately runListAgents
, that agent might not show up in the list right away. In situations like this, you can always confirm whether an agent has been created (or deleted) by using DescribeAgent.
See also: AWS API Documentation
Request Syntax
response = client.list_agents(
MaxResults=123,
NextToken='string'
)
dict
Response Syntax
{
'Agents': [
{
'AgentArn': 'string',
'Name': 'string',
'Status': 'ONLINE'|'OFFLINE'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ListAgentsResponse
Agents (list) --
A list of DataSync agents in your Amazon Web Services account in the Amazon Web Services Region specified in the request. The list is ordered by the agents' Amazon Resource Names (ARNs).
(dict) --
Represents a single entry in a list (or array) of DataSync agents when you call the ListAgents operation.
AgentArn (string) --
The Amazon Resource Name (ARN) of a DataSync agent.
Name (string) --
The name of an agent.
Status (string) --
The status of an agent. For more information, see DataSync agent statuses.
NextToken (string) --
The opaque string that indicates the position to begin the next list of results in the response.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
list_locations
(**kwargs)¶Returns a list of source and destination locations.
If you have more locations than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a token that you can specify in your next request to fetch the next page of locations.
See also: AWS API Documentation
Request Syntax
response = client.list_locations(
MaxResults=123,
NextToken='string',
Filters=[
{
'Name': 'LocationUri'|'LocationType'|'CreationTime',
'Values': [
'string',
],
'Operator': 'Equals'|'NotEquals'|'In'|'LessThanOrEqual'|'LessThan'|'GreaterThanOrEqual'|'GreaterThan'|'Contains'|'NotContains'|'BeginsWith'
},
]
)
You can use API filters to narrow down the list of resources returned by ListLocations
. For example, to retrieve all tasks on a specific source location, you can use ListLocations
with filter name LocationType S3
and Operator Equals
.
Narrow down the list of resources returned by ListLocations
. For example, to see all your Amazon S3 locations, create a filter using "Name": "LocationType"
, "Operator": "Equals"
, and "Values": "S3"
.
For more information, see filtering resources.
The name of the filter being used. Each API call supports a list of filters that are available for it (for example, LocationType
for ListLocations
).
The values that you want to filter for. For example, you might want to display only Amazon S3 locations.
The operator that is used to compare filter values (for example, Equals
or Contains
).
dict
Response Syntax
{
'Locations': [
{
'LocationArn': 'string',
'LocationUri': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ListLocationsResponse
Locations (list) --
An array that contains a list of locations.
(dict) --
Represents a single entry in a list of locations. LocationListEntry
returns an array that contains a list of locations when the ListLocations operation is called.
LocationArn (string) --
The Amazon Resource Name (ARN) of the location. For Network File System (NFS) or Amazon EFS, the location is the export path. For Amazon S3, the location is the prefix path that you want to mount and use as the root of the location.
LocationUri (string) --
Represents a list of URIs of a location. LocationUri
returns an array that contains a list of locations when the ListLocations operation is called.
Format: TYPE://GLOBAL_ID/SUBDIR
.
TYPE designates the type of location (for example, nfs
or s3
).
GLOBAL_ID is the globally unique identifier of the resource that backs the location. An example for EFS is us-east-2.fs-abcd1234
. An example for Amazon S3 is the bucket name, such as myBucket
. An example for NFS is a valid IPv4 address or a hostname that is compliant with Domain Name Service (DNS).
SUBDIR is a valid file system path, delimited by forward slashes as is the *nix convention. For NFS and Amazon EFS, it's the export path to mount the location. For Amazon S3, it's the prefix path that you mount to and treat as the root of the location.
NextToken (string) --
An opaque string that indicates the position at which to begin returning the next list of locations.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
Returns all the tags associated with an Amazon Web Services resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string',
MaxResults=123,
NextToken='string'
)
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the resource that you want tag information on.
dict
Response Syntax
{
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ListTagsForResourceResponse
Tags (list) --
An array of tags applied to the specified resource.
(dict) --
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
Key (string) --
The key for an Amazon Web Services resource tag.
Value (string) --
The value for an Amazon Web Services resource tag.
NextToken (string) --
The opaque string that indicates the position to begin the next list of results in the response.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
list_task_executions
(**kwargs)¶Returns a list of executed tasks.
See also: AWS API Documentation
Request Syntax
response = client.list_task_executions(
TaskArn='string',
MaxResults=123,
NextToken='string'
)
dict
Response Syntax
{
'TaskExecutions': [
{
'TaskExecutionArn': 'string',
'Status': 'QUEUED'|'LAUNCHING'|'PREPARING'|'TRANSFERRING'|'VERIFYING'|'SUCCESS'|'ERROR'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ListTaskExecutionsResponse
TaskExecutions (list) --
A list of executed tasks.
(dict) --
Represents a single entry in a list of task executions. TaskExecutionListEntry
returns an array that contains a list of specific invocations of a task when the ListTaskExecutions operation is called.
TaskExecutionArn (string) --
The Amazon Resource Name (ARN) of the task that was executed.
Status (string) --
The status of a task execution.
NextToken (string) --
An opaque string that indicates the position at which to begin returning the next list of executed tasks.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
list_tasks
(**kwargs)¶Returns a list of the DataSync tasks you created.
See also: AWS API Documentation
Request Syntax
response = client.list_tasks(
MaxResults=123,
NextToken='string',
Filters=[
{
'Name': 'LocationId'|'CreationTime',
'Values': [
'string',
],
'Operator': 'Equals'|'NotEquals'|'In'|'LessThanOrEqual'|'LessThan'|'GreaterThanOrEqual'|'GreaterThan'|'Contains'|'NotContains'|'BeginsWith'
},
]
)
You can use API filters to narrow down the list of resources returned by ListTasks
. For example, to retrieve all tasks on a specific source location, you can use ListTasks
with filter name LocationId
and Operator Equals
with the ARN for the location.
You can use API filters to narrow down the list of resources returned by ListTasks
. For example, to retrieve all tasks on a source location, you can use ListTasks
with filter name LocationId
and Operator Equals
with the ARN for the location.
For more information, see filtering DataSync resources.
The name of the filter being used. Each API call supports a list of filters that are available for it. For example, LocationId
for ListTasks
.
The values that you want to filter for. For example, you might want to display only tasks for a specific destination location.
The operator that is used to compare filter values (for example, Equals
or Contains
).
dict
Response Syntax
{
'Tasks': [
{
'TaskArn': 'string',
'Status': 'AVAILABLE'|'CREATING'|'QUEUED'|'RUNNING'|'UNAVAILABLE',
'Name': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ListTasksResponse
Tasks (list) --
A list of all the tasks that are returned.
(dict) --
Represents a single entry in a list of tasks. TaskListEntry
returns an array that contains a list of tasks when the ListTasks operation is called. A task includes the source and destination file systems to sync and the options to use for the tasks.
TaskArn (string) --
The Amazon Resource Name (ARN) of the task.
Status (string) --
The status of the task.
Name (string) --
The name of the task.
NextToken (string) --
An opaque string that indicates the position at which to begin returning the next list of tasks.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
start_task_execution
(**kwargs)¶Starts an DataSync task. For each task, you can only run one task execution at a time.
There are several phases to a task execution. For more information, see Task execution statuses.
See also: AWS API Documentation
Request Syntax
response = client.start_task_execution(
TaskArn='string',
OverrideOptions={
'VerifyMode': 'POINT_IN_TIME_CONSISTENT'|'ONLY_FILES_TRANSFERRED'|'NONE',
'OverwriteMode': 'ALWAYS'|'NEVER',
'Atime': 'NONE'|'BEST_EFFORT',
'Mtime': 'NONE'|'PRESERVE',
'Uid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'Gid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'PreserveDeletedFiles': 'PRESERVE'|'REMOVE',
'PreserveDevices': 'NONE'|'PRESERVE',
'PosixPermissions': 'NONE'|'PRESERVE',
'BytesPerSecond': 123,
'TaskQueueing': 'ENABLED'|'DISABLED',
'LogLevel': 'OFF'|'BASIC'|'TRANSFER',
'TransferMode': 'CHANGED'|'ALL',
'SecurityDescriptorCopyFlags': 'NONE'|'OWNER_DACL'|'OWNER_DACL_SACL',
'ObjectTags': 'PRESERVE'|'NONE'
},
Includes=[
{
'FilterType': 'SIMPLE_PATTERN',
'Value': 'string'
},
],
Excludes=[
{
'FilterType': 'SIMPLE_PATTERN',
'Value': 'string'
},
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the task that you want to start.
Configures your DataSync task settings. These options include how DataSync handles files, objects, and their associated metadata. You also can specify how DataSync verifies data integrity, set bandwidth limits for your task, among other options.
Each task setting has a default value. Unless you need to, you don't have to configure any of these Options
before starting your task.
Specifies how and when DataSync checks the integrity of your data during a transfer.
Default value: POINT_IN_TIME_CONSISTENT
ONLY_FILES_TRANSFERRED
(recommended): DataSync calculates the checksum of transferred files and metadata at the source location. At the end of the transfer, DataSync then compares this checksum to the checksum calculated on those files at the destination.
We recommend this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
POINT_IN_TIME_CONSISTENT
: At the end of the transfer, DataSync scans the entire source and destination to verify that both locations are fully synchronized.
You can't use this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
NONE
: DataSync doesn't run additional verification at the end of the transfer. All data transmissions are still integrity-checked with checksum verification during the transfer.
Specifies whether data at the destination location should be overwritten or preserved. If set to NEVER
, a destination file for example will not be replaced by a source file (even if the destination file differs from the source file). If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.
Some storage classes have specific behaviors that can affect your Amazon S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Specifies whether to preserve metadata indicating the last time a file was read or written to. If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the original Atime
attribute on all source files (that is, the version before the PREPARING
phase of the task execution).
Note
The behavior of Atime
isn't fully standard across platforms, so DataSync can only do this on a best-effort basis.
Default value: BEST_EFFORT
BEST_EFFORT
: Attempt to preserve the per-fileAtime
value (recommended).
NONE
: IgnoreAtime
.
Note
If Atime
is set to BEST_EFFORT
, Mtime
must be set to PRESERVE
.
If Atime
is set to NONE
, Mtime
must also be NONE
.
Specifies whether to preserve metadata indicating the last time that a file was written to before the PREPARING
phase of your task execution. This option is required when you need to run the a task more than once.
Default Value: PRESERVE
PRESERVE
: Preserve originalMtime
(recommended)
NONE
: IgnoreMtime
.
Note
If Mtime
is set to PRESERVE
, Atime
must be set to BEST_EFFORT
.
If Mtime
is set to NONE
, Atime
must also be set to NONE
.
Specifies the POSIX user ID (UID) of the file's owner.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
NONE
: Ignore UID and GID.
Specifies the POSIX group ID (GID) of the file's owners.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
NONE
: Ignore UID and GID.
Specifies whether files in the destination location that don't exist in the source should be preserved. This option can affect your Amazon S3 storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Default value: PRESERVE
PRESERVE
: Ignore such destination files (recommended).
REMOVE
: Delete destination files that aren’t present in the source.
Note
If you set this parameter to REMOVE
, you can't set TransferMode
to ALL
. When you transfer all data, DataSync doesn't scan your destination location and doesn't know what to delete.
Specifies whether DataSync should preserve the metadata of block and character devices in the source location and recreate the files with that device name and metadata on the destination. DataSync copies only the name and metadata of such devices.
Note
DataSync can't copy the actual contents of these devices because they're nonterminal and don't return an end-of-file (EOF) marker.
Default value: NONE
NONE
: Ignore special devices (recommended).
PRESERVE
: Preserve character and block device metadata. This option currently isn't supported for Amazon EFS.
Specifies which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
For more information, see Metadata copied by DataSync.
Default value: PRESERVE
PRESERVE
: Preserve POSIX-style permissions (recommended).
NONE
: Ignore permissions.
Note
DataSync can preserve extant permissions of a source location.
Limits the bandwidth used by a DataSync task. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576
( =1024*1024
).
Specifies whether tasks should be queued before executing the tasks. The default is ENABLED
, which means the tasks will be queued.
If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Specifies the type of logs that DataSync publishes to a Amazon CloudWatch Logs log group. To specify the log group, see CloudWatchLogGroupArn.
If you set LogLevel
to OFF
, no logs are published. BASIC
publishes logs on errors for individual files transferred. TRANSFER
publishes logs for every file or object that is transferred and integrity checked.
Determines whether DataSync transfers only the data and metadata that differ between the source and the destination location or transfers all the content from the source (without comparing what's in the destination).
CHANGED
: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL
: DataSync copies all source location content to the destination (without comparing what's in the destination).
Specifies which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations or between two FSx for Windows File Server locations. For more information, see how DataSync handles metadata.
Default value: OWNER_DACL
OWNER_DACL
: For each copied object, DataSync copies the following metadata:
OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
NONE
: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Specifies whether object tags are preserved when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE
value.
Default Value: PRESERVE
Specifies a list of filter rules that determines which files to include when running a task. The pattern should contain a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
Specifies a list of filter rules that determines which files to exclude from a task. The list contains a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
Specifies the tags that you want to apply to the Amazon Resource Name (ARN) representing the task execution.
Tags are key-value pairs that help you manage, filter, and search for your DataSync resources.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
dict
Response Syntax
{
'TaskExecutionArn': 'string'
}
Response Structure
(dict) --
StartTaskExecutionResponse
TaskExecutionArn (string) --
The ARN of the running task execution.
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
tag_resource
(**kwargs)¶Applies a tag to an Amazon Web Services resource. Tags are key-value pairs that can help you manage, filter, and search for your resources.
These include DataSync resources, such as locations, tasks, and task executions.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceArn='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the resource to apply the tag to.
[REQUIRED]
Specifies the tags that you want to apply to the resource.
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
The key for an Amazon Web Services resource tag.
The value for an Amazon Web Services resource tag.
dict
Response Syntax
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
untag_resource
(**kwargs)¶Removes tags from an Amazon Web Services resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceArn='string',
Keys=[
'string',
]
)
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the resource to remove the tags from.
[REQUIRED]
Specifies the keys in the tags that you want to remove.
dict
Response Syntax
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
update_agent
(**kwargs)¶Updates the name of an agent.
See also: AWS API Documentation
Request Syntax
response = client.update_agent(
AgentArn='string',
Name='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the agent to update.
dict
Response Syntax
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
update_location_hdfs
(**kwargs)¶Updates some parameters of a previously created location for a Hadoop Distributed File System cluster.
See also: AWS API Documentation
Request Syntax
response = client.update_location_hdfs(
LocationArn='string',
Subdirectory='string',
NameNodes=[
{
'Hostname': 'string',
'Port': 123
},
],
BlockSize=123,
ReplicationFactor=123,
KmsKeyProviderUri='string',
QopConfiguration={
'RpcProtection': 'DISABLED'|'AUTHENTICATION'|'INTEGRITY'|'PRIVACY',
'DataTransferProtection': 'DISABLED'|'AUTHENTICATION'|'INTEGRITY'|'PRIVACY'
},
AuthenticationType='SIMPLE'|'KERBEROS',
SimpleUser='string',
KerberosPrincipal='string',
KerberosKeytab=b'bytes',
KerberosKrb5Conf=b'bytes',
AgentArns=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the source HDFS cluster location.
The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.
The NameNode of the Hadoop Distributed File System (HDFS). The NameNode manages the file system's namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes.
The hostname of the NameNode in the HDFS cluster. This value is the IP address or Domain Name Service (DNS) name of the NameNode. An agent that's installed on-premises uses this hostname to communicate with the NameNode in the network.
The port that the NameNode uses to listen to client requests.
The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer privacy settings configured on the Hadoop Distributed File System (HDFS) cluster.
The RPC protection setting configured on the HDFS cluster. This setting corresponds to your hadoop.rpc.protection
setting in your core-site.xml
file on your Hadoop cluster.
The data transfer protection setting configured on the HDFS cluster. This setting corresponds to your dfs.data.transfer.protection
setting in the hdfs-site.xml
file on your Hadoop cluster.
krb5.conf
file that contains the Kerberos configuration information. You can load the krb5.conf
file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.The ARNs of the agents that are used to connect to the HDFS cluster.
dict
Response Syntax
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
update_location_nfs
(**kwargs)¶Updates some of the parameters of a previously created location for Network File System (NFS) access. For information about creating an NFS location, see Creating a location for NFS.
See also: AWS API Documentation
Request Syntax
response = client.update_location_nfs(
LocationArn='string',
Subdirectory='string',
OnPremConfig={
'AgentArns': [
'string',
]
},
MountOptions={
'Version': 'AUTOMATIC'|'NFS3'|'NFS4_0'|'NFS4_1'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the NFS location to update.
The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination. The NFS path should be a path that's exported by the NFS server, or a subdirectory of that path. The path should be such that it can be mounted by other NFS clients in your network.
To see all the paths exported by your NFS server, run " showmount -e nfs-server-name
" from an NFS client that has access to your server. You can specify any directory that appears in the results, and any subdirectory of that directory. Ensure that the NFS export is accessible without Kerberos authentication.
To transfer all the data in the folder that you specified, DataSync must have permissions to read all the data. To ensure this, either configure the NFS export with no_root_squash
, or ensure that the files you want DataSync to access have permissions that allow read access for all users. Doing either option enables the agent to read the files. For the agent to access directories, you must additionally enable all execute access.
If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information.
For information about NFS export configuration, see 18.7. The /etc/exports Configuration File in the Red Hat Enterprise Linux documentation.
A list of Amazon Resource Names (ARNs) of agents to use for a Network File System (NFS) location.
ARNs of the agents to use for an NFS location.
Specifies how DataSync can access a location using the NFS protocol.
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.Note
DataSync currently only supports NFS version 3 with Amazon FSx for NetApp ONTAP locations.
dict
Response Syntax
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
update_location_object_storage
(**kwargs)¶Updates some parameters of an existing object storage location that DataSync accesses for a transfer. For information about creating a self-managed object storage location, see Creating a location for object storage.
See also: AWS API Documentation
Request Syntax
response = client.update_location_object_storage(
LocationArn='string',
ServerPort=123,
ServerProtocol='HTTPS'|'HTTP',
Subdirectory='string',
AccessKey='string',
SecretKey='string',
AgentArns=[
'string',
],
ServerCertificate=b'bytes'
)
[REQUIRED]
Specifies the ARN of the object storage system location that you're updating.
Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can securely connect with your location.
Specifies a certificate to authenticate with an object storage system that uses a private or self-signed certificate authority (CA). You must specify a Base64-encoded .pem
file (for example, file:///home/user/.ssh/storage_sys_certificate.pem
). The certificate can be up to 32768 bytes (before Base64 encoding).
To use this parameter, configure ServerProtocol
to HTTPS
.
Updating the certificate doesn't interfere with tasks that you have in progress.
dict
Response Syntax
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
update_location_smb
(**kwargs)¶Updates some of the parameters of a previously created location for Server Message Block (SMB) file system access. For information about creating an SMB location, see Creating a location for SMB.
See also: AWS API Documentation
Request Syntax
response = client.update_location_smb(
LocationArn='string',
Subdirectory='string',
User='string',
Domain='string',
Password='string',
AgentArns=[
'string',
],
MountOptions={
'Version': 'AUTOMATIC'|'SMB2'|'SMB3'|'SMB1'|'SMB2_0'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the SMB location to update.
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.
Note
Subdirectory
must be specified with forward slashes. For example, /path/to/folder
.
To transfer all the data in the folder that you specified, DataSync must have permissions to mount the SMB share and to access all the data in that share. To ensure this, do either of the following:
Doing either of these options enables the agent to access the data. For the agent to access directories, you must also enable all execute access.
The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location.
Specifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.
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 a protocol version that they mutually support. (DataSync supports SMB versions 1.0 and later.) 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.Note
The SMB1
option isn't available when creating an Amazon FSx for NetApp ONTAP location.
dict
Response Syntax
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
update_task
(**kwargs)¶Updates the metadata associated with a task.
See also: AWS API Documentation
Request Syntax
response = client.update_task(
TaskArn='string',
Options={
'VerifyMode': 'POINT_IN_TIME_CONSISTENT'|'ONLY_FILES_TRANSFERRED'|'NONE',
'OverwriteMode': 'ALWAYS'|'NEVER',
'Atime': 'NONE'|'BEST_EFFORT',
'Mtime': 'NONE'|'PRESERVE',
'Uid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'Gid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'PreserveDeletedFiles': 'PRESERVE'|'REMOVE',
'PreserveDevices': 'NONE'|'PRESERVE',
'PosixPermissions': 'NONE'|'PRESERVE',
'BytesPerSecond': 123,
'TaskQueueing': 'ENABLED'|'DISABLED',
'LogLevel': 'OFF'|'BASIC'|'TRANSFER',
'TransferMode': 'CHANGED'|'ALL',
'SecurityDescriptorCopyFlags': 'NONE'|'OWNER_DACL'|'OWNER_DACL_SACL',
'ObjectTags': 'PRESERVE'|'NONE'
},
Excludes=[
{
'FilterType': 'SIMPLE_PATTERN',
'Value': 'string'
},
],
Schedule={
'ScheduleExpression': 'string'
},
Name='string',
CloudWatchLogGroupArn='string',
Includes=[
{
'FilterType': 'SIMPLE_PATTERN',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource name of the task to update.
Configures your DataSync task settings. These options include how DataSync handles files, objects, and their associated metadata. You also can specify how DataSync verifies data integrity, set bandwidth limits for your task, among other options.
Each task setting has a default value. Unless you need to, you don't have to configure any of these Options
before starting your task.
Specifies how and when DataSync checks the integrity of your data during a transfer.
Default value: POINT_IN_TIME_CONSISTENT
ONLY_FILES_TRANSFERRED
(recommended): DataSync calculates the checksum of transferred files and metadata at the source location. At the end of the transfer, DataSync then compares this checksum to the checksum calculated on those files at the destination.
We recommend this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
POINT_IN_TIME_CONSISTENT
: At the end of the transfer, DataSync scans the entire source and destination to verify that both locations are fully synchronized.
You can't use this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
NONE
: DataSync doesn't run additional verification at the end of the transfer. All data transmissions are still integrity-checked with checksum verification during the transfer.
Specifies whether data at the destination location should be overwritten or preserved. If set to NEVER
, a destination file for example will not be replaced by a source file (even if the destination file differs from the source file). If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.
Some storage classes have specific behaviors that can affect your Amazon S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Specifies whether to preserve metadata indicating the last time a file was read or written to. If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the original Atime
attribute on all source files (that is, the version before the PREPARING
phase of the task execution).
Note
The behavior of Atime
isn't fully standard across platforms, so DataSync can only do this on a best-effort basis.
Default value: BEST_EFFORT
BEST_EFFORT
: Attempt to preserve the per-fileAtime
value (recommended).
NONE
: IgnoreAtime
.
Note
If Atime
is set to BEST_EFFORT
, Mtime
must be set to PRESERVE
.
If Atime
is set to NONE
, Mtime
must also be NONE
.
Specifies whether to preserve metadata indicating the last time that a file was written to before the PREPARING
phase of your task execution. This option is required when you need to run the a task more than once.
Default Value: PRESERVE
PRESERVE
: Preserve originalMtime
(recommended)
NONE
: IgnoreMtime
.
Note
If Mtime
is set to PRESERVE
, Atime
must be set to BEST_EFFORT
.
If Mtime
is set to NONE
, Atime
must also be set to NONE
.
Specifies the POSIX user ID (UID) of the file's owner.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
NONE
: Ignore UID and GID.
Specifies the POSIX group ID (GID) of the file's owners.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
NONE
: Ignore UID and GID.
Specifies whether files in the destination location that don't exist in the source should be preserved. This option can affect your Amazon S3 storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Default value: PRESERVE
PRESERVE
: Ignore such destination files (recommended).
REMOVE
: Delete destination files that aren’t present in the source.
Note
If you set this parameter to REMOVE
, you can't set TransferMode
to ALL
. When you transfer all data, DataSync doesn't scan your destination location and doesn't know what to delete.
Specifies whether DataSync should preserve the metadata of block and character devices in the source location and recreate the files with that device name and metadata on the destination. DataSync copies only the name and metadata of such devices.
Note
DataSync can't copy the actual contents of these devices because they're nonterminal and don't return an end-of-file (EOF) marker.
Default value: NONE
NONE
: Ignore special devices (recommended).
PRESERVE
: Preserve character and block device metadata. This option currently isn't supported for Amazon EFS.
Specifies which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
For more information, see Metadata copied by DataSync.
Default value: PRESERVE
PRESERVE
: Preserve POSIX-style permissions (recommended).
NONE
: Ignore permissions.
Note
DataSync can preserve extant permissions of a source location.
Limits the bandwidth used by a DataSync task. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576
( =1024*1024
).
Specifies whether tasks should be queued before executing the tasks. The default is ENABLED
, which means the tasks will be queued.
If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Specifies the type of logs that DataSync publishes to a Amazon CloudWatch Logs log group. To specify the log group, see CloudWatchLogGroupArn.
If you set LogLevel
to OFF
, no logs are published. BASIC
publishes logs on errors for individual files transferred. TRANSFER
publishes logs for every file or object that is transferred and integrity checked.
Determines whether DataSync transfers only the data and metadata that differ between the source and the destination location or transfers all the content from the source (without comparing what's in the destination).
CHANGED
: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL
: DataSync copies all source location content to the destination (without comparing what's in the destination).
Specifies which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations or between two FSx for Windows File Server locations. For more information, see how DataSync handles metadata.
Default value: OWNER_DACL
OWNER_DACL
: For each copied object, DataSync copies the following metadata:
OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
NONE
: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Specifies whether object tags are preserved when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE
value.
Default Value: PRESERVE
Specifies a list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
Specifies a schedule used to periodically transfer files from a source to a destination location. You can configure your task to execute hourly, daily, weekly or on specific days of the week. You control when in the day or hour you want the task to execute. The time you specify is UTC time. For more information, see Scheduling your task.
A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.
Specifies a list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: /folder1|/folder2
dict
Response Syntax
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
update_task_execution
(**kwargs)¶Updates execution of a task.
You can modify bandwidth throttling for a task execution that is running or queued. For more information, see Adjusting Bandwidth Throttling for a Task Execution.
Note
The only Option
that can be modified by UpdateTaskExecution
is BytesPerSecond
.
See also: AWS API Documentation
Request Syntax
response = client.update_task_execution(
TaskExecutionArn='string',
Options={
'VerifyMode': 'POINT_IN_TIME_CONSISTENT'|'ONLY_FILES_TRANSFERRED'|'NONE',
'OverwriteMode': 'ALWAYS'|'NEVER',
'Atime': 'NONE'|'BEST_EFFORT',
'Mtime': 'NONE'|'PRESERVE',
'Uid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'Gid': 'NONE'|'INT_VALUE'|'NAME'|'BOTH',
'PreserveDeletedFiles': 'PRESERVE'|'REMOVE',
'PreserveDevices': 'NONE'|'PRESERVE',
'PosixPermissions': 'NONE'|'PRESERVE',
'BytesPerSecond': 123,
'TaskQueueing': 'ENABLED'|'DISABLED',
'LogLevel': 'OFF'|'BASIC'|'TRANSFER',
'TransferMode': 'CHANGED'|'ALL',
'SecurityDescriptorCopyFlags': 'NONE'|'OWNER_DACL'|'OWNER_DACL_SACL',
'ObjectTags': 'PRESERVE'|'NONE'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the specific task execution that is being updated.
[REQUIRED]
Configures your DataSync task settings. These options include how DataSync handles files, objects, and their associated metadata. You also can specify how DataSync verifies data integrity, set bandwidth limits for your task, among other options.
Each task setting has a default value. Unless you need to, you don't have to configure any of these Options
before starting your task.
Specifies how and when DataSync checks the integrity of your data during a transfer.
Default value: POINT_IN_TIME_CONSISTENT
ONLY_FILES_TRANSFERRED
(recommended): DataSync calculates the checksum of transferred files and metadata at the source location. At the end of the transfer, DataSync then compares this checksum to the checksum calculated on those files at the destination.
We recommend this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
POINT_IN_TIME_CONSISTENT
: At the end of the transfer, DataSync scans the entire source and destination to verify that both locations are fully synchronized.
You can't use this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see Storage class considerations with Amazon S3 locations.
NONE
: DataSync doesn't run additional verification at the end of the transfer. All data transmissions are still integrity-checked with checksum verification during the transfer.
Specifies whether data at the destination location should be overwritten or preserved. If set to NEVER
, a destination file for example will not be replaced by a source file (even if the destination file differs from the source file). If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.
Some storage classes have specific behaviors that can affect your Amazon S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Specifies whether to preserve metadata indicating the last time a file was read or written to. If you set Atime
to BEST_EFFORT
, DataSync attempts to preserve the original Atime
attribute on all source files (that is, the version before the PREPARING
phase of the task execution).
Note
The behavior of Atime
isn't fully standard across platforms, so DataSync can only do this on a best-effort basis.
Default value: BEST_EFFORT
BEST_EFFORT
: Attempt to preserve the per-fileAtime
value (recommended).
NONE
: IgnoreAtime
.
Note
If Atime
is set to BEST_EFFORT
, Mtime
must be set to PRESERVE
.
If Atime
is set to NONE
, Mtime
must also be NONE
.
Specifies whether to preserve metadata indicating the last time that a file was written to before the PREPARING
phase of your task execution. This option is required when you need to run the a task more than once.
Default Value: PRESERVE
PRESERVE
: Preserve originalMtime
(recommended)
NONE
: IgnoreMtime
.
Note
If Mtime
is set to PRESERVE
, Atime
must be set to BEST_EFFORT
.
If Mtime
is set to NONE
, Atime
must also be set to NONE
.
Specifies the POSIX user ID (UID) of the file's owner.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of UID and group ID (GID) (recommended).
NONE
: Ignore UID and GID.
Specifies the POSIX group ID (GID) of the file's owners.
For more information, see Metadata copied by DataSync.
Default value: INT_VALUE
. This preserves the integer value of the ID.
INT_VALUE
: Preserve the integer value of user ID (UID) and GID (recommended).
NONE
: Ignore UID and GID.
Specifies whether files in the destination location that don't exist in the source should be preserved. This option can affect your Amazon S3 storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync.
Default value: PRESERVE
PRESERVE
: Ignore such destination files (recommended).
REMOVE
: Delete destination files that aren’t present in the source.
Note
If you set this parameter to REMOVE
, you can't set TransferMode
to ALL
. When you transfer all data, DataSync doesn't scan your destination location and doesn't know what to delete.
Specifies whether DataSync should preserve the metadata of block and character devices in the source location and recreate the files with that device name and metadata on the destination. DataSync copies only the name and metadata of such devices.
Note
DataSync can't copy the actual contents of these devices because they're nonterminal and don't return an end-of-file (EOF) marker.
Default value: NONE
NONE
: Ignore special devices (recommended).
PRESERVE
: Preserve character and block device metadata. This option currently isn't supported for Amazon EFS.
Specifies which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
For more information, see Metadata copied by DataSync.
Default value: PRESERVE
PRESERVE
: Preserve POSIX-style permissions (recommended).
NONE
: Ignore permissions.
Note
DataSync can preserve extant permissions of a source location.
Limits the bandwidth used by a DataSync task. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576
( =1024*1024
).
Specifies whether tasks should be queued before executing the tasks. The default is ENABLED
, which means the tasks will be queued.
If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Specifies the type of logs that DataSync publishes to a Amazon CloudWatch Logs log group. To specify the log group, see CloudWatchLogGroupArn.
If you set LogLevel
to OFF
, no logs are published. BASIC
publishes logs on errors for individual files transferred. TRANSFER
publishes logs for every file or object that is transferred and integrity checked.
Determines whether DataSync transfers only the data and metadata that differ between the source and the destination location or transfers all the content from the source (without comparing what's in the destination).
CHANGED
: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL
: DataSync copies all source location content to the destination (without comparing what's in the destination).
Specifies which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations or between two FSx for Windows File Server locations. For more information, see how DataSync handles metadata.
Default value: OWNER_DACL
OWNER_DACL
: For each copied object, DataSync copies the following metadata:
OWNER_DACL_SACL
: For each copied object, DataSync copies the following metadata:
NONE
: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Specifies whether object tags are preserved when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE
value.
Default Value: PRESERVE
dict
Response Syntax
{}
Response Structure
Exceptions
DataSync.Client.exceptions.InvalidRequestException
DataSync.Client.exceptions.InternalException
The available paginators are:
DataSync.Paginator.ListAgents
DataSync.Paginator.ListLocations
DataSync.Paginator.ListTagsForResource
DataSync.Paginator.ListTaskExecutions
DataSync.Paginator.ListTasks
DataSync.Paginator.
ListAgents
¶paginator = client.get_paginator('list_agents')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from DataSync.Client.list_agents()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
{
'Agents': [
{
'AgentArn': 'string',
'Name': 'string',
'Status': 'ONLINE'|'OFFLINE'
},
],
}
Response Structure
ListAgentsResponse
A list of DataSync agents in your Amazon Web Services account in the Amazon Web Services Region specified in the request. The list is ordered by the agents' Amazon Resource Names (ARNs).
Represents a single entry in a list (or array) of DataSync agents when you call the ListAgents operation.
The Amazon Resource Name (ARN) of a DataSync agent.
The name of an agent.
The status of an agent. For more information, see DataSync agent statuses.
DataSync.Paginator.
ListLocations
¶paginator = client.get_paginator('list_locations')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from DataSync.Client.list_locations()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
Filters=[
{
'Name': 'LocationUri'|'LocationType'|'CreationTime',
'Values': [
'string',
],
'Operator': 'Equals'|'NotEquals'|'In'|'LessThanOrEqual'|'LessThan'|'GreaterThanOrEqual'|'GreaterThan'|'Contains'|'NotContains'|'BeginsWith'
},
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
You can use API filters to narrow down the list of resources returned by ListLocations
. For example, to retrieve all tasks on a specific source location, you can use ListLocations
with filter name LocationType S3
and Operator Equals
.
Narrow down the list of resources returned by ListLocations
. For example, to see all your Amazon S3 locations, create a filter using "Name": "LocationType"
, "Operator": "Equals"
, and "Values": "S3"
.
For more information, see filtering resources.
The name of the filter being used. Each API call supports a list of filters that are available for it (for example, LocationType
for ListLocations
).
The values that you want to filter for. For example, you might want to display only Amazon S3 locations.
The operator that is used to compare filter values (for example, Equals
or Contains
).
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'Locations': [
{
'LocationArn': 'string',
'LocationUri': 'string'
},
],
}
Response Structure
(dict) --
ListLocationsResponse
Locations (list) --
An array that contains a list of locations.
(dict) --
Represents a single entry in a list of locations. LocationListEntry
returns an array that contains a list of locations when the ListLocations operation is called.
LocationArn (string) --
The Amazon Resource Name (ARN) of the location. For Network File System (NFS) or Amazon EFS, the location is the export path. For Amazon S3, the location is the prefix path that you want to mount and use as the root of the location.
LocationUri (string) --
Represents a list of URIs of a location. LocationUri
returns an array that contains a list of locations when the ListLocations operation is called.
Format: TYPE://GLOBAL_ID/SUBDIR
.
TYPE designates the type of location (for example, nfs
or s3
).
GLOBAL_ID is the globally unique identifier of the resource that backs the location. An example for EFS is us-east-2.fs-abcd1234
. An example for Amazon S3 is the bucket name, such as myBucket
. An example for NFS is a valid IPv4 address or a hostname that is compliant with Domain Name Service (DNS).
SUBDIR is a valid file system path, delimited by forward slashes as is the *nix convention. For NFS and Amazon EFS, it's the export path to mount the location. For Amazon S3, it's the prefix path that you mount to and treat as the root of the location.
DataSync.Paginator.
ListTagsForResource
¶paginator = client.get_paginator('list_tags_for_resource')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from DataSync.Client.list_tags_for_resource()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ResourceArn='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the resource that you want tag information on.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
],
}
Response Structure
(dict) --
ListTagsForResourceResponse
Tags (list) --
An array of tags applied to the specified resource.
(dict) --
A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.
Key (string) --
The key for an Amazon Web Services resource tag.
Value (string) --
The value for an Amazon Web Services resource tag.
DataSync.Paginator.
ListTaskExecutions
¶paginator = client.get_paginator('list_task_executions')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from DataSync.Client.list_task_executions()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
TaskArn='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'TaskExecutions': [
{
'TaskExecutionArn': 'string',
'Status': 'QUEUED'|'LAUNCHING'|'PREPARING'|'TRANSFERRING'|'VERIFYING'|'SUCCESS'|'ERROR'
},
],
}
Response Structure
(dict) --
ListTaskExecutionsResponse
TaskExecutions (list) --
A list of executed tasks.
(dict) --
Represents a single entry in a list of task executions. TaskExecutionListEntry
returns an array that contains a list of specific invocations of a task when the ListTaskExecutions operation is called.
TaskExecutionArn (string) --
The Amazon Resource Name (ARN) of the task that was executed.
Status (string) --
The status of a task execution.
DataSync.Paginator.
ListTasks
¶paginator = client.get_paginator('list_tasks')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from DataSync.Client.list_tasks()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
Filters=[
{
'Name': 'LocationId'|'CreationTime',
'Values': [
'string',
],
'Operator': 'Equals'|'NotEquals'|'In'|'LessThanOrEqual'|'LessThan'|'GreaterThanOrEqual'|'GreaterThan'|'Contains'|'NotContains'|'BeginsWith'
},
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
You can use API filters to narrow down the list of resources returned by ListTasks
. For example, to retrieve all tasks on a specific source location, you can use ListTasks
with filter name LocationId
and Operator Equals
with the ARN for the location.
You can use API filters to narrow down the list of resources returned by ListTasks
. For example, to retrieve all tasks on a source location, you can use ListTasks
with filter name LocationId
and Operator Equals
with the ARN for the location.
For more information, see filtering DataSync resources.
The name of the filter being used. Each API call supports a list of filters that are available for it. For example, LocationId
for ListTasks
.
The values that you want to filter for. For example, you might want to display only tasks for a specific destination location.
The operator that is used to compare filter values (for example, Equals
or Contains
).
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'Tasks': [
{
'TaskArn': 'string',
'Status': 'AVAILABLE'|'CREATING'|'QUEUED'|'RUNNING'|'UNAVAILABLE',
'Name': 'string'
},
],
}
Response Structure
(dict) --
ListTasksResponse
Tasks (list) --
A list of all the tasks that are returned.
(dict) --
Represents a single entry in a list of tasks. TaskListEntry
returns an array that contains a list of tasks when the ListTasks operation is called. A task includes the source and destination file systems to sync and the options to use for the tasks.
TaskArn (string) --
The Amazon Resource Name (ARN) of the task.
Status (string) --
The status of the task.
Name (string) --
The name of the task.