DataSync

Table of Contents

Client

class 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 Simple Storage Service (Amazon S3) or Amazon Elastic File System (Amazon EFS).

This API interface reference for DataSync contains documentation for a programming interface that you can use to manage DataSync.

import boto3

client = boto3.client('datasync')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is 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").
Returns
True if the operation can be paginated, False otherwise.
cancel_task_execution(**kwargs)

Cancels execution of a task.

When you cancel a task execution, the transfer of some files is abruptly interrupted. The contents of files that are transferred to the destination might be incomplete or inconsistent with the source files. However, if you start a new task execution on the same task and you allow the task execution to complete, file content on the destination is complete and consistent. This applies to other unexpected failures that interrupt a task execution. In all of these cases, DataSync successfully complete the transfer when you start the next task execution.

See also: AWS API Documentation

Request Syntax

response = client.cancel_task_execution(
    TaskExecutionArn='string'
)
Parameters
TaskExecutionArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the task execution to cancel.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
create_agent(**kwargs)

Activates an DataSync agent that you have deployed on your host. 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',
    ]
)
Parameters
  • ActivationKey (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.

  • AgentName (string) -- The name you configured for your agent. This value is a text reference that is used to identify the agent in the console.
  • Tags (list) --

    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: + - = . _ : / @.

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

  • VpcEndpointId (string) --

    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 .

  • SubnetArns (list) --

    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.

    • (string) --
  • SecurityGroupArns (list) --

    The ARNs of the security groups used to protect your data transfer task subnets. See SecurityGroupArns .

    • (string) --
Return type

dict

Returns

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.

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'
        },
    ]
)
Parameters
  • Subdirectory (string) --

    A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from the EFS source location or write data to the EFS destination. By default, DataSync uses the root directory.

    Note

    Subdirectory must be specified with forward slashes. For example, /path/to/folder .

  • EfsFilesystemArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) for the Amazon EFS file system.

  • Ec2Config (dict) --

    [REQUIRED]

    The subnet and security group that the Amazon EFS file system uses. The security group that you provide needs to be able to communicate with the security group on the mount target in the subnet specified.

    The exact relationship between security group M (of the mount target) and security group S (which you provide for DataSync to use at this stage) is as follows:

    • Security group M (which you associate with the mount target) must allow inbound access for the Transmission Control Protocol (TCP) on the NFS port (2049) from security group S. You can enable inbound connections either by IP address (CIDR range) or security group.
    • Security group S (provided to DataSync to access EFS) should have a rule that enables outbound connections to the NFS port on one of the file system’s mount targets. You can enable outbound connections either by IP address (CIDR range) or security group. For information about security groups and mount targets, see Security Groups for Amazon EC2 Instances and Mount Targets in the Amazon EFS User Guide.
    • SubnetArn (string) -- [REQUIRED]

      The ARN of the subnet that DataSync uses to access the target EFS file system.

    • SecurityGroupArns (list) -- [REQUIRED]

      The Amazon Resource Names (ARNs) of the security groups that are configured for the Amazon EC2 resource.

      • (string) --
  • Tags (list) --

    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.

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

Return type

dict

Returns

Response Syntax

{
    'LocationArn': 'string'
}

Response Structure

  • (dict) --

    CreateLocationEfs

    • LocationArn (string) --

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

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'
        },
    ]
)
Parameters
  • FsxFilesystemArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) for the FSx for Lustre file system.

  • SecurityGroupArns (list) --

    [REQUIRED]

    The Amazon Resource Names (ARNs) of the security groups that are used to configure the FSx for Lustre file system.

    • (string) --
  • Subdirectory (string) -- A subdirectory in the location's path. This subdirectory in the FSx for Lustre file system is used to read data from the FSx for Lustre source location or write data to the FSx for Lustre destination.
  • Tags (list) --

    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.

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

Return type

dict

Returns

Response Syntax

{
    'LocationArn': 'string'
}

Response Structure

  • (dict) --

    • 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_open_zfs(**kwargs)

Creates an endpoint for an Amazon FSx for OpenZFS file system.

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'
            }
        }
    },
    SecurityGroupArns=[
        'string',
    ],
    Subdirectory='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • FsxFilesystemArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the FSx for OpenZFS file system.

  • Protocol (dict) --

    [REQUIRED]

    The type of protocol that DataSync uses to access your file system.

    • NFS (dict) --

      Represents the Network File System (NFS) protocol that DataSync uses to access your FSx for OpenZFS file system.

      • MountOptions (dict) --

        Represents the mount options that are available for DataSync to access an NFS location.

        • Version (string) --

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

          You can specify the following NFS versions:

          • **NFSv3 ** - 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. Version 4.1 also includes all features available in version 4.0.
  • SecurityGroupArns (list) --

    [REQUIRED]

    The ARNs of the security groups that are used to configure the FSx for OpenZFS file system.

    • (string) --
  • Subdirectory (string) -- A subdirectory in the location's path that must begin with /fsx . DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).
  • Tags (list) --

    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.

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

Return type

dict

Returns

Response Syntax

{
    'LocationArn': 'string'
}

Response Structure

  • (dict) --

    • 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'
)
Parameters
  • Subdirectory (string) -- A subdirectory in the location's path. This subdirectory in the Amazon FSx for Windows File Server file system is used to read data from the Amazon FSx for Windows File Server source location or write data to the FSx for Windows File Server destination.
  • FsxFilesystemArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) for the FSx for Windows File Server file system.

  • SecurityGroupArns (list) --

    [REQUIRED]

    The ARNs of the security groups that are used to configure the FSx for Windows File Server file system.

    • (string) --
  • Tags (list) --

    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.

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

  • User (string) --

    [REQUIRED]

    The user who has the permissions to access files and folders in the FSx for Windows File Server file system.

    For information about choosing a user name that ensures sufficient permissions to files, folders, and metadata, see user .

  • Domain (string) -- The name of the Windows domain that the FSx for Windows File Server belongs to.
  • Password (string) --

    [REQUIRED]

    The password of the user who has the permissions to access files and folders in the FSx for Windows File Server file system.

Return type

dict

Returns

Response Syntax

{
    'LocationArn': 'string'
}

Response Structure

  • (dict) --

    • LocationArn (string) --

      The Amazon Resource Name (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'
        },
    ]
)
Parameters
  • Subdirectory (string) -- A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster. If the subdirectory isn't specified, it will default to / .
  • NameNodes (list) --

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

    • (dict) --

      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.

      • Hostname (string) -- [REQUIRED]

        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.

      • Port (integer) -- [REQUIRED]

        The port that the NameNode uses to listen to client requests.

  • BlockSize (integer) -- The size of data blocks to write into the HDFS cluster. The block size must be a multiple of 512 bytes. The default block size is 128 mebibytes (MiB).
  • ReplicationFactor (integer) -- The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.
  • KmsKeyProviderUri (string) -- The URI of the HDFS cluster's Key Management Server (KMS).
  • QopConfiguration (dict) --

    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.

    • RpcProtection (string) --

      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.

    • DataTransferProtection (string) --

      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.

  • AuthenticationType (string) --

    [REQUIRED]

    The type of authentication used to determine the identity of the user.

  • SimpleUser (string) --

    The user name used to identify the client on the host operating system.

    Note

    If SIMPLE is specified for AuthenticationType , this parameter is required.

  • KerberosPrincipal (string) --

    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.

  • KerberosKeytab (bytes) --

    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.

  • KerberosKrb5Conf (bytes) --

    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.

  • AgentArns (list) --

    [REQUIRED]

    The Amazon Resource Names (ARNs) of the agents that are used to connect to the HDFS cluster.

    • (string) --
  • Tags (list) --

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

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

