Class: Aws::DataSync::Client

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

Overview

An API client for DataSync. To construct a client, you need to configure a :region and :credentials.

client = Aws::DataSync::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

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::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

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

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

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

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    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/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :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 searched 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.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

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

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See Aws::DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :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 or custom endpoints. This should be a valid 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.

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

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

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

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

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :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. This option is only used in the legacy retry mode.

    @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, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :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. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

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

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :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 raising a Timeout::Error.

  • :http_read_timeout (Float) — default: 60

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

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle 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.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

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



358
359
360
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 358

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

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:



391
392
393
394
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 391

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

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 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 (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 Amazon 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 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 (Array<String>)

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

Returns:

See Also:



506
507
508
509
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 506

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 that DataSync can access for a transfer. For more information, see Creating a location for Amazon EFS.

Examples:

Request syntax with placeholder values


resp = client.create_location_efs({
  subdirectory: "EfsSubdirectory",
  efs_filesystem_arn: "EfsFilesystemArn", # required
  ec2_config: { # required
    subnet_arn: "Ec2SubnetArn", # required
    security_group_arns: ["Ec2SecurityGroupArn"], # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  access_point_arn: "EfsAccessPointArn",
  file_system_access_role_arn: "IamRoleArn",
  in_transit_encryption: "NONE", # accepts NONE, TLS1_2
})

Response structure


resp.location_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :subdirectory (String)

    Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data (depending on if this is a source or destination location). By default, DataSync uses the root directory, but you can also include subdirectories.

    You must specify a value with forward slashes (for example, /path/to/folder).

  • :efs_filesystem_arn (required, String)

    Specifies the ARN for the Amazon EFS file system.

  • :ec2_config (required, Types::Ec2Config)

    Specifies the subnet and security groups DataSync uses to access your Amazon EFS file system.

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

    Specifies the key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.

  • :access_point_arn (String)

    Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

  • :file_system_access_role_arn (String)

    Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

  • :in_transit_encryption (String)

    Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it copies data to or from the Amazon EFS file system.

    If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

Returns:

See Also:



592
593
594
595
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 592

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

#create_location_fsx_lustre(params = {}) ⇒ Types::CreateLocationFsxLustreResponse

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

Examples:

Request syntax with placeholder values


resp = client.create_location_fsx_lustre({
  fsx_filesystem_arn: "FsxFilesystemArn", # required
  security_group_arns: ["Ec2SecurityGroupArn"], # required
  subdirectory: "FsxLustreSubdirectory",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.location_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :fsx_filesystem_arn (required, String)

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

  • :security_group_arns (required, Array<String>)

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

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



643
644
645
646
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 643

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

#create_location_fsx_ontap(params = {}) ⇒ Types::CreateLocationFsxOntapResponse

Creates an endpoint for an Amazon FSx for NetApp ONTAP file system that DataSync can access for a transfer. For more information, see Creating a location for FSx for ONTAP.

Examples:

Request syntax with placeholder values


resp = client.create_location_fsx_ontap({
  protocol: { # required
    nfs: {
      mount_options: {
        version: "AUTOMATIC", # accepts AUTOMATIC, NFS3, NFS4_0, NFS4_1
      },
    },
    smb: {
      domain: "SmbDomain",
      mount_options: {
        version: "AUTOMATIC", # accepts AUTOMATIC, SMB2, SMB3
      },
      password: "SmbPassword", # required
      user: "SmbUser", # required
    },
  },
  security_group_arns: ["Ec2SecurityGroupArn"], # required
  storage_virtual_machine_arn: "StorageVirtualMachineArn", # required
  subdirectory: "FsxOntapSubdirectory",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.location_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :protocol (required, Types::FsxProtocol)

    Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system.

  • :security_group_arns (required, Array<String>)

    Specifies the Amazon EC2 security groups that provide access to your file system's preferred subnet.

    The security groups must allow outbound traffic on the following ports (depending on the protocol you use):

    • Network File System (NFS): TCP ports 111, 635, and 2049

    • Server Message Block (SMB): TCP port 445

    Your file system's security groups must also allow inbound traffic on the same ports.

  • :storage_virtual_machine_arn (required, String)

    Specifies the ARN of the storage virtual machine (SVM) on your file system where you're copying data to or from.

  • :subdirectory (String)

    Specifies the junction path (also known as a mount point) in the SVM volume where you're copying data to or from (for example, /vol1).

    Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide.

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

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

Returns:

See Also:



738
739
740
741
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 738

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

#create_location_fsx_open_zfs(params = {}) ⇒ Types::CreateLocationFsxOpenZfsResponse

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

Examples:

Request syntax with placeholder values


resp = client.create_location_fsx_open_zfs({
  fsx_filesystem_arn: "FsxFilesystemArn", # required
  protocol: { # required
    nfs: {
      mount_options: {
        version: "AUTOMATIC", # accepts AUTOMATIC, NFS3, NFS4_0, NFS4_1
      },
    },
    smb: {
      domain: "SmbDomain",
      mount_options: {
        version: "AUTOMATIC", # accepts AUTOMATIC, SMB2, SMB3
      },
      password: "SmbPassword", # required
      user: "SmbUser", # required
    },
  },
  security_group_arns: ["Ec2SecurityGroupArn"], # required
  subdirectory: "FsxOpenZfsSubdirectory",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.location_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :fsx_filesystem_arn (required, String)

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

  • :protocol (required, Types::FsxProtocol)

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

  • :security_group_arns (required, Array<String>)

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

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



807
808
809
810
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 807

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

#create_location_fsx_windows(params = {}) ⇒ Types::CreateLocationFsxWindowsResponse

Creates an endpoint for an Amazon FSx for Windows File Server file system.

Examples:

Request syntax with placeholder values


resp = client.create_location_fsx_windows({
  subdirectory: "FsxWindowsSubdirectory",
  fsx_filesystem_arn: "FsxFilesystemArn", # required
  security_group_arns: ["Ec2SecurityGroupArn"], # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  user: "SmbUser", # required
  domain: "SmbDomain",
  password: "SmbPassword", # required
})

Response structure


resp.location_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :subdirectory (String)

    Specifies a mount path for your file system using forward slashes. This is where DataSync reads or writes data (depending on if this is a source or destination location).

  • :fsx_filesystem_arn (required, String)

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

  • :security_group_arns (required, Array<String>)

    Specifies the ARNs of the security groups that provide access to your file system's preferred subnet.

    If you choose a security group that doesn't allow connections from within itself, do one of the following:

    • Configure the security group to allow it to communicate within itself.

    • Choose a different security group that can communicate with the mount target's security group.

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

    Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

  • :user (required, String)

    Specifies the user who has the permissions to access files and folders in the file system.

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

  • :domain (String)

    Specifies the name of the Windows domain that the FSx for Windows File Server belongs to.

  • :password (required, String)

    Specifies the password of the user who has the permissions to access files and folders in the file system.

Returns:

See Also:



889
890
891
892
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 889

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

#create_location_hdfs(params = {}) ⇒ Types::CreateLocationHdfsResponse

Creates an endpoint for a Hadoop Distributed File System (HDFS).

Examples:

Request syntax with placeholder values


resp = client.create_location_hdfs({
  subdirectory: "HdfsSubdirectory",
  name_nodes: [ # required
    {
      hostname: "HdfsServerHostname", # required
      port: 1, # required
    },
  ],
  block_size: 1,
  replication_factor: 1,
  kms_key_provider_uri: "KmsKeyProviderUri",
  qop_configuration: {
    rpc_protection: "DISABLED", # accepts DISABLED, AUTHENTICATION, INTEGRITY, PRIVACY
    data_transfer_protection: "DISABLED", # accepts DISABLED, AUTHENTICATION, INTEGRITY, PRIVACY
  },
  authentication_type: "SIMPLE", # required, accepts SIMPLE, KERBEROS
  simple_user: "HdfsUser",
  kerberos_principal: "KerberosPrincipal",
  kerberos_keytab: "data",
  kerberos_krb_5_conf: "data",
  agent_arns: ["AgentArn"], # 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 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 /.

  • :name_nodes (required, Array<Types::HdfsNameNode>)

    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.

  • :block_size (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).

  • :replication_factor (Integer)

    The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.

  • :kms_key_provider_uri (String)

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

  • :qop_configuration (Types::QopConfiguration)

    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.

  • :authentication_type (required, String)

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

  • :simple_user (String)

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

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

  • :kerberos_principal (String)

    The Kerberos principal with access to the files and folders on the HDFS cluster.

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

  • :kerberos_keytab (String, StringIO, File)

    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.

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

  • :kerberos_krb_5_conf (String, StringIO, File)

    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.

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

  • :agent_arns (required, Array<String>)

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

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



1024
1025
1026
1027
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1024

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

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

Defines a file system on a Network File System (NFS) server that can be read from or written to.

Examples:

Request syntax with placeholder values


resp = client.create_location_nfs({
  subdirectory: "NfsSubdirectory", # 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.

    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 (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 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 (required, Types::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 (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:



1131
1132
1133
1134
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1131

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

#create_location_object_storage(params = {}) ⇒ Types::CreateLocationObjectStorageResponse

Creates an endpoint for an object storage system that DataSync can access for a transfer. For more information, see Creating a location for object storage.

Examples:

Request syntax with placeholder values


resp = client.create_location_object_storage({
  server_hostname: "ServerHostname", # required
  server_port: 1,
  server_protocol: "HTTPS", # accepts HTTPS, HTTP
  subdirectory: "S3Subdirectory",
  bucket_name: "ObjectStorageBucketName", # required
  access_key: "ObjectStorageAccessKey",
  secret_key: "ObjectStorageSecretKey",
  agent_arns: ["AgentArn"], # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.location_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :server_hostname (required, String)

    Specifies the domain name or IP address of the object storage server. A DataSync agent uses this hostname to mount the object storage server in a network.

  • :server_port (Integer)

    Specifies the port that your object storage server accepts inbound network traffic on (for example, port 443).

  • :server_protocol (String)

    Specifies the protocol that your object storage server uses to communicate.

  • :subdirectory (String)

    Specifies the object prefix for your object storage server. If this is a source location, DataSync only copies objects with this prefix. If this is a destination location, DataSync writes all objects with this prefix.

  • :bucket_name (required, String)

    Specifies the name of the object storage bucket involved in the transfer.

  • :access_key (String)

    Specifies the access key (for example, a user name) if credentials are required to authenticate with the object storage server.

  • :secret_key (String)

    Specifies the secret key (for example, a password) if credentials are required to authenticate with the object storage server.

  • :agent_arns (required, Array<String>)

    Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can securely connect with your location.

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

    Specifies the key-value pair that represents a tag that you want to add to the resource. Tags can help you manage, filter, and search for your resources. We recommend creating a name tag for your location.

Returns:

See Also:



1215
1216
1217
1218
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1215

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

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

Creates an endpoint for an Amazon S3 bucket.

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

Examples:

Request syntax with placeholder values


resp = client.create_location_s3({
  subdirectory: "S3Subdirectory",
  s3_bucket_arn: "S3BucketArn", # required
  s3_storage_class: "STANDARD", # accepts STANDARD, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
  s3_config: { # required
    bucket_access_role_arn: "IamRoleArn", # required
  },
  agent_arns: ["AgentArn"],
  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 ARN of the Amazon S3 bucket. If the bucket is on an Amazon Web Services Outpost, this must be an access point ARN.

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

  • :s3_config (required, Types::S3Config)

    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.

  • :agent_arns (Array<String>)

    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.

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



1308
1309
1310
1311
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1308

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

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

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

Examples:

Request syntax with placeholder values


resp = client.create_location_smb({
  subdirectory: "SmbSubdirectory", # 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.

    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.

  • :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 hostname 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 folders in the SMB share.

    For information about choosing a user name that ensures sufficient permissions to files, folders, and metadata, see the User setting for SMB locations.

  • :domain (String)

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

  • :password (required, String)

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

  • :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 used by DataSync to access the SMB server.

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



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

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

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

Configures a task, which defines where and how DataSync transfers your data.

A task includes a source location, a destination location, and the preferences for how and when you want to transfer your data (such as bandwidth limits, scheduling, among other options).

When you create a task that transfers data between Amazon Web Services services in different Amazon Web Services Regions, one of your locations must reside in the Region where you're using DataSync.

For more information, see the following topics:

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, ONLY_FILES_TRANSFERRED, NONE
    overwrite_mode: "ALWAYS", # accepts ALWAYS, NEVER
    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, PRESERVE
    bytes_per_second: 1,
    task_queueing: "ENABLED", # accepts ENABLED, DISABLED
    log_level: "OFF", # accepts OFF, BASIC, TRANSFER
    transfer_mode: "CHANGED", # accepts CHANGED, ALL
    security_descriptor_copy_flags: "NONE", # accepts NONE, OWNER_DACL, OWNER_DACL_SACL
    object_tags: "PRESERVE", # accepts PRESERVE, NONE
  },
  excludes: [
    {
      filter_type: "SIMPLE_PATTERN", # accepts SIMPLE_PATTERN
      value: "FilterValue",
    },
  ],
  schedule: {
    schedule_expression: "ScheduleExpressionCron", # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  includes: [
    {
      filter_type: "SIMPLE_PATTERN", # accepts SIMPLE_PATTERN
      value: "FilterValue",
    },
  ],
})

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 Amazon Web Services 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.

  • :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 the task execution. For more information, see the StartTaskExecution 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".

  • :schedule (Types::TaskSchedule)

    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.

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

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

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

Returns:

See Also:



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

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 Amazon Web Services 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 Amazon Web Services Region.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1576
1577
1578
1579
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1576

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



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

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:



1620
1621
1622
1623
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1620

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", "FIPS"
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:



1668
1669
1670
1671
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1668

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

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

Returns metadata about your DataSync location for an Amazon EFS file system.

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
resp.access_point_arn #=> String
resp.file_system_access_role_arn #=> String
resp.in_transit_encryption #=> String, one of "NONE", "TLS1_2"

Parameters:

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

    ({})

Options Hash (params):

  • :location_arn (required, String)

    The Amazon Resource Name (ARN) of the Amazon EFS file system location that you want information about.

Returns:

See Also:



1712
1713
1714
1715
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1712

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

#describe_location_fsx_lustre(params = {}) ⇒ Types::DescribeLocationFsxLustreResponse

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

Examples:

Request syntax with placeholder values


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

Response structure


resp.location_arn #=> String
resp.location_uri #=> String
resp.security_group_arns #=> Array
resp.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 FSx for Lustre location to describe.

Returns:

See Also:



1749
1750
1751
1752
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1749

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

#describe_location_fsx_ontap(params = {}) ⇒ Types::DescribeLocationFsxOntapResponse

Provides details about how an DataSync location for an Amazon FSx for NetApp ONTAP file system is configured.

Examples:

Request syntax with placeholder values


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

Response structure


resp.creation_time #=> Time
resp.location_arn #=> String
resp.location_uri #=> String
resp.protocol.nfs.mount_options.version #=> String, one of "AUTOMATIC", "NFS3", "NFS4_0", "NFS4_1"
resp.protocol.smb.domain #=> String
resp.protocol.smb.mount_options.version #=> String, one of "AUTOMATIC", "SMB2", "SMB3"
resp.protocol.smb.password #=> String
resp.protocol.smb.user #=> String
resp.security_group_arns #=> Array
resp.security_group_arns[0] #=> String
resp.storage_virtual_machine_arn #=> String
resp.fsx_filesystem_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :location_arn (required, String)

    Specifies the Amazon Resource Name (ARN) of the FSx for ONTAP file system location that you want information about.

Returns:

See Also:



1796
1797
1798
1799
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1796

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

#describe_location_fsx_open_zfs(params = {}) ⇒ Types::DescribeLocationFsxOpenZfsResponse

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

Examples:

Request syntax with placeholder values


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

Response structure


resp.location_arn #=> String
resp.location_uri #=> String
resp.security_group_arns #=> Array
resp.security_group_arns[0] #=> String
resp.protocol.nfs.mount_options.version #=> String, one of "AUTOMATIC", "NFS3", "NFS4_0", "NFS4_1"
resp.protocol.smb.domain #=> String
resp.protocol.smb.mount_options.version #=> String, one of "AUTOMATIC", "SMB2", "SMB3"
resp.protocol.smb.password #=> String
resp.protocol.smb.user #=> String
resp.creation_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :location_arn (required, String)

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

Returns:

See Also:



1839
1840
1841
1842
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1839

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

#describe_location_fsx_windows(params = {}) ⇒ Types::DescribeLocationFsxWindowsResponse

Returns metadata about an Amazon FSx for Windows File Server location, such as information about its path.

Examples:

Request syntax with placeholder values


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

Response structure


resp.location_arn #=> String
resp.location_uri #=> String
resp.security_group_arns #=> Array
resp.security_group_arns[0] #=> String
resp.creation_time #=> Time
resp.user #=> String
resp.domain #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :location_arn (required, String)

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

Returns:

See Also:



1880
1881
1882
1883
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1880

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

#describe_location_hdfs(params = {}) ⇒ Types::DescribeLocationHdfsResponse

Returns metadata, such as the authentication information about the Hadoop Distributed File System (HDFS) location.

Examples:

Request syntax with placeholder values


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

Response structure


resp.location_arn #=> String
resp.location_uri #=> String
resp.name_nodes #=> Array
resp.name_nodes[0].hostname #=> String
resp.name_nodes[0].port #=> Integer
resp.block_size #=> Integer
resp.replication_factor #=> Integer
resp.kms_key_provider_uri #=> String
resp.qop_configuration.rpc_protection #=> String, one of "DISABLED", "AUTHENTICATION", "INTEGRITY", "PRIVACY"
resp.qop_configuration.data_transfer_protection #=> String, one of "DISABLED", "AUTHENTICATION", "INTEGRITY", "PRIVACY"
resp.authentication_type #=> String, one of "SIMPLE", "KERBEROS"
resp.simple_user #=> String
resp.kerberos_principal #=> String
resp.agent_arns #=> Array
resp.agent_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 HDFS cluster location to describe.

Returns:

See Also:



1936
1937
1938
1939
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1936

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

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

Returns metadata, such as the path information, about an 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:



1973
1974
1975
1976
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 1973

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

#describe_location_object_storage(params = {}) ⇒ Types::DescribeLocationObjectStorageResponse

Returns metadata about your DataSync location for an object storage system.

Examples:

Request syntax with placeholder values


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

Response structure


resp.location_arn #=> String
resp.location_uri #=> String
resp.access_key #=> String
resp.server_port #=> Integer
resp.server_protocol #=> String, one of "HTTPS", "HTTP"
resp.agent_arns #=> Array
resp.agent_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 object storage system location that you want information about.

Returns:

See Also:



2016
2017
2018
2019
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2016

def describe_location_object_storage(params = {}, options = {})
  req = build_request(:describe_location_object_storage, 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_storage_class #=> String, one of "STANDARD", "STANDARD_IA", "ONEZONE_IA", "INTELLIGENT_TIERING", "GLACIER", "DEEP_ARCHIVE", "OUTPOSTS"
resp.s3_config.bucket_access_role_arn #=> String
resp.agent_arns #=> Array
resp.agent_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 Amazon S3 bucket location to describe.

Returns:

See Also:



2057
2058
2059
2060
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2057

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 an 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:



2099
2100
2101
2102
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2099

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", "QUEUED", "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", "ONLY_FILES_TRANSFERRED", "NONE"
resp.options.overwrite_mode #=> String, one of "ALWAYS", "NEVER"
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", "PRESERVE"
resp.options.bytes_per_second #=> Integer
resp.options.task_queueing #=> String, one of "ENABLED", "DISABLED"
resp.options.log_level #=> String, one of "OFF", "BASIC", "TRANSFER"
resp.options.transfer_mode #=> String, one of "CHANGED", "ALL"
resp.options.security_descriptor_copy_flags #=> String, one of "NONE", "OWNER_DACL", "OWNER_DACL_SACL"
resp.options.object_tags #=> String, one of "PRESERVE", "NONE"
resp.excludes #=> Array
resp.excludes[0].filter_type #=> String, one of "SIMPLE_PATTERN"
resp.excludes[0].value #=> String
resp.schedule.schedule_expression #=> String
resp.error_code #=> String
resp.error_detail #=> String
resp.creation_time #=> Time
resp.includes #=> Array
resp.includes[0].filter_type #=> String, one of "SIMPLE_PATTERN"
resp.includes[0].value #=> String

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:



2177
2178
2179
2180
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2177

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 "QUEUED", "LAUNCHING", "PREPARING", "TRANSFERRING", "VERIFYING", "SUCCESS", "ERROR"
resp.options.verify_mode #=> String, one of "POINT_IN_TIME_CONSISTENT", "ONLY_FILES_TRANSFERRED", "NONE"
resp.options.overwrite_mode #=> String, one of "ALWAYS", "NEVER"
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", "PRESERVE"
resp.options.bytes_per_second #=> Integer
resp.options.task_queueing #=> String, one of "ENABLED", "DISABLED"
resp.options.log_level #=> String, one of "OFF", "BASIC", "TRANSFER"
resp.options.transfer_mode #=> String, one of "CHANGED", "ALL"
resp.options.security_descriptor_copy_flags #=> String, one of "NONE", "OWNER_DACL", "OWNER_DACL_SACL"
resp.options.object_tags #=> String, one of "PRESERVE", "NONE"
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.total_duration #=> Integer
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:



2253
2254
2255
2256
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2253

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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:



2304
2305
2306
2307
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2304

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

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

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_locations({
  max_results: 1,
  next_token: "NextToken",
  filters: [
    {
      name: "LocationUri", # required, accepts LocationUri, LocationType, CreationTime
      values: ["FilterAttributeValue"], # required
      operator: "Equals", # required, accepts Equals, NotEquals, In, LessThanOrEqual, LessThan, GreaterThanOrEqual, GreaterThan, Contains, NotContains, BeginsWith
    },
  ],
})

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.

  • :filters (Array<Types::LocationFilter>)

    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.

Returns:

See Also:



2361
2362
2363
2364
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2361

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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:



2404
2405
2406
2407
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2404

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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 "QUEUED", "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:



2448
2449
2450
2451
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2448

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 the DataSync tasks you created.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_tasks({
  max_results: 1,
  next_token: "NextToken",
  filters: [
    {
      name: "LocationId", # required, accepts LocationId, CreationTime
      values: ["FilterAttributeValue"], # required
      operator: "Equals", # required, accepts Equals, NotEquals, In, LessThanOrEqual, LessThan, GreaterThanOrEqual, GreaterThan, Contains, NotContains, BeginsWith
    },
  ],
})

Response structure


resp.tasks #=> Array
resp.tasks[0].task_arn #=> String
resp.tasks[0].status #=> String, one of "AVAILABLE", "CREATING", "QUEUED", "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.

  • :filters (Array<Types::TaskFilter>)

    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.

Returns:

See Also:



2501
2502
2503
2504
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2501

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 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, ONLY_FILES_TRANSFERRED, NONE
    overwrite_mode: "ALWAYS", # accepts ALWAYS, NEVER
    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, PRESERVE
    bytes_per_second: 1,
    task_queueing: "ENABLED", # accepts ENABLED, DISABLED
    log_level: "OFF", # accepts OFF, BASIC, TRANSFER
    transfer_mode: "CHANGED", # accepts CHANGED, ALL
    security_descriptor_copy_flags: "NONE", # accepts NONE, OWNER_DACL, OWNER_DACL_SACL
    object_tags: "PRESERVE", # accepts PRESERVE, NONE
  },
  includes: [
    {
      filter_type: "SIMPLE_PATTERN", # accepts SIMPLE_PATTERN
      value: "FilterValue",
    },
  ],
  excludes: [
    {
      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".

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

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

Returns:

See Also:



2594
2595
2596
2597
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2594

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 Amazon Web Services 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:



2625
2626
2627
2628
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2625

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 Amazon Web Services 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:



2651
2652
2653
2654
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2651

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:



2677
2678
2679
2680
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2677

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

#update_location_hdfs(params = {}) ⇒ Struct

Updates some parameters of a previously created location for a Hadoop Distributed File System cluster.

Examples:

Request syntax with placeholder values


resp = client.update_location_hdfs({
  location_arn: "LocationArn", # required
  subdirectory: "HdfsSubdirectory",
  name_nodes: [
    {
      hostname: "HdfsServerHostname", # required
      port: 1, # required
    },
  ],
  block_size: 1,
  replication_factor: 1,
  kms_key_provider_uri: "KmsKeyProviderUri",
  qop_configuration: {
    rpc_protection: "DISABLED", # accepts DISABLED, AUTHENTICATION, INTEGRITY, PRIVACY
    data_transfer_protection: "DISABLED", # accepts DISABLED, AUTHENTICATION, INTEGRITY, PRIVACY
  },
  authentication_type: "SIMPLE", # accepts SIMPLE, KERBEROS
  simple_user: "HdfsUser",
  kerberos_principal: "KerberosPrincipal",
  kerberos_keytab: "data",
  kerberos_krb_5_conf: "data",
  agent_arns: ["AgentArn"],
})

Parameters:

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

    ({})

Options Hash (params):

  • :location_arn (required, String)

    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.

  • :name_nodes (Array<Types::HdfsNameNode>)

    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.

  • :block_size (Integer)

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

  • :replication_factor (Integer)

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

  • :kms_key_provider_uri (String)

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

  • :qop_configuration (Types::QopConfiguration)

    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.

  • :authentication_type (String)

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

  • :simple_user (String)

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

  • :kerberos_principal (String)

    The Kerberos principal with access to the files and folders on the HDFS cluster.

  • :kerberos_keytab (String, StringIO, File)

    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.

  • :kerberos_krb_5_conf (String, StringIO, File)

    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.

  • :agent_arns (Array<String>)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2772
2773
2774
2775
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2772

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

#update_location_nfs(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.update_location_nfs({
  location_arn: "LocationArn", # required
  subdirectory: "NfsSubdirectory",
  on_prem_config: {
    agent_arns: ["AgentArn"], # required
  },
  mount_options: {
    version: "AUTOMATIC", # accepts AUTOMATIC, NFS3, NFS4_0, NFS4_1
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :location_arn (required, String)

    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.

  • :on_prem_config (Types::OnPremConfig)

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

  • :mount_options (Types::NfsMountOptions)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2846
2847
2848
2849
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2846

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

#update_location_object_storage(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.update_location_object_storage({
  location_arn: "LocationArn", # required
  server_port: 1,
  server_protocol: "HTTPS", # accepts HTTPS, HTTP
  subdirectory: "S3Subdirectory",
  access_key: "ObjectStorageAccessKey",
  secret_key: "ObjectStorageSecretKey",
  agent_arns: ["AgentArn"],
})

Parameters:

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

    ({})

Options Hash (params):

  • :location_arn (required, String)

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

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

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

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

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

  • :agent_arns (Array<String>)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2912
2913
2914
2915
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2912

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

#update_location_smb(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.update_location_smb({
  location_arn: "LocationArn", # required
  subdirectory: "SmbSubdirectory",
  user: "SmbUser",
  domain: "SmbDomain",
  password: "SmbPassword",
  agent_arns: ["AgentArn"],
  mount_options: {
    version: "AUTOMATIC", # accepts AUTOMATIC, SMB2, SMB3
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :location_arn (required, String)

    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.

    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.

  • :agent_arns (Array<String>)

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

  • :mount_options (Types::SmbMountOptions)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2993
2994
2995
2996
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 2993

def update_location_smb(params = {}, options = {})
  req = build_request(:update_location_smb, 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, ONLY_FILES_TRANSFERRED, NONE
    overwrite_mode: "ALWAYS", # accepts ALWAYS, NEVER
    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, PRESERVE
    bytes_per_second: 1,
    task_queueing: "ENABLED", # accepts ENABLED, DISABLED
    log_level: "OFF", # accepts OFF, BASIC, TRANSFER
    transfer_mode: "CHANGED", # accepts CHANGED, ALL
    security_descriptor_copy_flags: "NONE", # accepts NONE, OWNER_DACL, OWNER_DACL_SACL
    object_tags: "PRESERVE", # accepts PRESERVE, NONE
  },
  excludes: [
    {
      filter_type: "SIMPLE_PATTERN", # accepts SIMPLE_PATTERN
      value: "FilterValue",
    },
  ],
  schedule: {
    schedule_expression: "ScheduleExpressionCron", # required
  },
  name: "TagValue",
  cloud_watch_log_group_arn: "LogGroupArn",
  includes: [
    {
      filter_type: "SIMPLE_PATTERN", # accepts SIMPLE_PATTERN
      value: "FilterValue",
    },
  ],
})

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

  • :schedule (Types::TaskSchedule)

    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.

  • :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 Amazon CloudWatch log group.

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

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3097
3098
3099
3100
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 3097

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

#update_task_execution(params = {}) ⇒ Struct

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.

The only Option that can be modified by UpdateTaskExecution is BytesPerSecond.

Examples:

Request syntax with placeholder values


resp = client.update_task_execution({
  task_execution_arn: "TaskExecutionArn", # required
  options: { # required
    verify_mode: "POINT_IN_TIME_CONSISTENT", # accepts POINT_IN_TIME_CONSISTENT, ONLY_FILES_TRANSFERRED, NONE
    overwrite_mode: "ALWAYS", # accepts ALWAYS, NEVER
    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, PRESERVE
    bytes_per_second: 1,
    task_queueing: "ENABLED", # accepts ENABLED, DISABLED
    log_level: "OFF", # accepts OFF, BASIC, TRANSFER
    transfer_mode: "CHANGED", # accepts CHANGED, ALL
    security_descriptor_copy_flags: "NONE", # accepts NONE, OWNER_DACL, OWNER_DACL_SACL
    object_tags: "PRESERVE", # accepts PRESERVE, NONE
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :task_execution_arn (required, String)

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

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3166
3167
3168
3169
# File 'gems/aws-sdk-datasync/lib/aws-sdk-datasync/client.rb', line 3166

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