pub struct Client { /* private fields */ }
Expand description

Client for AWS DataSync

Client for invoking operations on AWS DataSync. Each operation on AWS DataSync is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Examples

Constructing a client and invoking an operation

    // create a shared configuration. This can be used & shared between multiple service clients.
    let shared_config = aws_config::load_from_env().await;
    let client = aws_sdk_datasync::Client::new(&shared_config);
    // invoke an operation
    /* let rsp = client
        .<operation_name>().
        .<param>("some value")
        .send().await; */

Constructing a client with custom configuration

use aws_config::RetryConfig;
    let shared_config = aws_config::load_from_env().await;
    let config = aws_sdk_datasync::config::Builder::from(&shared_config)
        .retry_config(RetryConfig::disabled())
        .build();
    let client = aws_sdk_datasync::Client::from_conf(config);

Implementations

Creates a client with the given service configuration.

Returns the client’s configuration.

Constructs a fluent builder for the CancelTaskExecution operation.

Constructs a fluent builder for the CreateAgent operation.

  • The fluent builder is configurable:
    • activation_key(impl Into<String>) / set_activation_key(Option<String>):

      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.

    • agent_name(impl Into<String>) / set_agent_name(Option<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(Vec<TagListEntry>) / set_tags(Option<Vec<TagListEntry>>):

      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.

      Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @.

    • vpc_endpoint_id(impl Into<String>) / set_vpc_endpoint_id(Option<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.

    • subnet_arns(Vec<String>) / set_subnet_arns(Option<Vec<String>>):

      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.

    • security_group_arns(Vec<String>) / set_security_group_arns(Option<Vec<String>>):

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

  • On success, responds with CreateAgentOutput with field(s):
    • agent_arn(Option<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.

  • On failure, responds with SdkError<CreateAgentError>

Constructs a fluent builder for the CreateLocationEfs operation.

  • The fluent builder is configurable:
    • subdirectory(impl Into<String>) / set_subdirectory(Option<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.

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

    • efs_filesystem_arn(impl Into<String>) / set_efs_filesystem_arn(Option<String>):

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

    • ec2_config(Ec2Config) / set_ec2_config(Option<Ec2Config>):

      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.

    • tags(Vec<TagListEntry>) / set_tags(Option<Vec<TagListEntry>>):

      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.

  • On success, responds with CreateLocationEfsOutput with field(s):
  • On failure, responds with SdkError<CreateLocationEfsError>

Constructs a fluent builder for the CreateLocationFsxLustre operation.

Constructs a fluent builder for the CreateLocationFsxWindows operation.

Constructs a fluent builder for the CreateLocationHdfs operation.

Constructs a fluent builder for the CreateLocationNfs operation.

  • The fluent builder is configurable:
    • subdirectory(impl Into<String>) / set_subdirectory(Option<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 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.

    • server_hostname(impl Into<String>) / set_server_hostname(Option<String>):

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

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

    • on_prem_config(OnPremConfig) / set_on_prem_config(Option<OnPremConfig>):

      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.

    • mount_options(NfsMountOptions) / set_mount_options(Option<NfsMountOptions>):

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

    • tags(Vec<TagListEntry>) / set_tags(Option<Vec<TagListEntry>>):

      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.

  • On success, responds with CreateLocationNfsOutput with field(s):
  • On failure, responds with SdkError<CreateLocationNfsError>

Constructs a fluent builder for the CreateLocationObjectStorage operation.

Constructs a fluent builder for the CreateLocationS3 operation.

Constructs a fluent builder for the CreateLocationSmb operation.

Constructs a fluent builder for the CreateTask operation.

Constructs a fluent builder for the DeleteAgent operation.

Constructs a fluent builder for the DeleteLocation operation.

Constructs a fluent builder for the DeleteTask operation.

Constructs a fluent builder for the DescribeAgent operation.

Constructs a fluent builder for the DescribeLocationEfs operation.

Constructs a fluent builder for the DescribeLocationFsxLustre operation.

Constructs a fluent builder for the DescribeLocationFsxWindows operation.

Constructs a fluent builder for the DescribeLocationHdfs operation.

Constructs a fluent builder for the DescribeLocationNfs operation.

Constructs a fluent builder for the DescribeLocationObjectStorage operation.

Constructs a fluent builder for the DescribeLocationS3 operation.

Constructs a fluent builder for the DescribeLocationSmb operation.

Constructs a fluent builder for the DescribeTask operation.

Constructs a fluent builder for the DescribeTaskExecution operation.

  • The fluent builder is configurable:
  • On success, responds with DescribeTaskExecutionOutput with field(s):
    • task_execution_arn(Option<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(Option<TaskExecutionStatus>):

      The status of the task execution.

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

    • options(Option<Options>):

      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.

    • excludes(Option<Vec<FilterRule>>):

      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”

    • includes(Option<Vec<FilterRule>>):

      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”

    • start_time(Option<DateTime>):

      The time that the task execution was started.

    • estimated_files_to_transfer(i64):

      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.

    • estimated_bytes_to_transfer(i64):

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

    • files_transferred(i64):

      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.

    • bytes_written(i64):

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

    • bytes_transferred(i64):

      The physical number of bytes transferred over the network.

    • result(Option<TaskExecutionResultDetail>):

      The result of the task execution.

  • On failure, responds with SdkError<DescribeTaskExecutionError>

Constructs a fluent builder for the ListAgents operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListLocations operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListTagsForResource operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListTaskExecutions operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListTasks operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the StartTaskExecution operation.

Constructs a fluent builder for the TagResource operation.

Constructs a fluent builder for the UntagResource operation.

Constructs a fluent builder for the UpdateAgent operation.

Constructs a fluent builder for the UpdateLocationHdfs operation.

Constructs a fluent builder for the UpdateLocationNfs operation.

  • The fluent builder is configurable:
    • location_arn(impl Into<String>) / set_location_arn(Option<String>):

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

    • subdirectory(impl Into<String>) / set_subdirectory(Option<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.

    • on_prem_config(OnPremConfig) / set_on_prem_config(Option<OnPremConfig>):

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

    • mount_options(NfsMountOptions) / set_mount_options(Option<NfsMountOptions>):

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

  • On success, responds with UpdateLocationNfsOutput
  • On failure, responds with SdkError<UpdateLocationNfsError>

Constructs a fluent builder for the UpdateLocationObjectStorage operation.

Constructs a fluent builder for the UpdateLocationSmb operation.

Constructs a fluent builder for the UpdateTask operation.

Constructs a fluent builder for the UpdateTaskExecution operation.

Creates a client with the given service config and connector override.

Creates a new client from a shared config.

Creates a new client from the service Config.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more