Return type

dict

Returns

Response Syntax

{
    'LocationArn': 'string'
}

Response Structure

  • (dict) --

    • 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'
        },
    ]
)
Parameters
  • Subdirectory (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.

  • ServerHostname (string) --

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

  • OnPremConfig (dict) --

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

    • AgentArns (list) -- [REQUIRED]

      ARNs of the agents to use for an NFS location.

      • (string) --
  • MountOptions (dict) --

    The NFS mount options that DataSync can use to mount your NFS share.

    • Version (string) --

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

      You can specify the following NFS versions:

      • **NFSv3 ** - 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. Version 4.1 also includes all features available in version 4.0.
  • Tags (list) --

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

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

Return type

dict

Returns

Response Syntax

{
    'LocationArn': 'string'
}

Response Structure

  • (dict) --

    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 a self-managed object storage bucket. For more information about self-managed object storage locations, 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'
        },
    ]
)
Parameters
  • ServerHostname (string) --

    [REQUIRED]

    The name of the self-managed object storage server. This value is the IP address or Domain Name Service (DNS) name of the object storage server. An agent uses this hostname to mount the object storage server in a network.

  • ServerPort (integer) -- The port that your self-managed object storage server accepts inbound network traffic on. The server port is set by default to TCP 80 (HTTP) or TCP 443 (HTTPS). You can specify a custom port if your self-managed object storage server requires one.
  • ServerProtocol (string) -- The protocol that the object storage server uses to communicate. Valid values are HTTP or HTTPS.
  • Subdirectory (string) -- The subdirectory in the self-managed object storage server that is used to read data from.
  • BucketName (string) --

    [REQUIRED]

    The bucket on the self-managed object storage server that is used to read data from.

  • AccessKey (string) -- Optional. The access key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use AccessKey and SecretKey to provide the user name and password, respectively.
  • SecretKey (string) -- Optional. The secret key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use AccessKey and SecretKey to provide the user name and password, respectively.
  • AgentArns (list) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.

    • (string) --
  • Tags (list) --

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

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

Return type

dict

Returns

Response Syntax

{
    'LocationArn': 'string'
}

Response Structure

  • (dict) --

    CreateLocationObjectStorageResponse

    • LocationArn (string) --

      The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
create_location_s3(**kwargs)

Creates an endpoint for an Amazon S3 bucket.

For more information, see Create an Amazon S3 location in the DataSync User Guide .

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',
    S3Config={
        'BucketAccessRoleArn': 'string'
    },
    AgentArns=[
        'string',
    ],
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • Subdirectory (string) -- A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3 is used to read data from the S3 source location or write data to the S3 destination.
  • S3BucketArn (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.

  • S3StorageClass (string) --

    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 .

  • S3Config (dict) --

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

    • BucketAccessRoleArn (string) -- [REQUIRED]

      The ARN of the IAM role for accessing the S3 bucket.

  • AgentArns (list) --

    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 .

    • (string) --
  • Tags (list) --

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

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

Return type

dict

Returns

Response Syntax

{
    'LocationArn': 'string'
}

Response Structure

  • (dict) --

    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)

Defines a file system on a Server Message Block (SMB) server that can be read from or written to.

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'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • Subdirectory (string) --

    [REQUIRED]

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

    Note

    Subdirectory must be specified with forward slashes. For example, /path/to/folder .

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

  • ServerHostname (string) --

    [REQUIRED]

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

    Note

    This name must either be DNS-compliant or must be an IP version 4 (IPv4) address.

  • User (string) --

    [REQUIRED]

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

    For information about choosing a user name that ensures sufficient permissions to files, folders, and metadata, see user .

  • Domain (string) -- The name of the Windows domain that the SMB server belongs to.
  • Password (string) --

    [REQUIRED]

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

  • AgentArns (list) --

    [REQUIRED]

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

    • (string) --
  • MountOptions (dict) --

    The mount options used by DataSync to access the SMB server.

    • Version (string) --

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

  • Tags (list) --

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

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

Return type

dict

Returns

Response Syntax

{
    'LocationArn': 'string'
}

Response Structure

  • (dict) --

    CreateLocationSmbResponse

    • LocationArn (string) --

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

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
create_task(**kwargs)

Creates a task.

A task includes a source location and a destination location, and a configuration that specifies how data is transferred. A task always transfers data from the source location to the destination location. The configuration specifies options such as task scheduling, bandwidth limits, etc. A task is the complete definition of a data transfer.

When you create a task that transfers data between Amazon Web Services services in different Amazon Web Services Regions, one of the two locations that you specify must reside in the Region where DataSync is being used. The other location must be specified in a different Region.

You can transfer data between commercial Amazon Web Services Regions except for China, or between Amazon Web Services GovCloud (US) Regions.

Warning

When you use DataSync to copy files or objects between Amazon Web Services Regions, you pay for data transfer between Regions. This is billed as data transfer OUT from your source Region to your destination Region. For more information, see Data Transfer pricing .

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'
        },
    ]
)
Parameters
  • SourceLocationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the source location for the task.

  • DestinationLocationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of an Amazon Web Services storage resource's location.

  • CloudWatchLogGroupArn (string) -- The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.
  • Name (string) -- The name of a task. This value is a text reference that is used to identify the task in the console.
  • Options (dict) --

    The set of configuration options that control the behavior of a single execution of the task that occurs when you call StartTaskExecution . You can configure these options to preserve metadata such as user ID (UID) and group ID (GID), file permissions, data integrity verification, and so on.

    For each individual task execution, you can override these options by specifying the OverrideOptions before starting the task execution. For more information, see the StartTaskExecution operation.

    • VerifyMode (string) --

      A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. For more information, see Configure task settings .

      Default value: POINT_IN_TIME_CONSISTENT.

      ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.

      POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.

      NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.

    • OverwriteMode (string) --

      A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to NEVER a destination file 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 S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide .

    • Atime (string) --

      A file metadata value that shows the last time a file was accessed (that is, when the 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). However, Atime 's behavior is not 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-file Atime value (recommended).

      NONE: Ignore Atime .

      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.

    • Mtime (string) --

      A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase. This option is required for cases when you need to run the same task more than one time.

      Default Value: PRESERVE

      PRESERVE: Preserve original Mtime (recommended)

      NONE: Ignore Mtime .

      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.

    • Uid (string) --

      The POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, 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.

    • Gid (string) --

      The POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

    • PreserveDeletedFiles (string) --

      A value that specifies whether files in the destination that don't exist in the source file system should be preserved. This option can affect your 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 in the DataSync User Guide .

      Default value: PRESERVE.

      PRESERVE: Ignore such destination files (recommended).

      REMOVE: Delete destination files that aren’t present in the source.

    • PreserveDevices (string) --

      A value that determines whether DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.

      Note

      DataSync can't sync the actual contents of such devices, because they are 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 isn't currently supported for Amazon EFS.

    • PosixPermissions (string) --

      A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

    • BytesPerSecond (integer) --

      A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024 ).

    • TaskQueueing (string) --

      A value that determines whether tasks should be queued before executing the tasks. If set to ENABLED , the tasks will be queued. The default is ENABLED .

      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 .

    • LogLevel (string) --

      A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn . If set to OFF , no logs are published. BASIC publishes logs on errors for individual files transferred, and TRANSFER publishes logs for every file or object that is transferred and integrity checked.

    • TransferMode (string) --

      A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.

      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 to existing content on the destination.

    • SecurityDescriptorCopyFlags (string) --

      A value that determines 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 Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files .

      Default value: OWNER_DACL.

      OWNER_DACL : For each copied object, DataSync copies the following metadata:
      • Object owner.
      • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.

      When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

      OWNER_DACL_SACL : For each copied object, DataSync copies the following metadata:
      • Object owner.
      • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
      • NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

      Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user .

      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.
    • ObjectTags (string) --

      Specifies whether object tags are maintained when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE value.

      Default Value: PRESERVE

  • Excludes (list) --

    A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2" .

    • (dict) --

      Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

      • FilterType (string) --

        The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.

      • Value (string) --

        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

  • Schedule (dict) --

    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 .

    • ScheduleExpression (string) -- [REQUIRED]

      A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.

  • Tags (list) --

    The key-value pair that represents the tag that you want to add to the resource. The value can be an empty string.

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

  • Includes (list) --

    A list of filter rules that determines which files to include when running a task. The pattern contains a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2" .

    • (dict) --

      Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

      • FilterType (string) --

        The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.

      • Value (string) --

        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

