You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::DataSync::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::SharedCredentials - Used for loading credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2 IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails to enable retries and extended timeouts.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is search for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test endpoints. This should be avalid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.

  • :secret_access_key (String)
  • :session_token (String)
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before rasing a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session yeidled by #session_for.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idble before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session yeidled by #session_for.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



261
262
263
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 261

def initialize(*args)
  super
end

Instance Method Details

#cancel_task_execution(params = {}) ⇒ Struct

Cancels execution of a task.

When you cancel a task execution, the transfer of some files are 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, AWS DataSync successfully complete the transfer when you start the next task execution.

Examples:

Request syntax with placeholder values


resp = client.cancel_task_execution({
  task_execution_arn: "TaskExecutionArn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :task_execution_arn (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



294
295
296
297
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 294

def cancel_task_execution(params = {}, options = {})
  req = build_request(:cancel_task_execution, params)
  req.send_request(options)
end

#create_agent(params = {}) ⇒ Types::CreateAgentResponse

Activates an AWS 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 AWS Region that you want to activate the agent in. You activate the agent in the AWS Region where your target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created in this AWS 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 AWS on a regular basis, using a mechanism that ensures minimal interruption to your tasks.

Examples:

Request syntax with placeholder values


resp = client.create_agent({
  activation_key: "ActivationKey", # required
  agent_name: "TagValue",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  vpc_endpoint_id: "VpcEndpointId",
  subnet_arns: ["Ec2SubnetArn"],
  security_group_arns: ["Ec2SecurityGroupArn"],
})

Response structure


resp.agent_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :activation_key (required, 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 AWS 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 AWS DataSync User Guide.

  • :agent_name (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 (Array<Types::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 (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 AWS VPC User Guide.

    VPC endpoint ID looks like this: vpce-01234d5aff67890e1.

  • :subnet_arns (Array<String>)

    The Amazon Resource Names (ARNs) of the subnets in which DataSync will create Elastic Network Interfaces (ENIs) 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 ENIs for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four ENIs.

  • :security_group_arns (Array<String>)

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

Returns:

See Also:



403
404
405
406
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 403

def create_agent(params = {}, options = {})
  req = build_request(:create_agent, params)
  req.send_request(options)
end

#create_location_efs(params = {}) ⇒ Types::CreateLocationEfsResponse

Creates an endpoint for an Amazon EFS file system.

Examples:

Request syntax with placeholder values


resp = client.create_location_efs({
  subdirectory: "Subdirectory",
  efs_filesystem_arn: "EfsFilesystemArn", # required
  ec2_config: { # required
    subnet_arn: "Ec2SubnetArn", # required
    security_group_arns: ["Ec2SecurityGroupArn"], # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.location_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :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, AWS DataSync uses the root directory.

  • :efs_filesystem_arn (required, String)

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

  • :ec2_config (required, Types::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 (Array<Types::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.

Returns:

See Also:



477
478
479
480
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 477

def create_location_efs(params = {}, options = {})
  req = build_request(:create_location_efs, params)
  req.send_request(options)
end

#create_location_nfs(params = {}) ⇒ Types::CreateLocationNfsResponse

Creates an endpoint for a Network File System (NFS) file system.

Examples:

Request syntax with placeholder values


resp = client.create_location_nfs({
  subdirectory: "NonEmptySubdirectory", # required
  server_hostname: "ServerHostname", # required
  on_prem_config: { # required
    agent_arns: ["AgentArn"], # required
  },
  mount_options: {
    version: "AUTOMATIC", # accepts AUTOMATIC, NFS3, NFS4_0, NFS4_1
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.location_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :subdirectory (required, 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.

    For information about NFS export configuration, see 18.7. The /etc/exports Configuration File in the Red Hat Enterprise Linux documentation.

  • :server_hostname (required, 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.

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

  • :on_prem_config (required, Types::OnPremConfig)

    Contains a list of Amazon Resource Names (ARNs) of agents that are used to connect to an NFS server.

  • :mount_options (Types::NfsMountOptions)

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

  • :tags (Array<Types::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.

Returns:

See Also:



562
563
564
565
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 562

def create_location_nfs(params = {}, options = {})
  req = build_request(:create_location_nfs, params)
  req.send_request(options)
end

#create_location_s3(params = {}) ⇒ Types::CreateLocationS3Response

Creates an endpoint for an Amazon S3 bucket.

For AWS DataSync to access a destination S3 bucket, it needs an AWS Identity and Access Management (IAM) role that has the required permissions. You can set up the required permissions by creating an IAM policy that grants the required permissions and attaching the policy to the role. An example of such a policy is shown in the examples section.

For more information, see Configuring Amazon S3 Location Settings in the AWS DataSync User Guide.

Examples:

Request syntax with placeholder values


resp = client.create_location_s3({
  subdirectory: "Subdirectory",
  s3_bucket_arn: "S3BucketArn", # required
  s3_config: { # required
    bucket_access_role_arn: "IamRoleArn", # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.location_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

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

  • :s3_bucket_arn (required, String)

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

  • :s3_config (required, Types::S3Config)

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that is used to access an Amazon S3 bucket.

    For detailed information about using such a role, see Creating a Location for Amazon S3 in the AWS DataSync User Guide.

  • :tags (Array<Types::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.

Returns:

See Also:



627
628
629
630
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 627

def create_location_s3(params = {}, options = {})
  req = build_request(:create_location_s3, params)
  req.send_request(options)
end

#create_location_smb(params = {}) ⇒ Types::CreateLocationSmbResponse

Creates an endpoint for a Server Message Block (SMB) file system.

Examples:

Request syntax with placeholder values


resp = client.create_location_smb({
  subdirectory: "NonEmptySubdirectory", # required
  server_hostname: "ServerHostname", # required
  user: "SmbUser", # required
  domain: "SmbDomain",
  password: "SmbPassword", # required
  agent_arns: ["AgentArn"], # required
  mount_options: {
    version: "AUTOMATIC", # accepts AUTOMATIC, SMB2, SMB3
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.location_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :subdirectory (required, 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.

    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.

  • :server_hostname (required, String)

    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 host name to mount the SMB server in a network.

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

  • :user (required, String)

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

  • :domain (String)

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

  • :password (required, String)

    The password of the user who has permission to access the SMB server.

  • :agent_arns (required, Array<String>)

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

  • :mount_options (Types::SmbMountOptions)

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

  • :tags (Array<Types::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.

Returns:

See Also:



716
717
718
719
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 716

def create_location_smb(params = {}, options = {})
  req = build_request(:create_location_smb, params)
  req.send_request(options)
end

#create_task(params = {}) ⇒ Types::CreateTaskResponse

Creates a task. A task is a set of two locations (source and destination) and a set of Options that you use to control the behavior of a task. If you don't specify Options when you create a task, AWS DataSync populates them with service defaults.

When you create a task, it first enters the CREATING state. During CREATING AWS DataSync attempts to mount the on-premises Network File System (NFS) location. The task transitions to the AVAILABLE state without waiting for the AWS location to become mounted. If required, AWS DataSync mounts the AWS location before each task execution.

If an agent that is associated with a source (NFS) location goes offline, the task transitions to the UNAVAILABLE status. If the status of the task remains in the CREATING status for more than a few minutes, it means that your agent might be having trouble mounting the source NFS file system. Check the task's ErrorCode and ErrorDetail. Mount issues are often caused by either a misconfigured firewall or a mistyped NFS server host name.

Examples:

Request syntax with placeholder values


resp = client.create_task({
  source_location_arn: "LocationArn", # required
  destination_location_arn: "LocationArn", # required
  cloud_watch_log_group_arn: "LogGroupArn",
  name: "TagValue",
  options: {
    verify_mode: "POINT_IN_TIME_CONSISTENT", # accepts POINT_IN_TIME_CONSISTENT, NONE
    atime: "NONE", # accepts NONE, BEST_EFFORT
    mtime: "NONE", # accepts NONE, PRESERVE
    uid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
    gid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
    preserve_deleted_files: "PRESERVE", # accepts PRESERVE, REMOVE
    preserve_devices: "NONE", # accepts NONE, PRESERVE
    posix_permissions: "NONE", # accepts NONE, BEST_EFFORT, PRESERVE
    bytes_per_second: 1,
  },
  excludes: [
    {
      filter_type: "SIMPLE_PATTERN", # accepts SIMPLE_PATTERN
      value: "FilterValue",
    },
  ],
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.task_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :source_location_arn (required, String)

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

  • :destination_location_arn (required, String)

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

  • :cloud_watch_log_group_arn (String)

    The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is 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.

    For more information about how to use CloudWatch Logs with DataSync, see Monitoring Your Task in the AWS DataSync User Guide.

  • :name (String)

    The name of a task. This value is a text reference that is used to identify the task in the console.

  • :options (Types::Options)

    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 a the task execution. For more information, see the operation.

  • :excludes (Array<Types::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"

  • :tags (Array<Types::TagListEntry>)

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

Returns:

See Also:



825
826
827
828
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 825

def create_task(params = {}, options = {})
  req = build_request(:create_task, params)
  req.send_request(options)
end

#delete_agent(params = {}) ⇒ Struct

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 AWS account. However, it doesn't delete the agent virtual machine (VM) from your on-premises environment.

Examples:

Request syntax with placeholder values


resp = client.delete_agent({
  agent_arn: "AgentArn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :agent_arn (required, String)

    The Amazon Resource Name (ARN) of the agent to delete. Use the ListAgents operation to return a list of agents for your account and AWS Region.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



853
854
855
856
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 853

def delete_agent(params = {}, options = {})
  req = build_request(:delete_agent, params)
  req.send_request(options)
end

#delete_location(params = {}) ⇒ Struct

Deletes the configuration of a location used by AWS DataSync.

Examples:

Request syntax with placeholder values


resp = client.delete_location({
  location_arn: "LocationArn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :location_arn (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



875
876
877
878
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 875

def delete_location(params = {}, options = {})
  req = build_request(:delete_location, params)
  req.send_request(options)
end

#delete_task(params = {}) ⇒ Struct

Deletes a task.

Examples:

Request syntax with placeholder values


resp = client.delete_task({
  task_arn: "TaskArn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :task_arn (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



897
898
899
900
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 897

def delete_task(params = {}, options = {})
  req = build_request(:delete_task, params)
  req.send_request(options)
end

#describe_agent(params = {}) ⇒ Types::DescribeAgentResponse

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.

Examples:

Request syntax with placeholder values


resp = client.describe_agent({
  agent_arn: "AgentArn", # required
})

Response structure


resp.agent_arn #=> String
resp.name #=> String
resp.status #=> String, one of "ONLINE", "OFFLINE"
resp.last_connection_time #=> Time
resp.creation_time #=> Time
resp.endpoint_type #=> String, one of "PUBLIC", "PRIVATE_LINK"
resp.private_link_config.vpc_endpoint_id #=> String
resp.private_link_config.private_link_endpoint #=> String
resp.private_link_config.subnet_arns #=> Array
resp.private_link_config.subnet_arns[0] #=> String
resp.private_link_config.security_group_arns #=> Array
resp.private_link_config.security_group_arns[0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :agent_arn (required, String)

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

Returns:

See Also:



945
946
947
948
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 945

def describe_agent(params = {}, options = {})
  req = build_request(:describe_agent, params)
  req.send_request(options)
end

#describe_location_efs(params = {}) ⇒ Types::DescribeLocationEfsResponse

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

Examples:

Request syntax with placeholder values


resp = client.describe_location_efs({
  location_arn: "LocationArn", # required
})

Response structure


resp.location_arn #=> String
resp.location_uri #=> String
resp.ec2_config.subnet_arn #=> String
resp.ec2_config.security_group_arns #=> Array
resp.ec2_config.security_group_arns[0] #=> String
resp.creation_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :location_arn (required, String)

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

Returns:

See Also:



982
983
984
985
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 982

def describe_location_efs(params = {}, options = {})
  req = build_request(:describe_location_efs, params)
  req.send_request(options)
end

#describe_location_nfs(params = {}) ⇒ Types::DescribeLocationNfsResponse

Returns metadata, such as the path information, about a NFS location.

Examples:

Request syntax with placeholder values


resp = client.describe_location_nfs({
  location_arn: "LocationArn", # required
})

Response structure


resp.location_arn #=> String
resp.location_uri #=> String
resp.on_prem_config.agent_arns #=> Array
resp.on_prem_config.agent_arns[0] #=> String
resp.mount_options.version #=> String, one of "AUTOMATIC", "NFS3", "NFS4_0", "NFS4_1"
resp.creation_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :location_arn (required, String)

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

Returns:

See Also:



1019
1020
1021
1022
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1019

def describe_location_nfs(params = {}, options = {})
  req = build_request(:describe_location_nfs, params)
  req.send_request(options)
end

#describe_location_s3(params = {}) ⇒ Types::DescribeLocationS3Response

Returns metadata, such as bucket name, about an Amazon S3 bucket location.

Examples:

Request syntax with placeholder values


resp = client.describe_location_s3({
  location_arn: "LocationArn", # required
})

Response structure


resp.location_arn #=> String
resp.location_uri #=> String
resp.s3_config.bucket_access_role_arn #=> String
resp.creation_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :location_arn (required, String)

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

Returns:

See Also:



1055
1056
1057
1058
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1055

def describe_location_s3(params = {}, options = {})
  req = build_request(:describe_location_s3, params)
  req.send_request(options)
end

#describe_location_smb(params = {}) ⇒ Types::DescribeLocationSmbResponse

Returns metadata, such as the path and user information about a SMB location.

Examples:

Request syntax with placeholder values


resp = client.describe_location_smb({
  location_arn: "LocationArn", # required
})

Response structure


resp.location_arn #=> String
resp.location_uri #=> String
resp.agent_arns #=> Array
resp.agent_arns[0] #=> String
resp.user #=> String
resp.domain #=> String
resp.mount_options.version #=> String, one of "AUTOMATIC", "SMB2", "SMB3"
resp.creation_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :location_arn (required, String)

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

Returns:

See Also:



1097
1098
1099
1100
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1097

def describe_location_smb(params = {}, options = {})
  req = build_request(:describe_location_smb, params)
  req.send_request(options)
end

#describe_task(params = {}) ⇒ Types::DescribeTaskResponse

Returns metadata about a task.

Examples:

Request syntax with placeholder values


resp = client.describe_task({
  task_arn: "TaskArn", # required
})

Response structure


resp.task_arn #=> String
resp.status #=> String, one of "AVAILABLE", "CREATING", "RUNNING", "UNAVAILABLE"
resp.name #=> String
resp.current_task_execution_arn #=> String
resp.source_location_arn #=> String
resp.destination_location_arn #=> String
resp.cloud_watch_log_group_arn #=> String
resp.source_network_interface_arns #=> Array
resp.source_network_interface_arns[0] #=> String
resp.destination_network_interface_arns #=> Array
resp.destination_network_interface_arns[0] #=> String
resp.options.verify_mode #=> String, one of "POINT_IN_TIME_CONSISTENT", "NONE"
resp.options.atime #=> String, one of "NONE", "BEST_EFFORT"
resp.options.mtime #=> String, one of "NONE", "PRESERVE"
resp.options.uid #=> String, one of "NONE", "INT_VALUE", "NAME", "BOTH"
resp.options.gid #=> String, one of "NONE", "INT_VALUE", "NAME", "BOTH"
resp.options.preserve_deleted_files #=> String, one of "PRESERVE", "REMOVE"
resp.options.preserve_devices #=> String, one of "NONE", "PRESERVE"
resp.options.posix_permissions #=> String, one of "NONE", "BEST_EFFORT", "PRESERVE"
resp.options.bytes_per_second #=> Integer
resp.excludes #=> Array
resp.excludes[0].filter_type #=> String, one of "SIMPLE_PATTERN"
resp.excludes[0].value #=> String
resp.error_code #=> String
resp.error_detail #=> String
resp.creation_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :task_arn (required, String)

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

Returns:

See Also:



1163
1164
1165
1166
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1163

def describe_task(params = {}, options = {})
  req = build_request(:describe_task, params)
  req.send_request(options)
end

#describe_task_execution(params = {}) ⇒ Types::DescribeTaskExecutionResponse

Returns detailed metadata about a task that is being executed.

Examples:

Request syntax with placeholder values


resp = client.describe_task_execution({
  task_execution_arn: "TaskExecutionArn", # required
})

Response structure


resp.task_execution_arn #=> String
resp.status #=> String, one of "LAUNCHING", "PREPARING", "TRANSFERRING", "VERIFYING", "SUCCESS", "ERROR"
resp.options.verify_mode #=> String, one of "POINT_IN_TIME_CONSISTENT", "NONE"
resp.options.atime #=> String, one of "NONE", "BEST_EFFORT"
resp.options.mtime #=> String, one of "NONE", "PRESERVE"
resp.options.uid #=> String, one of "NONE", "INT_VALUE", "NAME", "BOTH"
resp.options.gid #=> String, one of "NONE", "INT_VALUE", "NAME", "BOTH"
resp.options.preserve_deleted_files #=> String, one of "PRESERVE", "REMOVE"
resp.options.preserve_devices #=> String, one of "NONE", "PRESERVE"
resp.options.posix_permissions #=> String, one of "NONE", "BEST_EFFORT", "PRESERVE"
resp.options.bytes_per_second #=> Integer
resp.excludes #=> Array
resp.excludes[0].filter_type #=> String, one of "SIMPLE_PATTERN"
resp.excludes[0].value #=> String
resp.includes #=> Array
resp.includes[0].filter_type #=> String, one of "SIMPLE_PATTERN"
resp.includes[0].value #=> String
resp.start_time #=> Time
resp.estimated_files_to_transfer #=> Integer
resp.estimated_bytes_to_transfer #=> Integer
resp.files_transferred #=> Integer
resp.bytes_written #=> Integer
resp.bytes_transferred #=> Integer
resp.result.prepare_duration #=> Integer
resp.result.prepare_status #=> String, one of "PENDING", "SUCCESS", "ERROR"
resp.result.transfer_duration #=> Integer
resp.result.transfer_status #=> String, one of "PENDING", "SUCCESS", "ERROR"
resp.result.verify_duration #=> Integer
resp.result.verify_status #=> String, one of "PENDING", "SUCCESS", "ERROR"
resp.result.error_code #=> String
resp.result.error_detail #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :task_execution_arn (required, String)

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

Returns:

See Also:



1232
1233
1234
1235
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1232

def describe_task_execution(params = {}, options = {})
  req = build_request(:describe_task_execution, params)
  req.send_request(options)
end

#list_agents(params = {}) ⇒ Types::ListAgentsResponse

Returns a list of agents owned by an AWS account in the AWS 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.

Examples:

Request syntax with placeholder values


resp = client.list_agents({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.agents #=> Array
resp.agents[0].agent_arn #=> String
resp.agents[0].name #=> String
resp.agents[0].status #=> String, one of "ONLINE", "OFFLINE"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of agents to list.

  • :next_token (String)

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

Returns:

See Also:



1281
1282
1283
1284
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1281

def list_agents(params = {}, options = {})
  req = build_request(:list_agents, params)
  req.send_request(options)
end

#list_locations(params = {}) ⇒ Types::ListLocationsResponse

Returns a lists 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.

Examples:

Request syntax with placeholder values


resp = client.list_locations({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.locations #=> Array
resp.locations[0].location_arn #=> String
resp.locations[0].location_uri #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of locations to return.

  • :next_token (String)

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

Returns:

See Also:



1323
1324
1325
1326
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1323

def list_locations(params = {}, options = {})
  req = build_request(:list_locations, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Returns all the tags associated with a specified resources.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "TaggableResourceArn", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

  • :max_results (Integer)

    The maximum number of locations to return.

  • :next_token (String)

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

Returns:

See Also:



1364
1365
1366
1367
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1364

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#list_task_executions(params = {}) ⇒ Types::ListTaskExecutionsResponse

Returns a list of executed tasks.

Examples:

Request syntax with placeholder values


resp = client.list_task_executions({
  task_arn: "TaskArn",
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.task_executions #=> Array
resp.task_executions[0].task_execution_arn #=> String
resp.task_executions[0].status #=> String, one of "LAUNCHING", "PREPARING", "TRANSFERRING", "VERIFYING", "SUCCESS", "ERROR"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :task_arn (String)

    The Amazon Resource Name (ARN) of the task whose tasks you want to list.

  • :max_results (Integer)

    The maximum number of executed tasks to list.

  • :next_token (String)

    An opaque string that indicates the position at which to begin the next list of the executed tasks.

Returns:

See Also:



1406
1407
1408
1409
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1406

def list_task_executions(params = {}, options = {})
  req = build_request(:list_task_executions, params)
  req.send_request(options)
end

#list_tasks(params = {}) ⇒ Types::ListTasksResponse

Returns a list of all the tasks.

Examples:

Request syntax with placeholder values


resp = client.list_tasks({
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.tasks #=> Array
resp.tasks[0].task_arn #=> String
resp.tasks[0].status #=> String, one of "AVAILABLE", "CREATING", "RUNNING", "UNAVAILABLE"
resp.tasks[0].name #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of tasks to return.

  • :next_token (String)

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

Returns:

See Also:



1444
1445
1446
1447
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1444

def list_tasks(params = {}, options = {})
  req = build_request(:list_tasks, params)
  req.send_request(options)
end

#start_task_execution(params = {}) ⇒ Types::StartTaskExecutionResponse

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 AWS DataSync User Guide.

Examples:

Request syntax with placeholder values


resp = client.start_task_execution({
  task_arn: "TaskArn", # required
  override_options: {
    verify_mode: "POINT_IN_TIME_CONSISTENT", # accepts POINT_IN_TIME_CONSISTENT, NONE
    atime: "NONE", # accepts NONE, BEST_EFFORT
    mtime: "NONE", # accepts NONE, PRESERVE
    uid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
    gid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
    preserve_deleted_files: "PRESERVE", # accepts PRESERVE, REMOVE
    preserve_devices: "NONE", # accepts NONE, PRESERVE
    posix_permissions: "NONE", # accepts NONE, BEST_EFFORT, PRESERVE
    bytes_per_second: 1,
  },
  includes: [
    {
      filter_type: "SIMPLE_PATTERN", # accepts SIMPLE_PATTERN
      value: "FilterValue",
    },
  ],
})

Response structure


resp.task_execution_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :task_arn (required, String)

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

  • :override_options (Types::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.

  • :includes (Array<Types::FilterRule>)

    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"

Returns:

See Also:



1515
1516
1517
1518
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1515

def start_task_execution(params = {}, options = {})
  req = build_request(:start_task_execution, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Applies a key-value pair to an AWS resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "TaggableResourceArn", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

  • :tags (required, Array<Types::TagListEntry>)

    The tags to apply.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1546
1547
1548
1549
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1546

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes a tag from an AWS resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "TaggableResourceArn", # required
  keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

  • :keys (required, Array<String>)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1572
1573
1574
1575
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1572

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_agent(params = {}) ⇒ Struct

Updates the name of an agent.

Examples:

Request syntax with placeholder values


resp = client.update_agent({
  agent_arn: "AgentArn", # required
  name: "TagValue",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :agent_arn (required, String)

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

  • :name (String)

    The name that you want to use to configure the agent.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1598
1599
1600
1601
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1598

def update_agent(params = {}, options = {})
  req = build_request(:update_agent, params)
  req.send_request(options)
end

#update_task(params = {}) ⇒ Struct

Updates the metadata associated with a task.

Examples:

Request syntax with placeholder values


resp = client.update_task({
  task_arn: "TaskArn", # required
  options: {
    verify_mode: "POINT_IN_TIME_CONSISTENT", # accepts POINT_IN_TIME_CONSISTENT, NONE
    atime: "NONE", # accepts NONE, BEST_EFFORT
    mtime: "NONE", # accepts NONE, PRESERVE
    uid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
    gid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
    preserve_deleted_files: "PRESERVE", # accepts PRESERVE, REMOVE
    preserve_devices: "NONE", # accepts NONE, PRESERVE
    posix_permissions: "NONE", # accepts NONE, BEST_EFFORT, PRESERVE
    bytes_per_second: 1,
  },
  excludes: [
    {
      filter_type: "SIMPLE_PATTERN", # accepts SIMPLE_PATTERN
      value: "FilterValue",
    },
  ],
  name: "TagValue",
  cloud_watch_log_group_arn: "LogGroupArn",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :task_arn (required, String)

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

  • :options (Types::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 (Array<Types::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"

  • :name (String)

    The name of the task to update.

  • :cloud_watch_log_group_arn (String)

    The Amazon Resource Name (ARN) of the resource name of the CloudWatch LogGroup.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1665
1666
1667
1668
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1665

def update_task(params = {}, options = {})
  req = build_request(:update_task, params)
  req.send_request(options)
end