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

Constructs a fluent builder for the CreateLocationFsxLustre operation.

Constructs a fluent builder for the CreateLocationFsxOntap operation.

Constructs a fluent builder for the CreateLocationFsxOpenZfs 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 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.

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

Constructs a fluent builder for the DescribeLocationFsxOpenZfs 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>):

      Configures your DataSync task settings. These options include how DataSync handles files, objects, and their associated metadata. You also can specify how DataSync verifies data integrity, set bandwidth limits for your task, among other options.

      Each task setting has a default value. Unless you need to, you don’t have to configure any of these Options before starting your task.

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

      A list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.

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

      A list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.

    • 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 of the task execution. This value is the expected number of files to be transferred. It’s calculated based on comparing the content of the source and destination locations and finding the delta that needs to be transferred.

    • 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 of the task execution. It’s updated periodically when each file is read from the source and sent over the network.

      If failures occur during a transfer, this value can be less than EstimatedFilesToTransfer. In some cases, this value can also be greater than EstimatedFilesToTransfer. This element is implementation-specific for some location types, so don’t use it as an indicator for a correct file number or to monitor your task execution.

    • bytes_written(i64):

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

    • bytes_transferred(i64):

      The total number of bytes that are involved in the transfer. For the number of bytes sent over the network, see BytesCompressed.

    • result(Option<TaskExecutionResultDetail>):

      The result of the task execution.

    • bytes_compressed(i64):

      The physical number of bytes transferred over the network after compression was applied. In most cases, this number is less than BytesTransferred unless the data isn’t compressible.

  • 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>):

      Specifies how DataSync can access a location using the NFS protocol.

  • 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 new client from an SDK Config.

Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Creates a new client from the service Config.

Panics
  • This method will panic if the conf is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the conf is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

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
Converts to this type from the input type.

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.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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