Return type

dict

Returns

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'
)
Parameters
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.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

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'
)
Parameters
LocationArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the location to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
delete_task(**kwargs)

Deletes a task.

See also: AWS API Documentation

Request Syntax

response = client.delete_task(
    TaskArn='string'
)
Parameters
TaskArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the task to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
describe_agent(**kwargs)

Returns metadata such as the name, the network interfaces, and the status (that is, whether the agent is running or not) for an agent. To specify which agent to describe, use the Amazon Resource Name (ARN) of the agent in your request.

See also: AWS API Documentation

Request Syntax

response = client.describe_agent(
    AgentArn='string'
)
Parameters
AgentArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the agent to describe.

Return type
dict
Returns
Response Syntax
{
    '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

  • (dict) --

    DescribeAgentResponse

    • AgentArn (string) --

      The Amazon Resource Name (ARN) of the agent.

    • Name (string) --

      The name of the agent.

    • Status (string) --

      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.

    • LastConnectionTime (datetime) --

      The time that the agent last connected to DataSync.

    • CreationTime (datetime) --

      The time that the agent was activated (that is, created in your account).

    • EndpointType (string) --

      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.

    • PrivateLinkConfig (dict) --

      The subnet and the security group that DataSync used to access a VPC endpoint.

      • VpcEndpointId (string) --

        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.

      • PrivateLinkEndpoint (string) --

        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.

      • SubnetArns (list) --

        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.

        • (string) --
      • SecurityGroupArns (list) --

        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.

        • (string) --

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
describe_location_efs(**kwargs)

Returns metadata, such as the path information about an Amazon EFS location.

See also: AWS API Documentation

Request Syntax

response = client.describe_location_efs(
    LocationArn='string'
)
Parameters
LocationArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the EFS location to describe.

Return type
dict
Returns
Response Syntax
{
    'LocationArn': 'string',
    'LocationUri': 'string',
    'Ec2Config': {
        'SubnetArn': 'string',
        'SecurityGroupArns': [
            'string',
        ]
    },
    'CreationTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    DescribeLocationEfsResponse

    • LocationArn (string) --

      The Amazon Resource Name (ARN) of the EFS location that was described.

    • LocationUri (string) --

      The URL of the EFS location that was described.

    • Ec2Config (dict) --

      The subnet that DataSync uses to access target EFS file system. The subnet must have at least one mount target for that file system. The security group that you provide needs to be able to communicate with the security group on the mount target in the subnet specified.

      • SubnetArn (string) --

        The ARN of the subnet that DataSync uses to access the target EFS file system.

      • SecurityGroupArns (list) --

        The Amazon Resource Names (ARNs) of the security groups that are configured for the Amazon EC2 resource.

        • (string) --
    • CreationTime (datetime) --

      The time that the EFS location was created.

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
describe_location_fsx_lustre(**kwargs)

Returns metadata about an Amazon FSx for Lustre location, such as information about its path.

See also: AWS API Documentation

Request Syntax

response = client.describe_location_fsx_lustre(
    LocationArn='string'
)
Parameters
LocationArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the FSx for Lustre location to describe.

Return type
dict
Returns
Response Syntax
{
    'LocationArn': 'string',
    'LocationUri': 'string',
    'SecurityGroupArns': [
        'string',
    ],
    'CreationTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --
    • LocationArn (string) --

      The Amazon Resource Name (ARN) of the FSx for Lustre location that was described.

    • LocationUri (string) --

      The URI of the FSx for Lustre location that was described.

    • SecurityGroupArns (list) --

      The Amazon Resource Names (ARNs) of the security groups that are configured for the FSx for Lustre file system.

      • (string) --
    • CreationTime (datetime) --

      The time that the FSx for Lustre location was created.

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
describe_location_fsx_open_zfs(**kwargs)

Returns metadata about an Amazon FSx for OpenZFS location, such as information about its path.

See also: AWS API Documentation

Request Syntax

response = client.describe_location_fsx_open_zfs(
    LocationArn='string'
)
Parameters
LocationArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the FSx for OpenZFS location to describe.

Return type
dict
Returns
Response Syntax
{
    'LocationArn': 'string',
    'LocationUri': 'string',
    'SecurityGroupArns': [
        'string',
    ],
    'Protocol': {
        'NFS': {
            'MountOptions': {
                'Version': 'AUTOMATIC'|'NFS3'|'NFS4_0'|'NFS4_1'
            }
        }
    },
    'CreationTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --
    • LocationArn (string) --

      The ARN of the FSx for OpenZFS location that was described.

    • LocationUri (string) --

      The uniform resource identifier (URI) of the FSx for OpenZFS location that was described.

      Example: fsxz://us-west-2.fs-1234567890abcdef02/fsx/folderA/folder

    • SecurityGroupArns (list) --

      The ARNs of the security groups that are configured for the FSx for OpenZFS file system.

      • (string) --
    • Protocol (dict) --

      The type of protocol that DataSync uses to access your file system.

      • NFS (dict) --

        Represents the Network File System (NFS) protocol that DataSync uses to access your FSx for OpenZFS file system.

        • MountOptions (dict) --

          Represents the mount options that are available for DataSync to access an NFS location.

          • Version (string) --

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

            You can specify the following NFS versions:

            • **NFSv3 ** - 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. Version 4.1 also includes all features available in version 4.0.
    • CreationTime (datetime) --

      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'
)
Parameters
LocationArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the FSx for Windows File Server location to describe.

Return type
dict
Returns
Response Syntax
{
    'LocationArn': 'string',
    'LocationUri': 'string',
    'SecurityGroupArns': [
        'string',
    ],
    'CreationTime': datetime(2015, 1, 1),
    'User': 'string',
    'Domain': 'string'
}

Response Structure

  • (dict) --
    • LocationArn (string) --

      The Amazon Resource Name (ARN) of the FSx for Windows File Server location that was described.

    • LocationUri (string) --

      The URL of the FSx for Windows File Server location that was described.

    • SecurityGroupArns (list) --

      The Amazon Resource Names (ARNs) of the security groups that are configured for the FSx for Windows File Server file system.

      • (string) --
    • CreationTime (datetime) --

      The time that the FSx for Windows File Server location was created.

    • User (string) --

      The user who has the permissions to access files and folders in the FSx for Windows File Server file system.

    • Domain (string) --

      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'
)
Parameters
LocationArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the HDFS cluster location to describe.

Return type
dict
Returns
Response Syntax
{
    '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

  • (dict) --
    • LocationArn (string) --

      The ARN of the HDFS cluster location.

    • LocationUri (string) --

      The URI of the HDFS cluster location.

    • NameNodes (list) --

      The NameNode that manage the HDFS namespace.

      • (dict) --

        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.

        • Hostname (string) --

          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.

        • Port (integer) --

          The port that the NameNode uses to listen to client requests.

    • BlockSize (integer) --

      The size of the data blocks to write into the HDFS cluster.

    • ReplicationFactor (integer) --

      The number of DataNodes to replicate the data to when writing to the HDFS cluster.

    • KmsKeyProviderUri (string) --

      The URI of the HDFS cluster's Key Management Server (KMS).

    • QopConfiguration (dict) --

      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.

      • RpcProtection (string) --

        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.

      • DataTransferProtection (string) --

        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.

    • AuthenticationType (string) --

      The type of authentication used to determine the identity of the user.

    • SimpleUser (string) --

      The user name used to identify the client on the host operating system. This parameter is used if the AuthenticationType is defined as SIMPLE .

    • KerberosPrincipal (string) --

      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 .

    • AgentArns (list) --

      The ARNs of the agents that are used to connect to the HDFS cluster.

      • (string) --
    • CreationTime (datetime) --

      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'
)
Parameters
LocationArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the NFS location to describe.

Return type
dict
Returns
Response Syntax
{
    'LocationArn': 'string',
    'LocationUri': 'string',
    'OnPremConfig': {
        'AgentArns': [
            'string',
        ]
    },
    'MountOptions': {
        'Version': 'AUTOMATIC'|'NFS3'|'NFS4_0'|'NFS4_1'
    },
    'CreationTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    DescribeLocationNfsResponse

    • LocationArn (string) --

      The Amazon Resource Name (ARN) of the NFS location that was described.

    • LocationUri (string) --

      The URL of the source NFS location that was described.

    • OnPremConfig (dict) --

      A list of Amazon Resource Names (ARNs) of agents to use for a Network File System (NFS) location.

      • AgentArns (list) --

        ARNs of the agents to use for an NFS location.

        • (string) --
    • MountOptions (dict) --

      The NFS mount options that DataSync used to mount your NFS share.

      • Version (string) --

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

        You can specify the following NFS versions:

        • **NFSv3 ** - 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. Version 4.1 also includes all features available in version 4.0.
    • CreationTime (datetime) --

      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 a self-managed object storage server location. For more information about self-managed object storage locations, see Creating a location for object storage .

See also: AWS API Documentation

Request Syntax

response = client.describe_location_object_storage(
    LocationArn='string'
)
Parameters
LocationArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the self-managed object storage server location that was described.

Return type
dict
Returns
Response Syntax
{
    'LocationArn': 'string',
    'LocationUri': 'string',
    'AccessKey': 'string',
    'ServerPort': 123,
    'ServerProtocol': 'HTTPS'|'HTTP',
    'AgentArns': [
        'string',
    ],
    'CreationTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    DescribeLocationObjectStorageResponse

    • LocationArn (string) --

      The Amazon Resource Name (ARN) of the self-managed object storage server location to describe.

    • LocationUri (string) --

      The URL of the source self-managed object storage server location that was described.

    • AccessKey (string) --

      Optional. The access key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use AccessKey and SecretKey to provide the user name and password, respectively.

    • ServerPort (integer) --

      The port that your self-managed object storage server accepts inbound network traffic on. The server port is set by default to TCP 80 (HTTP) or TCP 443 (HTTPS).

    • ServerProtocol (string) --

      The protocol that the object storage server uses to communicate. Valid values are HTTP or HTTPS.

    • AgentArns (list) --

      The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.

      • (string) --
    • CreationTime (datetime) --

      The time that the self-managed object storage server agent was created.

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'
)
Parameters
LocationArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe.

Return type
dict
Returns
Response Syntax
{
    'LocationArn': 'string',
    'LocationUri': 'string',
    'S3StorageClass': 'STANDARD'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER'|'DEEP_ARCHIVE'|'OUTPOSTS',
    'S3Config': {
        'BucketAccessRoleArn': 'string'
    },
    'AgentArns': [
        'string',
    ],
    'CreationTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    DescribeLocationS3Response

    • LocationArn (string) --

      The Amazon Resource Name (ARN) of the Amazon S3 bucket or access point.

    • LocationUri (string) --

      The URL of the Amazon S3 location that was described.

    • S3StorageClass (string) --

      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 .

    • S3Config (dict) --

      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 .

      • BucketAccessRoleArn (string) --

        The ARN of the IAM role for accessing the S3 bucket.

    • AgentArns (list) --

      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 .

      • (string) --
    • CreationTime (datetime) --

      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'
)
Parameters
LocationArn (string) --

[REQUIRED]

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

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

Response Structure

  • (dict) --

    DescribeLocationSmbResponse

    • LocationArn (string) --

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

    • LocationUri (string) --

      The URL of the source SMB location that was described.

    • AgentArns (list) --

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

      • (string) --
    • User (string) --

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

    • Domain (string) --

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

    • MountOptions (dict) --

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

      • Version (string) --

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

    • CreationTime (datetime) --

      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'
)
Parameters
TaskArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the task to describe.

Return type
dict
Returns
Response Syntax
{
    '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

  • (dict) --

    DescribeTaskResponse

    • TaskArn (string) --

      The Amazon Resource Name (ARN) of the task that was described.

    • Status (string) --

      The status of the task that was described.

      For detailed information about task execution statuses, see Understanding Task Statuses in the DataSync User Guide .

    • Name (string) --

      The name of the task that was described.

    • CurrentTaskExecutionArn (string) --

      The Amazon Resource Name (ARN) of the task execution that is syncing files.

    • SourceLocationArn (string) --

      The Amazon Resource Name (ARN) of the source file system's location.

    • DestinationLocationArn (string) --

      The Amazon Resource Name (ARN) of the Amazon Web Services storage resource's location.

    • CloudWatchLogGroupArn (string) --

      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 .

    • SourceNetworkInterfaceArns (list) --

      The Amazon Resource Names (ARNs) of the source elastic network interfaces (ENIs) that were created for your subnet.

      • (string) --
    • DestinationNetworkInterfaceArns (list) --

      The Amazon Resource Names (ARNs) of the destination elastic network interfaces (ENIs) that were created for your subnet.

      • (string) --
    • Options (dict) --

      The set of configuration options that control the behavior of a single execution of the task that occurs when you call StartTaskExecution . You can configure these options to preserve metadata such as user ID (UID) and group (GID), file permissions, data integrity verification, and so on.

      For each individual task execution, you can override these options by specifying the overriding OverrideOptions value to StartTaskExecution operation.

      • VerifyMode (string) --

        A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. For more information, see Configure task settings .

        Default value: POINT_IN_TIME_CONSISTENT.

        ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.

        POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.

        NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.

      • OverwriteMode (string) --

        A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to NEVER a destination file 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 S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide .

      • Atime (string) --

        A file metadata value that shows the last time a file was accessed (that is, when the 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). However, Atime 's behavior is not 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-file Atime value (recommended).

        NONE: Ignore Atime .

        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.

      • Mtime (string) --

        A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase. This option is required for cases when you need to run the same task more than one time.

        Default Value: PRESERVE

        PRESERVE: Preserve original Mtime (recommended)

        NONE: Ignore Mtime .

        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.

      • Uid (string) --

        The POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, 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.

      • Gid (string) --

        The POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

      • PreserveDeletedFiles (string) --

        A value that specifies whether files in the destination that don't exist in the source file system should be preserved. This option can affect your 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 in the DataSync User Guide .

        Default value: PRESERVE.

        PRESERVE: Ignore such destination files (recommended).

        REMOVE: Delete destination files that aren’t present in the source.

      • PreserveDevices (string) --

        A value that determines whether DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.

        Note

        DataSync can't sync the actual contents of such devices, because they are 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 isn't currently supported for Amazon EFS.

      • PosixPermissions (string) --

        A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

      • BytesPerSecond (integer) --

        A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024 ).

      • TaskQueueing (string) --

        A value that determines whether tasks should be queued before executing the tasks. If set to ENABLED , the tasks will be queued. The default is ENABLED .

        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 .

      • LogLevel (string) --

        A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn . If set to OFF , no logs are published. BASIC publishes logs on errors for individual files transferred, and TRANSFER publishes logs for every file or object that is transferred and integrity checked.

      • TransferMode (string) --

        A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.

        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 to existing content on the destination.

      • SecurityDescriptorCopyFlags (string) --

        A value that determines 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 Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files .

        Default value: OWNER_DACL.

        OWNER_DACL : For each copied object, DataSync copies the following metadata:
        • Object owner.
        • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.

        When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

        OWNER_DACL_SACL : For each copied object, DataSync copies the following metadata:
        • Object owner.
        • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
        • NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

        Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user .

        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.
      • ObjectTags (string) --

        Specifies whether object tags are maintained when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE value.

        Default Value: PRESERVE

    • Excludes (list) --

      A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2" .

      • (dict) --

        Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

        • FilterType (string) --

          The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.

        • Value (string) --

          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

    • Schedule (dict) --

      The schedule used to periodically transfer files from a source to a destination location.

      • ScheduleExpression (string) --

        A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.

    • ErrorCode (string) --

      Errors that DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.

    • ErrorDetail (string) --

      Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.

    • CreationTime (datetime) --

      The time that the task was created.

    • Includes (list) --

      A list of filter rules that determines which files to include when running a task. The pattern contains a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2 ".

      • (dict) --

        Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

        • FilterType (string) --

          The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.

        • Value (string) --

          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'
)
Parameters
TaskExecutionArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the task that is being executed.

Return type
dict
Returns
Response Syntax
{
    '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'
    }
}

Response Structure

  • (dict) --

    DescribeTaskExecutionResponse

    • TaskExecutionArn (string) --

      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 .

    • Status (string) --

      The status of the task execution.

      For detailed information about task execution statuses, see Understanding Task Statuses in the DataSync User Guide.

    • Options (dict) --

      Represents the options that are available to control the behavior of a StartTaskExecution operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and also overwriting files in the destination, data integrity verification, and so on.

      A task has a set of default options associated with it. If you don't specify an option in StartTaskExecution , the default value is used. You can override the defaults options on each task execution by specifying an overriding Options value to StartTaskExecution .

      • VerifyMode (string) --

        A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. For more information, see Configure task settings .

        Default value: POINT_IN_TIME_CONSISTENT.

        ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.

        POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.

        NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.

      • OverwriteMode (string) --

        A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to NEVER a destination file 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 S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide .

      • Atime (string) --

        A file metadata value that shows the last time a file was accessed (that is, when the 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). However, Atime 's behavior is not 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-file Atime value (recommended).

        NONE: Ignore Atime .

        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.

      • Mtime (string) --

        A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase. This option is required for cases when you need to run the same task more than one time.

        Default Value: PRESERVE

        PRESERVE: Preserve original Mtime (recommended)

        NONE: Ignore Mtime .

        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.

      • Uid (string) --

        The POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, 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.

      • Gid (string) --

        The POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

      • PreserveDeletedFiles (string) --

        A value that specifies whether files in the destination that don't exist in the source file system should be preserved. This option can affect your 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 in the DataSync User Guide .

        Default value: PRESERVE.

        PRESERVE: Ignore such destination files (recommended).

        REMOVE: Delete destination files that aren’t present in the source.

      • PreserveDevices (string) --

        A value that determines whether DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.

        Note

        DataSync can't sync the actual contents of such devices, because they are 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 isn't currently supported for Amazon EFS.

      • PosixPermissions (string) --

        A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

      • BytesPerSecond (integer) --

        A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024 ).

      • TaskQueueing (string) --

        A value that determines whether tasks should be queued before executing the tasks. If set to ENABLED , the tasks will be queued. The default is ENABLED .

        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 .

      • LogLevel (string) --

        A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn . If set to OFF , no logs are published. BASIC publishes logs on errors for individual files transferred, and TRANSFER publishes logs for every file or object that is transferred and integrity checked.

      • TransferMode (string) --

        A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.

        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 to existing content on the destination.

      • SecurityDescriptorCopyFlags (string) --

        A value that determines 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 Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files .

        Default value: OWNER_DACL.

        OWNER_DACL : For each copied object, DataSync copies the following metadata:
        • Object owner.
        • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.

        When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

        OWNER_DACL_SACL : For each copied object, DataSync copies the following metadata:
        • Object owner.
        • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
        • NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

        Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user .

        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.
      • ObjectTags (string) --

        Specifies whether object tags are maintained when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE value.

        Default Value: PRESERVE

    • Excludes (list) --

      A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example: "/folder1|/folder2"

      • (dict) --

        Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

        • FilterType (string) --

          The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.

        • Value (string) --

          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

    • Includes (list) --

      A list of filter rules that determines which files to include when running a task. The list 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"

      • (dict) --

        Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

        • FilterType (string) --

          The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.

        • Value (string) --

          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

    • StartTime (datetime) --

      The time that the task execution was started.

    • EstimatedFilesToTransfer (integer) --

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

    • EstimatedBytesToTransfer (integer) --

      The estimated physical number of bytes that is to be transferred over the network.

    • FilesTransferred (integer) --

      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. 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 . This value can also be greater than EstimatedFilesTransferred in some cases. 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.

    • BytesWritten (integer) --

      The number of logical bytes written to the destination Amazon Web Services storage resource.

    • BytesTransferred (integer) --

      The physical number of bytes transferred over the network.

    • Result (dict) --

      The result of the task execution.

      • PrepareDuration (integer) --

        The total time in milliseconds that DataSync spent in the PREPARING phase.

      • PrepareStatus (string) --

        The status of the PREPARING phase.

      • TotalDuration (integer) --

        The total time in milliseconds that DataSync took to transfer the file from the source to the destination location.

      • TransferDuration (integer) --

        The total time in milliseconds that DataSync spent in the TRANSFERRING phase.

      • TransferStatus (string) --

        The status of the TRANSFERRING phase.

      • VerifyDuration (integer) --

        The total time in milliseconds that DataSync spent in the VERIFYING phase.

      • VerifyStatus (string) --

        The status of the VERIFYING phase.

      • ErrorCode (string) --

        Errors that DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.

      • ErrorDetail (string) --

        Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is 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").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_agents(**kwargs)

Returns a list of agents owned by an Amazon Web Services account in the Amazon Web Services Region specified in the request. The returned list is ordered by agent Amazon Resource Name (ARN).

By default, this operation returns a maximum of 100 agents. This operation supports pagination that enables you to optionally reduce the number of agents returned in a response.

If you have more agents than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a marker that you can specify in your next request to fetch the next page of agents.

See also: AWS API Documentation

Request Syntax

response = client.list_agents(
    MaxResults=123,
    NextToken='string'
)
Parameters
  • MaxResults (integer) -- The maximum number of agents to list.
  • NextToken (string) -- An opaque string that indicates the position at which to begin the next list of agents.
Return type

dict

Returns

Response Syntax

{
    'Agents': [
        {
            'AgentArn': 'string',
            'Name': 'string',
            'Status': 'ONLINE'|'OFFLINE'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    ListAgentsResponse

    • Agents (list) --

      A list of agents in your account.

      • (dict) --

        Represents a single entry in a list of agents. AgentListEntry returns an array that contains a list of agents when the ListAgents operation is called.

        • AgentArn (string) --

          The Amazon Resource Name (ARN) of the agent.

        • Name (string) --

          The name of the agent.

        • Status (string) --

          The status of the agent.

    • NextToken (string) --

      An opaque string that indicates the position at which to begin returning the next list of agents.

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'
        },
    ]
)
Parameters
  • MaxResults (integer) -- The maximum number of locations to return.
  • NextToken (string) -- An opaque string that indicates the position at which to begin the next list of locations.
  • Filters (list) --

    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 .

    • (dict) --

      You can use API filters to narrow down the list of resources returned by ListLocations . For example, to retrieve all your Amazon S3 locations, you can use ListLocations with filter name LocationType S3 and Operator Equals .

      • Name (string) -- [REQUIRED]

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

      • Values (list) -- [REQUIRED]

        The values that you want to filter for. For example, you might want to display only Amazon S3 locations.

        • (string) --
      • Operator (string) -- [REQUIRED]

        The operator that is used to compare filter values (for example, Equals or Contains ). For more about API filtering operators, see API filters for ListTasks and ListLocations .

Return type

dict

Returns

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
list_tags_for_resource(**kwargs)

Returns all the tags associated with a specified resource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    ResourceArn='string',
    MaxResults=123,
    NextToken='string'
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource whose tags to list.

  • MaxResults (integer) -- The maximum number of locations to return.
  • NextToken (string) -- An opaque string that indicates the position at which to begin the next list of locations.
Return type

dict

Returns

Response Syntax

{
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    ListTagsForResourceResponse

    • Tags (list) --

      Array of resource tags.

      • (dict) --

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

        • Key (string) --

          The key for an Amazon Web Services resource tag.

        • Value (string) --

          The value for an Amazon Web Services resource tag.

    • NextToken (string) --

      An opaque string that indicates the position at which to begin returning the next list of resource tags.

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'
)
Parameters
  • TaskArn (string) -- The Amazon Resource Name (ARN) of the task whose tasks you want to list.
  • MaxResults (integer) -- The maximum number of executed tasks to list.
  • NextToken (string) -- An opaque string that indicates the position at which to begin the next list of the executed tasks.
Return type

dict

Returns

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 all the tasks.

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'
        },
    ]
)
Parameters
  • MaxResults (integer) -- The maximum number of tasks to return.
  • NextToken (string) -- An opaque string that indicates the position at which to begin the next list of tasks.
  • Filters (list) --

    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.

    • (dict) --

      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.

      • Name (string) -- [REQUIRED]

        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 .

      • Values (list) -- [REQUIRED]

        The values that you want to filter for. For example, you might want to display only tasks for a specific destination location.

        • (string) --
      • Operator (string) -- [REQUIRED]

        The operator that is used to compare filter values (for example, Equals or Contains ). For more about API filtering operators, see API filters for ListTasks and ListLocations .

Return type

dict

Returns

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 a specific invocation of a task. A TaskExecution value represents an individual run of a task. Each task can have at most one TaskExecution at a time.

TaskExecution has the following transition phases: INITIALIZING | PREPARING | TRANSFERRING | VERIFYING | SUCCESS/FAILURE.

For detailed information, see the Task Execution section in the Components and Terminology topic in the DataSync User Guide .

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'
        },
    ]
)
Parameters
  • TaskArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the task to start.

  • OverrideOptions (dict) --

    Represents the options that are available to control the behavior of a StartTaskExecution operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and also overwriting files in the destination, data integrity verification, and so on.

    A task has a set of default options associated with it. If you don't specify an option in StartTaskExecution , the default value is used. You can override the defaults options on each task execution by specifying an overriding Options value to StartTaskExecution .

    • VerifyMode (string) --

      A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. For more information, see Configure task settings .

      Default value: POINT_IN_TIME_CONSISTENT.

      ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.

      POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.

      NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.

    • OverwriteMode (string) --

      A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to NEVER a destination file 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 S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide .

    • Atime (string) --

      A file metadata value that shows the last time a file was accessed (that is, when the 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). However, Atime 's behavior is not 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-file Atime value (recommended).

      NONE: Ignore Atime .

      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.

    • Mtime (string) --

      A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase. This option is required for cases when you need to run the same task more than one time.

      Default Value: PRESERVE

      PRESERVE: Preserve original Mtime (recommended)

      NONE: Ignore Mtime .

      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.

    • Uid (string) --

      The POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, 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.

    • Gid (string) --

      The POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

    • PreserveDeletedFiles (string) --

      A value that specifies whether files in the destination that don't exist in the source file system should be preserved. This option can affect your 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 in the DataSync User Guide .

      Default value: PRESERVE.

      PRESERVE: Ignore such destination files (recommended).

      REMOVE: Delete destination files that aren’t present in the source.

    • PreserveDevices (string) --

      A value that determines whether DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.

      Note

      DataSync can't sync the actual contents of such devices, because they are 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 isn't currently supported for Amazon EFS.

    • PosixPermissions (string) --

      A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

    • BytesPerSecond (integer) --

      A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024 ).

    • TaskQueueing (string) --

      A value that determines whether tasks should be queued before executing the tasks. If set to ENABLED , the tasks will be queued. The default is ENABLED .

      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 .

    • LogLevel (string) --

      A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn . If set to OFF , no logs are published. BASIC publishes logs on errors for individual files transferred, and TRANSFER publishes logs for every file or object that is transferred and integrity checked.

    • TransferMode (string) --

      A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.

      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 to existing content on the destination.

    • SecurityDescriptorCopyFlags (string) --

      A value that determines 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 Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files .

      Default value: OWNER_DACL.

      OWNER_DACL : For each copied object, DataSync copies the following metadata:
      • Object owner.
      • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.

      When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

      OWNER_DACL_SACL : For each copied object, DataSync copies the following metadata:
      • Object owner.
      • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
      • NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

      Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user .

      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.
    • ObjectTags (string) --

      Specifies whether object tags are maintained when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE value.

      Default Value: PRESERVE

  • Includes (list) --

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

    • (dict) --

      Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

      • FilterType (string) --

        The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.

      • Value (string) --

        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

  • Excludes (list) --

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

    • (dict) --

      Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

      • FilterType (string) --

        The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.

      • Value (string) --

        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

Return type

dict

Returns

Response Syntax

{
    'TaskExecutionArn': 'string'
}

Response Structure

  • (dict) --

    StartTaskExecutionResponse

    • TaskExecutionArn (string) --

      The Amazon Resource Name (ARN) of the specific task execution that was started.

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
tag_resource(**kwargs)

Applies a key-value pair to an Amazon Web Services resource.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    ResourceArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource to apply the tag to.

  • Tags (list) --

    [REQUIRED]

    The tags to apply.

    • (dict) --

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

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
untag_resource(**kwargs)

Removes a tag from an Amazon Web Services resource.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    ResourceArn='string',
    Keys=[
        'string',
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource to remove the tag from.

  • Keys (list) --

    [REQUIRED]

    The keys in the key-value pair in the tag to remove.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

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'
)
Parameters
  • AgentArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the agent to update.

  • Name (string) -- The name that you want to use to configure the agent.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

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',
    ]
)
Parameters
  • LocationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the source HDFS cluster location.

  • Subdirectory (string) -- A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster.
  • NameNodes (list) --

    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.

    • (dict) --

      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.

      • Hostname (string) -- [REQUIRED]

        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.

      • Port (integer) -- [REQUIRED]

        The port that the NameNode uses to listen to client requests.

  • BlockSize (integer) -- The size of the data blocks to write into the HDFS cluster.
  • ReplicationFactor (integer) -- The number of DataNodes to replicate the data to when writing to the HDFS cluster.
  • KmsKeyProviderUri (string) -- The URI of the HDFS cluster's Key Management Server (KMS).
  • QopConfiguration (dict) --

    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.

    • RpcProtection (string) --

      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.

    • DataTransferProtection (string) --

      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.

  • AuthenticationType (string) -- The type of authentication used to determine the identity of the user.
  • SimpleUser (string) -- The user name used to identify the client on the host operating system.
  • KerberosPrincipal (string) -- The Kerberos principal with access to the files and folders on the HDFS cluster.
  • KerberosKeytab (bytes) -- 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 use the CLI, it performs base64 encoding for you. Otherwise, provide the base64-encoded text.
  • KerberosKrb5Conf (bytes) -- 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.
  • AgentArns (list) --

    The ARNs of the agents that are used to connect to the HDFS cluster.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

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'
    }
)
Parameters
  • LocationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the NFS location to update.

  • Subdirectory (string) --

    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.

  • OnPremConfig (dict) --

    A list of Amazon Resource Names (ARNs) of agents to use for a Network File System (NFS) location.

    • AgentArns (list) -- [REQUIRED]

      ARNs of the agents to use for an NFS location.

      • (string) --
  • MountOptions (dict) --

    Represents the mount options that are available for DataSync to access an NFS location.

    • Version (string) --

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

      You can specify the following NFS versions:

      • **NFSv3 ** - 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. Version 4.1 also includes all features available in version 4.0.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException
update_location_object_storage(**kwargs)

Updates some of the parameters of a previously created location for self-managed object storage server access. 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',
    ]
)
Parameters
  • LocationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the self-managed object storage server location to be updated.

  • ServerPort (integer) -- The port that your self-managed object storage server accepts inbound network traffic on. The server port is set by default to TCP 80 (HTTP) or TCP 443 (HTTPS). You can specify a custom port if your self-managed object storage server requires one.
  • ServerProtocol (string) -- The protocol that the object storage server uses to communicate. Valid values are HTTP or HTTPS .
  • Subdirectory (string) -- The subdirectory in the self-managed object storage server that is used to read data from.
  • AccessKey (string) -- Optional. The access key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use AccessKey and SecretKey to provide the user name and password, respectively.
  • SecretKey (string) -- Optional. The secret key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use AccessKey and SecretKey to provide the user name and password, respectively.
  • AgentArns (list) --

    The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

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'
    }
)
Parameters
  • LocationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the SMB location to update.

  • Subdirectory (string) --

    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:

    • Ensure that the user/password specified belongs to the user who can mount the share and who has the appropriate permissions for all of the files and directories that you want DataSync to access.
    • Use credentials of a member of the Backup Operators group to mount the share.

    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.

  • User (string) -- The user who can mount the share has the permissions to access files and folders in the SMB share.
  • Domain (string) -- The name of the Windows domain that the SMB server belongs to.
  • Password (string) -- The password of the user who can mount the share has the permissions to access files and folders in the SMB share.
  • AgentArns (list) --

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

    • (string) --
  • MountOptions (dict) --

    Represents the mount options that are available for DataSync to access an SMB location.

    • Version (string) --

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

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

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'
        },
    ]
)
Parameters
  • TaskArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource name of the task to update.

  • Options (dict) --

    Represents the options that are available to control the behavior of a StartTaskExecution operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and also overwriting files in the destination, data integrity verification, and so on.

    A task has a set of default options associated with it. If you don't specify an option in StartTaskExecution , the default value is used. You can override the defaults options on each task execution by specifying an overriding Options value to StartTaskExecution .

    • VerifyMode (string) --

      A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. For more information, see Configure task settings .

      Default value: POINT_IN_TIME_CONSISTENT.

      ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.

      POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.

      NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.

    • OverwriteMode (string) --

      A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to NEVER a destination file 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 S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide .

    • Atime (string) --

      A file metadata value that shows the last time a file was accessed (that is, when the 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). However, Atime 's behavior is not 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-file Atime value (recommended).

      NONE: Ignore Atime .

      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.

    • Mtime (string) --

      A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase. This option is required for cases when you need to run the same task more than one time.

      Default Value: PRESERVE

      PRESERVE: Preserve original Mtime (recommended)

      NONE: Ignore Mtime .

      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.

    • Uid (string) --

      The POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, 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.

    • Gid (string) --

      The POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

    • PreserveDeletedFiles (string) --

      A value that specifies whether files in the destination that don't exist in the source file system should be preserved. This option can affect your 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 in the DataSync User Guide .

      Default value: PRESERVE.

      PRESERVE: Ignore such destination files (recommended).

      REMOVE: Delete destination files that aren’t present in the source.

    • PreserveDevices (string) --

      A value that determines whether DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.

      Note

      DataSync can't sync the actual contents of such devices, because they are 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 isn't currently supported for Amazon EFS.

    • PosixPermissions (string) --

      A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

    • BytesPerSecond (integer) --

      A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024 ).

    • TaskQueueing (string) --

      A value that determines whether tasks should be queued before executing the tasks. If set to ENABLED , the tasks will be queued. The default is ENABLED .

      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 .

    • LogLevel (string) --

      A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn . If set to OFF , no logs are published. BASIC publishes logs on errors for individual files transferred, and TRANSFER publishes logs for every file or object that is transferred and integrity checked.

    • TransferMode (string) --

      A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.

      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 to existing content on the destination.

    • SecurityDescriptorCopyFlags (string) --

      A value that determines 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 Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files .

      Default value: OWNER_DACL.

      OWNER_DACL : For each copied object, DataSync copies the following metadata:
      • Object owner.
      • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.

      When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

      OWNER_DACL_SACL : For each copied object, DataSync copies the following metadata:
      • Object owner.
      • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
      • NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

      Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user .

      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.
    • ObjectTags (string) --

      Specifies whether object tags are maintained when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE value.

      Default Value: PRESERVE

  • Excludes (list) --

    A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2" .

    • (dict) --

      Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

      • FilterType (string) --

        The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.

      • Value (string) --

        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

  • Schedule (dict) --

    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 .

    • ScheduleExpression (string) -- [REQUIRED]

      A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.

  • Name (string) -- The name of the task to update.
  • CloudWatchLogGroupArn (string) -- The Amazon Resource Name (ARN) of the resource name of the Amazon CloudWatch log group.
  • Includes (list) --

    A list of filter rules that determines which files to include when running a task. The pattern contains a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2" .

    • (dict) --

      Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.

      • FilterType (string) --

        The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.

      • Value (string) --

        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

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

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'
    }
)
Parameters
  • TaskExecutionArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the specific task execution that is being updated.

  • Options (dict) --

    [REQUIRED]

    Represents the options that are available to control the behavior of a StartTaskExecution operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and also overwriting files in the destination, data integrity verification, and so on.

    A task has a set of default options associated with it. If you don't specify an option in StartTaskExecution , the default value is used. You can override the defaults options on each task execution by specifying an overriding Options value to StartTaskExecution .

    • VerifyMode (string) --

      A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. For more information, see Configure task settings .

      Default value: POINT_IN_TIME_CONSISTENT.

      ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.

      POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.

      NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.

    • OverwriteMode (string) --

      A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to NEVER a destination file 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 S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide .

    • Atime (string) --

      A file metadata value that shows the last time a file was accessed (that is, when the 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). However, Atime 's behavior is not 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-file Atime value (recommended).

      NONE: Ignore Atime .

      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.

    • Mtime (string) --

      A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase. This option is required for cases when you need to run the same task more than one time.

      Default Value: PRESERVE

      PRESERVE: Preserve original Mtime (recommended)

      NONE: Ignore Mtime .

      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.

    • Uid (string) --

      The POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, 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.

    • Gid (string) --

      The POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

    • PreserveDeletedFiles (string) --

      A value that specifies whether files in the destination that don't exist in the source file system should be preserved. This option can affect your 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 in the DataSync User Guide .

      Default value: PRESERVE.

      PRESERVE: Ignore such destination files (recommended).

      REMOVE: Delete destination files that aren’t present in the source.

    • PreserveDevices (string) --

      A value that determines whether DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.

      Note

      DataSync can't sync the actual contents of such devices, because they are 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 isn't currently supported for Amazon EFS.

    • PosixPermissions (string) --

      A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, 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.

    • BytesPerSecond (integer) --

      A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to 1048576 (=1024*1024 ).

    • TaskQueueing (string) --

      A value that determines whether tasks should be queued before executing the tasks. If set to ENABLED , the tasks will be queued. The default is ENABLED .

      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 .

    • LogLevel (string) --

      A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn . If set to OFF , no logs are published. BASIC publishes logs on errors for individual files transferred, and TRANSFER publishes logs for every file or object that is transferred and integrity checked.

    • TransferMode (string) --

      A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.

      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 to existing content on the destination.

    • SecurityDescriptorCopyFlags (string) --

      A value that determines 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 Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files .

      Default value: OWNER_DACL.

      OWNER_DACL : For each copied object, DataSync copies the following metadata:
      • Object owner.
      • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.

      When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

      OWNER_DACL_SACL : For each copied object, DataSync copies the following metadata:
      • Object owner.
      • NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
      • NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.

      Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user .

      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.
    • ObjectTags (string) --

      Specifies whether object tags are maintained when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE value.

      Default Value: PRESERVE

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException

Paginators

The available paginators are:

class 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'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    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.

  • PageSize (integer) --

    The size of each page.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'Agents': [
        {
            'AgentArn': 'string',
            'Name': 'string',
            'Status': 'ONLINE'|'OFFLINE'
        },
    ],

}

Response Structure

  • (dict) --

    ListAgentsResponse

    • Agents (list) --

      A list of agents in your account.

      • (dict) --

        Represents a single entry in a list of agents. AgentListEntry returns an array that contains a list of agents when the ListAgents operation is called.

        • AgentArn (string) --

          The Amazon Resource Name (ARN) of the agent.

        • Name (string) --

          The name of the agent.

        • Status (string) --

          The status of the agent.

class 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'
    }
)
Parameters
  • Filters (list) --

    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 .

    • (dict) --

      You can use API filters to narrow down the list of resources returned by ListLocations . For example, to retrieve all your Amazon S3 locations, you can use ListLocations with filter name LocationType S3 and Operator Equals .

      • Name (string) -- [REQUIRED]

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

      • Values (list) -- [REQUIRED]

        The values that you want to filter for. For example, you might want to display only Amazon S3 locations.

        • (string) --
      • Operator (string) -- [REQUIRED]

        The operator that is used to compare filter values (for example, Equals or Contains ). For more about API filtering operators, see API filters for ListTasks and ListLocations .

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      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.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

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.

class 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'
    }
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource whose tags to list.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      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.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    ListTagsForResourceResponse

    • Tags (list) --

      Array of resource tags.

      • (dict) --

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

        • Key (string) --

          The key for an Amazon Web Services resource tag.

        • Value (string) --

          The value for an Amazon Web Services resource tag.

class 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'
    }
)
Parameters
  • TaskArn (string) -- The Amazon Resource Name (ARN) of the task whose tasks you want to list.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      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.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

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.

class 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'
    }
)
Parameters
  • Filters (list) --

    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.

    • (dict) --

      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.

      • Name (string) -- [REQUIRED]

        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 .

      • Values (list) -- [REQUIRED]

        The values that you want to filter for. For example, you might want to display only tasks for a specific destination location.

        • (string) --
      • Operator (string) -- [REQUIRED]

        The operator that is used to compare filter values (for example, Equals or Contains ). For more about API filtering operators, see API filters for ListTasks and ListLocations .

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      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.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

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.