aws-sdk-datasync 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fce05537514cdb0e68347e0109a280d37d086e94
4
+ data.tar.gz: 4b8f987e32a3bc1a083162b06ec29a4845c65f20
5
+ SHA512:
6
+ metadata.gz: 8bfe2f18ea54ef5126add7ea859e3c5e1dd004878d166cce9535d276a129e23876caa08fa0dde81a43ed18e1dbedcced73ee933dda0f4d36625738579b21afb8
7
+ data.tar.gz: 46458e8acaa20f68c7433e563859ccdc4f8bf69d44610ec33ce7af862c4fe59f2f1f0bea2d31ac7e7a0fae3af7240172c26b1f622121a6e6673326d697d7b59d
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-datasync/types'
12
+ require_relative 'aws-sdk-datasync/client_api'
13
+ require_relative 'aws-sdk-datasync/client'
14
+ require_relative 'aws-sdk-datasync/errors'
15
+ require_relative 'aws-sdk-datasync/resource'
16
+ require_relative 'aws-sdk-datasync/customizations'
17
+
18
+ # This module provides support for AWS DataSync. This module is available in the
19
+ # `aws-sdk-datasync` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from AWS DataSync all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::DataSync::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::DataSync
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,1428 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
19
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
20
+ require 'aws-sdk-core/plugins/response_paging.rb'
21
+ require 'aws-sdk-core/plugins/stub_responses.rb'
22
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
23
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
+ require 'aws-sdk-core/plugins/signature_v4.rb'
27
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
28
+
29
+ Aws::Plugins::GlobalConfiguration.add_identifier(:datasync)
30
+
31
+ module Aws::DataSync
32
+ class Client < Seahorse::Client::Base
33
+
34
+ include Aws::ClientStubs
35
+
36
+ @identifier = :datasync
37
+
38
+ set_api(ClientApi::API)
39
+
40
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
41
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
42
+ add_plugin(Aws::Plugins::Logging)
43
+ add_plugin(Aws::Plugins::ParamConverter)
44
+ add_plugin(Aws::Plugins::ParamValidator)
45
+ add_plugin(Aws::Plugins::UserAgent)
46
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
47
+ add_plugin(Aws::Plugins::RetryErrors)
48
+ add_plugin(Aws::Plugins::GlobalConfiguration)
49
+ add_plugin(Aws::Plugins::RegionalEndpoint)
50
+ add_plugin(Aws::Plugins::EndpointDiscovery)
51
+ add_plugin(Aws::Plugins::EndpointPattern)
52
+ add_plugin(Aws::Plugins::ResponsePaging)
53
+ add_plugin(Aws::Plugins::StubResponses)
54
+ add_plugin(Aws::Plugins::IdempotencyToken)
55
+ add_plugin(Aws::Plugins::JsonvalueConverter)
56
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
57
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
58
+ add_plugin(Aws::Plugins::SignatureV4)
59
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
60
+
61
+ # @overload initialize(options)
62
+ # @param [Hash] options
63
+ # @option options [required, Aws::CredentialProvider] :credentials
64
+ # Your AWS credentials. This can be an instance of any one of the
65
+ # following classes:
66
+ #
67
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
68
+ # credentials.
69
+ #
70
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
71
+ # from an EC2 IMDS on an EC2 instance.
72
+ #
73
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
74
+ # shared file, such as `~/.aws/config`.
75
+ #
76
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
77
+ #
78
+ # When `:credentials` are not configured directly, the following
79
+ # locations will be searched for credentials:
80
+ #
81
+ # * `Aws.config[:credentials]`
82
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
83
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
84
+ # * `~/.aws/credentials`
85
+ # * `~/.aws/config`
86
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
87
+ # very aggressive. Construct and pass an instance of
88
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
89
+ # timeouts.
90
+ #
91
+ # @option options [required, String] :region
92
+ # The AWS region to connect to. The configured `:region` is
93
+ # used to determine the service `:endpoint`. When not passed,
94
+ # a default `:region` is search for in the following locations:
95
+ #
96
+ # * `Aws.config[:region]`
97
+ # * `ENV['AWS_REGION']`
98
+ # * `ENV['AMAZON_REGION']`
99
+ # * `ENV['AWS_DEFAULT_REGION']`
100
+ # * `~/.aws/credentials`
101
+ # * `~/.aws/config`
102
+ #
103
+ # @option options [String] :access_key_id
104
+ #
105
+ # @option options [Boolean] :active_endpoint_cache (false)
106
+ # When set to `true`, a thread polling for endpoints will be running in
107
+ # the background every 60 secs (default). Defaults to `false`.
108
+ #
109
+ # @option options [Boolean] :client_side_monitoring (false)
110
+ # When `true`, client-side metrics will be collected for all API requests from
111
+ # this client.
112
+ #
113
+ # @option options [String] :client_side_monitoring_client_id ("")
114
+ # Allows you to provide an identifier for this client which will be attached to
115
+ # all generated client side metrics. Defaults to an empty string.
116
+ #
117
+ # @option options [Integer] :client_side_monitoring_port (31000)
118
+ # Required for publishing client metrics. The port that the client side monitoring
119
+ # agent is running on, where client metrics will be published via UDP.
120
+ #
121
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
122
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
123
+ # will use the Client Side Monitoring Agent Publisher.
124
+ #
125
+ # @option options [Boolean] :convert_params (true)
126
+ # When `true`, an attempt is made to coerce request parameters into
127
+ # the required types.
128
+ #
129
+ # @option options [Boolean] :disable_host_prefix_injection (false)
130
+ # Set to true to disable SDK automatically adding host prefix
131
+ # to default service endpoint when available.
132
+ #
133
+ # @option options [String] :endpoint
134
+ # The client endpoint is normally constructed from the `:region`
135
+ # option. You should only configure an `:endpoint` when connecting
136
+ # to test endpoints. This should be avalid HTTP(S) URI.
137
+ #
138
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
139
+ # Used for the maximum size limit of the LRU cache storing endpoints data
140
+ # for endpoint discovery enabled operations. Defaults to 1000.
141
+ #
142
+ # @option options [Integer] :endpoint_cache_max_threads (10)
143
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
144
+ #
145
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
146
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
147
+ # Use this option to config the time interval in seconds for making
148
+ # requests fetching endpoints information. Defaults to 60 sec.
149
+ #
150
+ # @option options [Boolean] :endpoint_discovery (false)
151
+ # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
152
+ #
153
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
154
+ # The log formatter.
155
+ #
156
+ # @option options [Symbol] :log_level (:info)
157
+ # The log level to send messages to the `:logger` at.
158
+ #
159
+ # @option options [Logger] :logger
160
+ # The Logger instance to send log messages to. If this option
161
+ # is not set, logging will be disabled.
162
+ #
163
+ # @option options [String] :profile ("default")
164
+ # Used when loading credentials from the shared credentials file
165
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
166
+ #
167
+ # @option options [Float] :retry_base_delay (0.3)
168
+ # The base delay in seconds used by the default backoff function.
169
+ #
170
+ # @option options [Symbol] :retry_jitter (:none)
171
+ # 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.
172
+ #
173
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
174
+ #
175
+ # @option options [Integer] :retry_limit (3)
176
+ # The maximum number of times to retry failed requests. Only
177
+ # ~ 500 level server errors and certain ~ 400 level client errors
178
+ # are retried. Generally, these are throttling errors, data
179
+ # checksum errors, networking errors, timeout errors and auth
180
+ # errors from expired credentials.
181
+ #
182
+ # @option options [Integer] :retry_max_delay (0)
183
+ # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
184
+ #
185
+ # @option options [String] :secret_access_key
186
+ #
187
+ # @option options [String] :session_token
188
+ #
189
+ # @option options [Boolean] :simple_json (false)
190
+ # Disables request parameter conversion, validation, and formatting.
191
+ # Also disable response data type conversions. This option is useful
192
+ # when you want to ensure the highest level of performance by
193
+ # avoiding overhead of walking request parameters and response data
194
+ # structures.
195
+ #
196
+ # When `:simple_json` is enabled, the request parameters hash must
197
+ # be formatted exactly as the DynamoDB API expects.
198
+ #
199
+ # @option options [Boolean] :stub_responses (false)
200
+ # Causes the client to return stubbed responses. By default
201
+ # fake responses are generated and returned. You can specify
202
+ # the response data to return or errors to raise by calling
203
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
204
+ #
205
+ # ** Please note ** When response stubbing is enabled, no HTTP
206
+ # requests are made, and retries are disabled.
207
+ #
208
+ # @option options [Boolean] :validate_params (true)
209
+ # When `true`, request parameters are validated before
210
+ # sending the request.
211
+ #
212
+ def initialize(*args)
213
+ super
214
+ end
215
+
216
+ # @!group API Operations
217
+
218
+ # Cancels execution of a task.
219
+ #
220
+ # When you cancel a task execution, the transfer of some files are
221
+ # abruptly interrupted. The contents of files that are transferred to
222
+ # the destination might be incomplete or inconsistent with the source
223
+ # files. However, if you start a new task execution on the same task and
224
+ # you allow the task execution to complete, file content on the
225
+ # destination is complete and consistent. This applies to other
226
+ # unexpected failures that interrupt a task execution. In all of these
227
+ # cases, AWS DataSync successfully complete the transfer when you start
228
+ # the next task execution.
229
+ #
230
+ # @option params [required, String] :task_execution_arn
231
+ # The Amazon Resource Name (ARN) of the task execution to cancel.
232
+ #
233
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
234
+ #
235
+ # @example Request syntax with placeholder values
236
+ #
237
+ # resp = client.cancel_task_execution({
238
+ # task_execution_arn: "TaskExecutionArn", # required
239
+ # })
240
+ #
241
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CancelTaskExecution AWS API Documentation
242
+ #
243
+ # @overload cancel_task_execution(params = {})
244
+ # @param [Hash] params ({})
245
+ def cancel_task_execution(params = {}, options = {})
246
+ req = build_request(:cancel_task_execution, params)
247
+ req.send_request(options)
248
+ end
249
+
250
+ # Activates an AWS DataSync agent that you have deployed on your host.
251
+ # The activation process associates your agent with your account. In the
252
+ # activation process, you specify information such as the AWS Region
253
+ # that you want to activate the agent in. You activate the agent in the
254
+ # AWS Region where your target locations (in Amazon S3 or Amazon EFS)
255
+ # reside. Your tasks are created in this AWS Region.
256
+ #
257
+ # You can use an agent for more than one location. If a task uses
258
+ # multiple agents, all of them need to have status AVAILABLE for the
259
+ # task to run. If you use multiple agents for a source location, the
260
+ # status of all the agents must be AVAILABLE for the task to run. For
261
+ # more information, see [Activating a Sync Agent][1] in the *AWS
262
+ # DataSync User Guide.*
263
+ #
264
+ # Agents are automatically updated by AWS on a regular basis, using a
265
+ # mechanism that ensures minimal interruption to your tasks.
266
+ #
267
+ #
268
+ #
269
+ #
270
+ #
271
+ # [1]: https://docs.aws.amazon.com/sync-service/latest/userguide/working-with-sync-agents.html#activating-sync-agent
272
+ #
273
+ # @option params [required, String] :activation_key
274
+ # Your agent activation key. You can get the activation key either by
275
+ # sending an HTTP GET request with redirects that enable you to get the
276
+ # agent IP address (port 80). Alternatively, you can get it from the AWS
277
+ # DataSync console.
278
+ #
279
+ # The redirect URL returned in the response provides you the activation
280
+ # key for your agent in the query string parameter `activationKey`. It
281
+ # might also include other activation-related parameters; however, these
282
+ # are merely defaults. The arguments you pass to this API call determine
283
+ # the actual configuration of your agent. For more information, see
284
+ # [Activating a Sync Agent][1] in the *AWS DataSync User Guide.*
285
+ #
286
+ #
287
+ #
288
+ # [1]: https://docs.aws.amazon.com/sync-service/latest/userguide/working-with-sync-agents.html#activating-sync-agent
289
+ #
290
+ # @option params [String] :agent_name
291
+ # The name you configured for your agent. This value is a text reference
292
+ # that is used to identify the agent in the console.
293
+ #
294
+ # @option params [Array<Types::TagListEntry>] :tags
295
+ # The key-value pair that represents the tag you want to associate with
296
+ # the agent. The value can be an empty string. This value helps you
297
+ # manage, filter, and search for your agents.
298
+ #
299
+ # <note markdown="1"> Valid characters for key and value are letters, spaces, and numbers
300
+ # representable in UTF-8 format, and the following special characters: +
301
+ # - = . \_ : / @.
302
+ #
303
+ # </note>
304
+ #
305
+ # @return [Types::CreateAgentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
306
+ #
307
+ # * {Types::CreateAgentResponse#agent_arn #agent_arn} => String
308
+ #
309
+ # @example Request syntax with placeholder values
310
+ #
311
+ # resp = client.create_agent({
312
+ # activation_key: "ActivationKey", # required
313
+ # agent_name: "TagValue",
314
+ # tags: [
315
+ # {
316
+ # key: "TagKey",
317
+ # value: "TagValue",
318
+ # },
319
+ # ],
320
+ # })
321
+ #
322
+ # @example Response structure
323
+ #
324
+ # resp.agent_arn #=> String
325
+ #
326
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateAgent AWS API Documentation
327
+ #
328
+ # @overload create_agent(params = {})
329
+ # @param [Hash] params ({})
330
+ def create_agent(params = {}, options = {})
331
+ req = build_request(:create_agent, params)
332
+ req.send_request(options)
333
+ end
334
+
335
+ # Creates an endpoint for an Amazon EFS file system.
336
+ #
337
+ # @option params [required, String] :subdirectory
338
+ # A subdirectory in the location’s path. This subdirectory in the EFS
339
+ # file system is used to read data from the EFS source location or write
340
+ # data to the EFS destination. By default, AWS DataSync uses the root
341
+ # directory.
342
+ #
343
+ # @option params [required, String] :efs_filesystem_arn
344
+ # The Amazon Resource Name (ARN) for the Amazon EFS file system.
345
+ #
346
+ # @option params [required, Types::Ec2Config] :ec2_config
347
+ # The subnet and security group that the Amazon EFS file system uses.
348
+ #
349
+ # @option params [Array<Types::TagListEntry>] :tags
350
+ # The key-value pair that represents a tag that you want to add to the
351
+ # resource. The value can be an empty string. This value helps you
352
+ # manage, filter, and search for your resources. We recommend that you
353
+ # create a name tag for your location.
354
+ #
355
+ # @return [Types::CreateLocationEfsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
356
+ #
357
+ # * {Types::CreateLocationEfsResponse#location_arn #location_arn} => String
358
+ #
359
+ # @example Request syntax with placeholder values
360
+ #
361
+ # resp = client.create_location_efs({
362
+ # subdirectory: "Subdirectory", # required
363
+ # efs_filesystem_arn: "EfsFilesystemArn", # required
364
+ # ec2_config: { # required
365
+ # subnet_arn: "Ec2SubnetArn", # required
366
+ # security_group_arns: ["Ec2SecurityGroupArn"], # required
367
+ # },
368
+ # tags: [
369
+ # {
370
+ # key: "TagKey",
371
+ # value: "TagValue",
372
+ # },
373
+ # ],
374
+ # })
375
+ #
376
+ # @example Response structure
377
+ #
378
+ # resp.location_arn #=> String
379
+ #
380
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationEfs AWS API Documentation
381
+ #
382
+ # @overload create_location_efs(params = {})
383
+ # @param [Hash] params ({})
384
+ def create_location_efs(params = {}, options = {})
385
+ req = build_request(:create_location_efs, params)
386
+ req.send_request(options)
387
+ end
388
+
389
+ # Creates an endpoint for a Network File System (NFS) file system.
390
+ #
391
+ # @option params [required, String] :subdirectory
392
+ # The subdirectory in the NFS file system that is used to read data from
393
+ # the NFS source location or write data to the NFS destination. The NFS
394
+ # path should be a path that's exported by the NFS server, or a
395
+ # subdirectory of that path. The path should be such that it can be
396
+ # mounted by other NFS clients in your network.
397
+ #
398
+ # To see all the paths exported by your NFS server. run "`showmount -e
399
+ # nfs-server-name`" from an NFS client that has access to your server.
400
+ # You can specify any directory that appears in the results, and any
401
+ # subdirectory of that directory. Ensure that the NFS export is
402
+ # accessible without Kerberos authentication.
403
+ #
404
+ # To transfer all the data in the folder you specified, DataSync needs
405
+ # to have permissions to read all the data. To ensure this, either
406
+ # configure the NFS export with `no_root_squash,` or ensure that the
407
+ # permissions for all of the files that you want sync allow read access
408
+ # for all users. Doing either enables the agent to read the files. For
409
+ # the agent to access directories, you must additionally enable all
410
+ # execute access. For information about NFS export configuration, see
411
+ # [18.7. The /etc/exports Configuration File][1] in the Centos
412
+ # documentation.
413
+ #
414
+ #
415
+ #
416
+ # [1]: https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-nfs-server-config-exports.html
417
+ #
418
+ # @option params [required, String] :server_hostname
419
+ # The name of the NFS server. This value is the IP address or Domain
420
+ # Name Service (DNS) name of the NFS server. An agent that is installed
421
+ # on-premises uses this host name to mount the NFS server in a network.
422
+ #
423
+ # <note markdown="1"> This name must either be DNS-compliant or must be an IP version 4
424
+ # (IPv4) address.
425
+ #
426
+ # </note>
427
+ #
428
+ # @option params [required, Types::OnPremConfig] :on_prem_config
429
+ # Contains a list of Amazon Resource Names (ARNs) of agents that are
430
+ # used to connect to an NFS server.
431
+ #
432
+ # @option params [Array<Types::TagListEntry>] :tags
433
+ # The key-value pair that represents the tag that you want to add to the
434
+ # location. The value can be an empty string. We recommend using tags to
435
+ # name your resources.
436
+ #
437
+ # @return [Types::CreateLocationNfsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
438
+ #
439
+ # * {Types::CreateLocationNfsResponse#location_arn #location_arn} => String
440
+ #
441
+ # @example Request syntax with placeholder values
442
+ #
443
+ # resp = client.create_location_nfs({
444
+ # subdirectory: "Subdirectory", # required
445
+ # server_hostname: "ServerHostname", # required
446
+ # on_prem_config: { # required
447
+ # agent_arns: ["AgentArn"], # required
448
+ # },
449
+ # tags: [
450
+ # {
451
+ # key: "TagKey",
452
+ # value: "TagValue",
453
+ # },
454
+ # ],
455
+ # })
456
+ #
457
+ # @example Response structure
458
+ #
459
+ # resp.location_arn #=> String
460
+ #
461
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationNfs AWS API Documentation
462
+ #
463
+ # @overload create_location_nfs(params = {})
464
+ # @param [Hash] params ({})
465
+ def create_location_nfs(params = {}, options = {})
466
+ req = build_request(:create_location_nfs, params)
467
+ req.send_request(options)
468
+ end
469
+
470
+ # Creates an endpoint for an Amazon S3 bucket.
471
+ #
472
+ # For AWS DataSync to access a destination S3 bucket, it needs an AWS
473
+ # Identity and Access Management (IAM) role that has the required
474
+ # permissions. You can set up the required permissions by creating an
475
+ # IAM policy that grants the required permissions and attaching the
476
+ # policy to the role. An example of such a policy is shown in the
477
+ # examples section. For more information, see [Configuring Amazon S3
478
+ # Location Settings][1] in the *AWS DataSync User Guide*.
479
+ #
480
+ #
481
+ #
482
+ # [1]: https://docs.aws.amazon.com/sync-service/latest/userguide/configuring-s3-locations.html
483
+ #
484
+ # @option params [required, String] :subdirectory
485
+ # A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3
486
+ # is used to read data from the S3 source location or write data to the
487
+ # S3 destination.
488
+ #
489
+ # @option params [required, String] :s3_bucket_arn
490
+ # The Amazon Resource Name (ARN) of the Amazon S3 bucket.
491
+ #
492
+ # @option params [required, Types::S3Config] :s3_config
493
+ # The Amazon Resource Name (ARN) of the AWS Identity and Access
494
+ # Management (IAM) role that is used to access an Amazon S3 bucket. For
495
+ # detailed information about using such a role, see [Components and
496
+ # Terminology][1] in the *AWS DataSync User Guide*.
497
+ #
498
+ #
499
+ #
500
+ # [1]: https://alpha-aws-docs.aws.amazon.com/sync-service/latest/userguide/create-locations-cli.html#create-location-s3-cli
501
+ #
502
+ # @option params [Array<Types::TagListEntry>] :tags
503
+ # The key-value pair that represents the tag that you want to add to the
504
+ # location. The value can be an empty string. We recommend using tags to
505
+ # name your resources.
506
+ #
507
+ # @return [Types::CreateLocationS3Response] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
508
+ #
509
+ # * {Types::CreateLocationS3Response#location_arn #location_arn} => String
510
+ #
511
+ # @example Request syntax with placeholder values
512
+ #
513
+ # resp = client.create_location_s3({
514
+ # subdirectory: "Subdirectory", # required
515
+ # s3_bucket_arn: "S3BucketArn", # required
516
+ # s3_config: { # required
517
+ # bucket_access_role_arn: "IamRoleArn", # required
518
+ # },
519
+ # tags: [
520
+ # {
521
+ # key: "TagKey",
522
+ # value: "TagValue",
523
+ # },
524
+ # ],
525
+ # })
526
+ #
527
+ # @example Response structure
528
+ #
529
+ # resp.location_arn #=> String
530
+ #
531
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationS3 AWS API Documentation
532
+ #
533
+ # @overload create_location_s3(params = {})
534
+ # @param [Hash] params ({})
535
+ def create_location_s3(params = {}, options = {})
536
+ req = build_request(:create_location_s3, params)
537
+ req.send_request(options)
538
+ end
539
+
540
+ # Creates a task. A task is a set of two locations (source and
541
+ # destination) and a set of default `OverrideOptions` that you use to
542
+ # control the behavior of a task. If you don't specify default values
543
+ # for `Options` when you create a task, AWS DataSync populates them with
544
+ # safe service defaults.
545
+ #
546
+ # When you initially create a task, it enters the INITIALIZING status
547
+ # and then the CREATING status. In CREATING status, AWS DataSync
548
+ # attempts to mount the source Network File System (NFS) location. The
549
+ # task transitions to the AVAILABLE status without waiting for the
550
+ # destination location to mount. Instead, AWS DataSync mounts a
551
+ # destination before every task execution and then unmounts it after
552
+ # every task execution.
553
+ #
554
+ # If an agent that is associated with a source (NFS) location goes
555
+ # offline, the task transitions to the UNAVAILABLE status. If the status
556
+ # of the task remains in the CREATING status for more than a few
557
+ # minutes, it means that your agent might be having trouble mounting the
558
+ # source NFS file system. Check the task's `ErrorCode` and
559
+ # `ErrorDetail`. Mount issues are often caused by either a misconfigured
560
+ # firewall or a mistyped NFS server host name.
561
+ #
562
+ # @option params [required, String] :source_location_arn
563
+ # The Amazon Resource Name (ARN) of the source location for the task.
564
+ #
565
+ # @option params [required, String] :destination_location_arn
566
+ # The Amazon Resource Name (ARN) of an AWS storage resource's location.
567
+ #
568
+ # @option params [String] :cloud_watch_log_group_arn
569
+ # The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that
570
+ # is used to monitor and log events in the task. For more information on
571
+ # these groups, see [Working with Log Groups and Log Streams][1] in the
572
+ # <i>Amazon CloudWatch User Guide. </i>
573
+ #
574
+ # For more information about how to useCloudWatchLogs with DataSync, see
575
+ # [Monitoring Your Task][2].
576
+ #
577
+ #
578
+ #
579
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html
580
+ # [2]: https://docs.aws.amazon.com/datasync/latest/userguide/monitor-datasync.html
581
+ #
582
+ # @option params [String] :name
583
+ # The name of a task. This value is a text reference that is used to
584
+ # identify the task in the console.
585
+ #
586
+ # @option params [Types::Options] :options
587
+ # The set of configuration options that control the behavior of a single
588
+ # execution of the task that occurs when you call `StartTaskExecution`.
589
+ # You can configure these options to preserve metadata such as user ID
590
+ # (UID) and group ID (GID), file permissions, data integrity
591
+ # verification, and so on.
592
+ #
593
+ # For each individual task execution, you can override these options by
594
+ # specifying the `OverrideOptions` before starting a the task execution.
595
+ # For more information, see the operation.
596
+ #
597
+ # @option params [Array<Types::TagListEntry>] :tags
598
+ # The key-value pair that represents the tag that you want to add to the
599
+ # resource. The value can be an empty string.
600
+ #
601
+ # @return [Types::CreateTaskResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
602
+ #
603
+ # * {Types::CreateTaskResponse#task_arn #task_arn} => String
604
+ #
605
+ # @example Request syntax with placeholder values
606
+ #
607
+ # resp = client.create_task({
608
+ # source_location_arn: "LocationArn", # required
609
+ # destination_location_arn: "LocationArn", # required
610
+ # cloud_watch_log_group_arn: "LogGroupArn",
611
+ # name: "TagValue",
612
+ # options: {
613
+ # verify_mode: "POINT_IN_TIME_CONSISTENT", # accepts POINT_IN_TIME_CONSISTENT, NONE
614
+ # atime: "NONE", # accepts NONE, BEST_EFFORT
615
+ # mtime: "NONE", # accepts NONE, PRESERVE
616
+ # uid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
617
+ # gid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
618
+ # preserve_deleted_files: "PRESERVE", # accepts PRESERVE, REMOVE
619
+ # preserve_devices: "NONE", # accepts NONE, PRESERVE
620
+ # posix_permissions: "NONE", # accepts NONE, BEST_EFFORT, PRESERVE
621
+ # bytes_per_second: 1,
622
+ # },
623
+ # tags: [
624
+ # {
625
+ # key: "TagKey",
626
+ # value: "TagValue",
627
+ # },
628
+ # ],
629
+ # })
630
+ #
631
+ # @example Response structure
632
+ #
633
+ # resp.task_arn #=> String
634
+ #
635
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateTask AWS API Documentation
636
+ #
637
+ # @overload create_task(params = {})
638
+ # @param [Hash] params ({})
639
+ def create_task(params = {}, options = {})
640
+ req = build_request(:create_task, params)
641
+ req.send_request(options)
642
+ end
643
+
644
+ # Deletes an agent. To specify which agent to delete, use the Amazon
645
+ # Resource Name (ARN) of the agent in your request. The operation
646
+ # disassociates the agent from your AWS account. However, it doesn't
647
+ # delete the agent virtual machine (VM) from your on-premises
648
+ # environment.
649
+ #
650
+ # <note markdown="1"> After you delete an agent, you can't reactivate it and you longer pay
651
+ # software charges for it.
652
+ #
653
+ # </note>
654
+ #
655
+ # @option params [required, String] :agent_arn
656
+ # The Amazon Resource Name (ARN) of the agent to delete. Use the
657
+ # `ListAgents` operation to return a list of agents for your account and
658
+ # AWS Region.
659
+ #
660
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
661
+ #
662
+ # @example Request syntax with placeholder values
663
+ #
664
+ # resp = client.delete_agent({
665
+ # agent_arn: "AgentArn", # required
666
+ # })
667
+ #
668
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteAgent AWS API Documentation
669
+ #
670
+ # @overload delete_agent(params = {})
671
+ # @param [Hash] params ({})
672
+ def delete_agent(params = {}, options = {})
673
+ req = build_request(:delete_agent, params)
674
+ req.send_request(options)
675
+ end
676
+
677
+ # Deletes the configuration of a location used by AWS DataSync.
678
+ #
679
+ # @option params [required, String] :location_arn
680
+ # The Amazon Resource Name (ARN) of the location to delete.
681
+ #
682
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
683
+ #
684
+ # @example Request syntax with placeholder values
685
+ #
686
+ # resp = client.delete_location({
687
+ # location_arn: "LocationArn", # required
688
+ # })
689
+ #
690
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteLocation AWS API Documentation
691
+ #
692
+ # @overload delete_location(params = {})
693
+ # @param [Hash] params ({})
694
+ def delete_location(params = {}, options = {})
695
+ req = build_request(:delete_location, params)
696
+ req.send_request(options)
697
+ end
698
+
699
+ # Deletes a task.
700
+ #
701
+ # @option params [required, String] :task_arn
702
+ # The Amazon Resource Name (ARN) of the task to delete.
703
+ #
704
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
705
+ #
706
+ # @example Request syntax with placeholder values
707
+ #
708
+ # resp = client.delete_task({
709
+ # task_arn: "TaskArn", # required
710
+ # })
711
+ #
712
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DeleteTask AWS API Documentation
713
+ #
714
+ # @overload delete_task(params = {})
715
+ # @param [Hash] params ({})
716
+ def delete_task(params = {}, options = {})
717
+ req = build_request(:delete_task, params)
718
+ req.send_request(options)
719
+ end
720
+
721
+ # Returns metadata such as the name, the network interfaces, and the
722
+ # status (that is, whether the agent is running or not) for an agent. To
723
+ # specify which agent to describe, use the Amazon Resource Name (ARN) of
724
+ # the agent in your request.
725
+ #
726
+ # @option params [required, String] :agent_arn
727
+ # The Amazon Resource Name (ARN) of the agent to describe.
728
+ #
729
+ # @return [Types::DescribeAgentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
730
+ #
731
+ # * {Types::DescribeAgentResponse#agent_arn #agent_arn} => String
732
+ # * {Types::DescribeAgentResponse#name #name} => String
733
+ # * {Types::DescribeAgentResponse#status #status} => String
734
+ # * {Types::DescribeAgentResponse#last_connection_time #last_connection_time} => Time
735
+ # * {Types::DescribeAgentResponse#creation_time #creation_time} => Time
736
+ #
737
+ # @example Request syntax with placeholder values
738
+ #
739
+ # resp = client.describe_agent({
740
+ # agent_arn: "AgentArn", # required
741
+ # })
742
+ #
743
+ # @example Response structure
744
+ #
745
+ # resp.agent_arn #=> String
746
+ # resp.name #=> String
747
+ # resp.status #=> String, one of "ONLINE", "OFFLINE"
748
+ # resp.last_connection_time #=> Time
749
+ # resp.creation_time #=> Time
750
+ #
751
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeAgent AWS API Documentation
752
+ #
753
+ # @overload describe_agent(params = {})
754
+ # @param [Hash] params ({})
755
+ def describe_agent(params = {}, options = {})
756
+ req = build_request(:describe_agent, params)
757
+ req.send_request(options)
758
+ end
759
+
760
+ # Returns metadata, such as the path information about an Amazon EFS
761
+ # location.
762
+ #
763
+ # @option params [required, String] :location_arn
764
+ # The Amazon Resource Name (ARN) of the EFS location to describe.
765
+ #
766
+ # @return [Types::DescribeLocationEfsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
767
+ #
768
+ # * {Types::DescribeLocationEfsResponse#location_arn #location_arn} => String
769
+ # * {Types::DescribeLocationEfsResponse#location_uri #location_uri} => String
770
+ # * {Types::DescribeLocationEfsResponse#ec2_config #ec2_config} => Types::Ec2Config
771
+ # * {Types::DescribeLocationEfsResponse#creation_time #creation_time} => Time
772
+ #
773
+ # @example Request syntax with placeholder values
774
+ #
775
+ # resp = client.describe_location_efs({
776
+ # location_arn: "LocationArn", # required
777
+ # })
778
+ #
779
+ # @example Response structure
780
+ #
781
+ # resp.location_arn #=> String
782
+ # resp.location_uri #=> String
783
+ # resp.ec2_config.subnet_arn #=> String
784
+ # resp.ec2_config.security_group_arns #=> Array
785
+ # resp.ec2_config.security_group_arns[0] #=> String
786
+ # resp.creation_time #=> Time
787
+ #
788
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationEfs AWS API Documentation
789
+ #
790
+ # @overload describe_location_efs(params = {})
791
+ # @param [Hash] params ({})
792
+ def describe_location_efs(params = {}, options = {})
793
+ req = build_request(:describe_location_efs, params)
794
+ req.send_request(options)
795
+ end
796
+
797
+ # Returns metadata, such as the path information, about a NFS location.
798
+ #
799
+ # @option params [required, String] :location_arn
800
+ # The Amazon resource Name (ARN) of the NFS location to describe.
801
+ #
802
+ # @return [Types::DescribeLocationNfsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
803
+ #
804
+ # * {Types::DescribeLocationNfsResponse#location_arn #location_arn} => String
805
+ # * {Types::DescribeLocationNfsResponse#location_uri #location_uri} => String
806
+ # * {Types::DescribeLocationNfsResponse#on_prem_config #on_prem_config} => Types::OnPremConfig
807
+ # * {Types::DescribeLocationNfsResponse#creation_time #creation_time} => Time
808
+ #
809
+ # @example Request syntax with placeholder values
810
+ #
811
+ # resp = client.describe_location_nfs({
812
+ # location_arn: "LocationArn", # required
813
+ # })
814
+ #
815
+ # @example Response structure
816
+ #
817
+ # resp.location_arn #=> String
818
+ # resp.location_uri #=> String
819
+ # resp.on_prem_config.agent_arns #=> Array
820
+ # resp.on_prem_config.agent_arns[0] #=> String
821
+ # resp.creation_time #=> Time
822
+ #
823
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationNfs AWS API Documentation
824
+ #
825
+ # @overload describe_location_nfs(params = {})
826
+ # @param [Hash] params ({})
827
+ def describe_location_nfs(params = {}, options = {})
828
+ req = build_request(:describe_location_nfs, params)
829
+ req.send_request(options)
830
+ end
831
+
832
+ # Returns metadata, such as bucket name, about an Amazon S3 bucket
833
+ # location.
834
+ #
835
+ # @option params [required, String] :location_arn
836
+ # The Amazon Resource Name (ARN) of the Amazon S3 bucket location to
837
+ # describe.
838
+ #
839
+ # @return [Types::DescribeLocationS3Response] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
840
+ #
841
+ # * {Types::DescribeLocationS3Response#location_arn #location_arn} => String
842
+ # * {Types::DescribeLocationS3Response#location_uri #location_uri} => String
843
+ # * {Types::DescribeLocationS3Response#s3_config #s3_config} => Types::S3Config
844
+ # * {Types::DescribeLocationS3Response#creation_time #creation_time} => Time
845
+ #
846
+ # @example Request syntax with placeholder values
847
+ #
848
+ # resp = client.describe_location_s3({
849
+ # location_arn: "LocationArn", # required
850
+ # })
851
+ #
852
+ # @example Response structure
853
+ #
854
+ # resp.location_arn #=> String
855
+ # resp.location_uri #=> String
856
+ # resp.s3_config.bucket_access_role_arn #=> String
857
+ # resp.creation_time #=> Time
858
+ #
859
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeLocationS3 AWS API Documentation
860
+ #
861
+ # @overload describe_location_s3(params = {})
862
+ # @param [Hash] params ({})
863
+ def describe_location_s3(params = {}, options = {})
864
+ req = build_request(:describe_location_s3, params)
865
+ req.send_request(options)
866
+ end
867
+
868
+ # Returns metadata about a task.
869
+ #
870
+ # @option params [required, String] :task_arn
871
+ # The Amazon Resource Name (ARN) of the task to describe.
872
+ #
873
+ # @return [Types::DescribeTaskResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
874
+ #
875
+ # * {Types::DescribeTaskResponse#task_arn #task_arn} => String
876
+ # * {Types::DescribeTaskResponse#status #status} => String
877
+ # * {Types::DescribeTaskResponse#name #name} => String
878
+ # * {Types::DescribeTaskResponse#current_task_execution_arn #current_task_execution_arn} => String
879
+ # * {Types::DescribeTaskResponse#source_location_arn #source_location_arn} => String
880
+ # * {Types::DescribeTaskResponse#destination_location_arn #destination_location_arn} => String
881
+ # * {Types::DescribeTaskResponse#cloud_watch_log_group_arn #cloud_watch_log_group_arn} => String
882
+ # * {Types::DescribeTaskResponse#options #options} => Types::Options
883
+ # * {Types::DescribeTaskResponse#error_code #error_code} => String
884
+ # * {Types::DescribeTaskResponse#error_detail #error_detail} => String
885
+ # * {Types::DescribeTaskResponse#creation_time #creation_time} => Time
886
+ #
887
+ # @example Request syntax with placeholder values
888
+ #
889
+ # resp = client.describe_task({
890
+ # task_arn: "TaskArn", # required
891
+ # })
892
+ #
893
+ # @example Response structure
894
+ #
895
+ # resp.task_arn #=> String
896
+ # resp.status #=> String, one of "AVAILABLE", "CREATING", "RUNNING", "UNAVAILABLE"
897
+ # resp.name #=> String
898
+ # resp.current_task_execution_arn #=> String
899
+ # resp.source_location_arn #=> String
900
+ # resp.destination_location_arn #=> String
901
+ # resp.cloud_watch_log_group_arn #=> String
902
+ # resp.options.verify_mode #=> String, one of "POINT_IN_TIME_CONSISTENT", "NONE"
903
+ # resp.options.atime #=> String, one of "NONE", "BEST_EFFORT"
904
+ # resp.options.mtime #=> String, one of "NONE", "PRESERVE"
905
+ # resp.options.uid #=> String, one of "NONE", "INT_VALUE", "NAME", "BOTH"
906
+ # resp.options.gid #=> String, one of "NONE", "INT_VALUE", "NAME", "BOTH"
907
+ # resp.options.preserve_deleted_files #=> String, one of "PRESERVE", "REMOVE"
908
+ # resp.options.preserve_devices #=> String, one of "NONE", "PRESERVE"
909
+ # resp.options.posix_permissions #=> String, one of "NONE", "BEST_EFFORT", "PRESERVE"
910
+ # resp.options.bytes_per_second #=> Integer
911
+ # resp.error_code #=> String
912
+ # resp.error_detail #=> String
913
+ # resp.creation_time #=> Time
914
+ #
915
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTask AWS API Documentation
916
+ #
917
+ # @overload describe_task(params = {})
918
+ # @param [Hash] params ({})
919
+ def describe_task(params = {}, options = {})
920
+ req = build_request(:describe_task, params)
921
+ req.send_request(options)
922
+ end
923
+
924
+ # Returns detailed metadata about a task that is being executed.
925
+ #
926
+ # @option params [required, String] :task_execution_arn
927
+ # The Amazon Resource Name (ARN) of the task that is being executed.
928
+ #
929
+ # @return [Types::DescribeTaskExecutionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
930
+ #
931
+ # * {Types::DescribeTaskExecutionResponse#task_execution_arn #task_execution_arn} => String
932
+ # * {Types::DescribeTaskExecutionResponse#status #status} => String
933
+ # * {Types::DescribeTaskExecutionResponse#options #options} => Types::Options
934
+ # * {Types::DescribeTaskExecutionResponse#start_time #start_time} => Time
935
+ # * {Types::DescribeTaskExecutionResponse#estimated_files_to_transfer #estimated_files_to_transfer} => Integer
936
+ # * {Types::DescribeTaskExecutionResponse#estimated_bytes_to_transfer #estimated_bytes_to_transfer} => Integer
937
+ # * {Types::DescribeTaskExecutionResponse#files_transferred #files_transferred} => Integer
938
+ # * {Types::DescribeTaskExecutionResponse#bytes_written #bytes_written} => Integer
939
+ # * {Types::DescribeTaskExecutionResponse#bytes_transferred #bytes_transferred} => Integer
940
+ # * {Types::DescribeTaskExecutionResponse#result #result} => Types::TaskExecutionResultDetail
941
+ #
942
+ # @example Request syntax with placeholder values
943
+ #
944
+ # resp = client.describe_task_execution({
945
+ # task_execution_arn: "TaskExecutionArn", # required
946
+ # })
947
+ #
948
+ # @example Response structure
949
+ #
950
+ # resp.task_execution_arn #=> String
951
+ # resp.status #=> String, one of "LAUNCHING", "PREPARING", "TRANSFERRING", "VERIFYING", "SUCCESS", "ERROR"
952
+ # resp.options.verify_mode #=> String, one of "POINT_IN_TIME_CONSISTENT", "NONE"
953
+ # resp.options.atime #=> String, one of "NONE", "BEST_EFFORT"
954
+ # resp.options.mtime #=> String, one of "NONE", "PRESERVE"
955
+ # resp.options.uid #=> String, one of "NONE", "INT_VALUE", "NAME", "BOTH"
956
+ # resp.options.gid #=> String, one of "NONE", "INT_VALUE", "NAME", "BOTH"
957
+ # resp.options.preserve_deleted_files #=> String, one of "PRESERVE", "REMOVE"
958
+ # resp.options.preserve_devices #=> String, one of "NONE", "PRESERVE"
959
+ # resp.options.posix_permissions #=> String, one of "NONE", "BEST_EFFORT", "PRESERVE"
960
+ # resp.options.bytes_per_second #=> Integer
961
+ # resp.start_time #=> Time
962
+ # resp.estimated_files_to_transfer #=> Integer
963
+ # resp.estimated_bytes_to_transfer #=> Integer
964
+ # resp.files_transferred #=> Integer
965
+ # resp.bytes_written #=> Integer
966
+ # resp.bytes_transferred #=> Integer
967
+ # resp.result.prepare_duration #=> Integer
968
+ # resp.result.prepare_status #=> String, one of "PENDING", "SUCCESS", "ERROR"
969
+ # resp.result.transfer_duration #=> Integer
970
+ # resp.result.transfer_status #=> String, one of "PENDING", "SUCCESS", "ERROR"
971
+ # resp.result.verify_duration #=> Integer
972
+ # resp.result.verify_status #=> String, one of "PENDING", "SUCCESS", "ERROR"
973
+ # resp.result.error_code #=> String
974
+ # resp.result.error_detail #=> String
975
+ #
976
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/DescribeTaskExecution AWS API Documentation
977
+ #
978
+ # @overload describe_task_execution(params = {})
979
+ # @param [Hash] params ({})
980
+ def describe_task_execution(params = {}, options = {})
981
+ req = build_request(:describe_task_execution, params)
982
+ req.send_request(options)
983
+ end
984
+
985
+ # Returns a list of agents owned by an AWS account in the AWS Region
986
+ # specified in the request. The returned list is ordered by agent Amazon
987
+ # Resource Name (ARN).
988
+ #
989
+ # By default, this operation returns a maximum of 100 agents. This
990
+ # operation supports pagination that enables you to optionally reduce
991
+ # the number of agents returned in a response.
992
+ #
993
+ # If you have more agents than are returned in a response (that is, the
994
+ # response returns only a truncated list of your agents), the response
995
+ # contains a marker that you can specify in your next request to fetch
996
+ # the next page of agents.
997
+ #
998
+ # @option params [Integer] :max_results
999
+ # The maximum number of agents to list.
1000
+ #
1001
+ # @option params [String] :next_token
1002
+ # An opaque string that indicates the position at which to begin the
1003
+ # next list of agents.
1004
+ #
1005
+ # @return [Types::ListAgentsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1006
+ #
1007
+ # * {Types::ListAgentsResponse#agents #agents} => Array&lt;Types::AgentListEntry&gt;
1008
+ # * {Types::ListAgentsResponse#next_token #next_token} => String
1009
+ #
1010
+ # @example Request syntax with placeholder values
1011
+ #
1012
+ # resp = client.list_agents({
1013
+ # max_results: 1,
1014
+ # next_token: "NextToken",
1015
+ # })
1016
+ #
1017
+ # @example Response structure
1018
+ #
1019
+ # resp.agents #=> Array
1020
+ # resp.agents[0].agent_arn #=> String
1021
+ # resp.agents[0].name #=> String
1022
+ # resp.agents[0].status #=> String, one of "ONLINE", "OFFLINE"
1023
+ # resp.next_token #=> String
1024
+ #
1025
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListAgents AWS API Documentation
1026
+ #
1027
+ # @overload list_agents(params = {})
1028
+ # @param [Hash] params ({})
1029
+ def list_agents(params = {}, options = {})
1030
+ req = build_request(:list_agents, params)
1031
+ req.send_request(options)
1032
+ end
1033
+
1034
+ # Returns a lists of source and destination locations.
1035
+ #
1036
+ # If you have more locations than are returned in a response (that is,
1037
+ # the response returns only a truncated list of your agents), the
1038
+ # response contains a token that you can specify in your next request to
1039
+ # fetch the next page of locations.
1040
+ #
1041
+ # @option params [Integer] :max_results
1042
+ # The maximum number of locations to return.
1043
+ #
1044
+ # @option params [String] :next_token
1045
+ # An opaque string that indicates the position at which to begin the
1046
+ # next list of locations.
1047
+ #
1048
+ # @return [Types::ListLocationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1049
+ #
1050
+ # * {Types::ListLocationsResponse#locations #locations} => Array&lt;Types::LocationListEntry&gt;
1051
+ # * {Types::ListLocationsResponse#next_token #next_token} => String
1052
+ #
1053
+ # @example Request syntax with placeholder values
1054
+ #
1055
+ # resp = client.list_locations({
1056
+ # max_results: 1,
1057
+ # next_token: "NextToken",
1058
+ # })
1059
+ #
1060
+ # @example Response structure
1061
+ #
1062
+ # resp.locations #=> Array
1063
+ # resp.locations[0].location_arn #=> String
1064
+ # resp.locations[0].location_uri #=> String
1065
+ # resp.next_token #=> String
1066
+ #
1067
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListLocations AWS API Documentation
1068
+ #
1069
+ # @overload list_locations(params = {})
1070
+ # @param [Hash] params ({})
1071
+ def list_locations(params = {}, options = {})
1072
+ req = build_request(:list_locations, params)
1073
+ req.send_request(options)
1074
+ end
1075
+
1076
+ # Returns all the tags associated with a specified resources.
1077
+ #
1078
+ # @option params [required, String] :resource_arn
1079
+ # The Amazon Resource Name (ARN) of the resource whose tags to list.
1080
+ #
1081
+ # @option params [Integer] :max_results
1082
+ # The maximum number of locations to return.
1083
+ #
1084
+ # @option params [String] :next_token
1085
+ # An opaque string that indicates the position at which to begin the
1086
+ # next list of locations.
1087
+ #
1088
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1089
+ #
1090
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Array&lt;Types::TagListEntry&gt;
1091
+ # * {Types::ListTagsForResourceResponse#next_token #next_token} => String
1092
+ #
1093
+ # @example Request syntax with placeholder values
1094
+ #
1095
+ # resp = client.list_tags_for_resource({
1096
+ # resource_arn: "TaggableResourceArn", # required
1097
+ # max_results: 1,
1098
+ # next_token: "NextToken",
1099
+ # })
1100
+ #
1101
+ # @example Response structure
1102
+ #
1103
+ # resp.tags #=> Array
1104
+ # resp.tags[0].key #=> String
1105
+ # resp.tags[0].value #=> String
1106
+ # resp.next_token #=> String
1107
+ #
1108
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTagsForResource AWS API Documentation
1109
+ #
1110
+ # @overload list_tags_for_resource(params = {})
1111
+ # @param [Hash] params ({})
1112
+ def list_tags_for_resource(params = {}, options = {})
1113
+ req = build_request(:list_tags_for_resource, params)
1114
+ req.send_request(options)
1115
+ end
1116
+
1117
+ # Returns a list of executed tasks.
1118
+ #
1119
+ # @option params [String] :task_arn
1120
+ # The Amazon Resource Name (ARN) of the task whose tasks you want to
1121
+ # list.
1122
+ #
1123
+ # @option params [Integer] :max_results
1124
+ # The maximum number of executed tasks to list.
1125
+ #
1126
+ # @option params [String] :next_token
1127
+ # An opaque string that indicates the position at which to begin the
1128
+ # next list of the executed tasks.
1129
+ #
1130
+ # @return [Types::ListTaskExecutionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1131
+ #
1132
+ # * {Types::ListTaskExecutionsResponse#task_executions #task_executions} => Array&lt;Types::TaskExecutionListEntry&gt;
1133
+ # * {Types::ListTaskExecutionsResponse#next_token #next_token} => String
1134
+ #
1135
+ # @example Request syntax with placeholder values
1136
+ #
1137
+ # resp = client.list_task_executions({
1138
+ # task_arn: "TaskArn",
1139
+ # max_results: 1,
1140
+ # next_token: "NextToken",
1141
+ # })
1142
+ #
1143
+ # @example Response structure
1144
+ #
1145
+ # resp.task_executions #=> Array
1146
+ # resp.task_executions[0].task_execution_arn #=> String
1147
+ # resp.task_executions[0].status #=> String, one of "LAUNCHING", "PREPARING", "TRANSFERRING", "VERIFYING", "SUCCESS", "ERROR"
1148
+ # resp.next_token #=> String
1149
+ #
1150
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTaskExecutions AWS API Documentation
1151
+ #
1152
+ # @overload list_task_executions(params = {})
1153
+ # @param [Hash] params ({})
1154
+ def list_task_executions(params = {}, options = {})
1155
+ req = build_request(:list_task_executions, params)
1156
+ req.send_request(options)
1157
+ end
1158
+
1159
+ # Returns a list of all the tasks.
1160
+ #
1161
+ # @option params [Integer] :max_results
1162
+ # The maximum number of tasks to return.
1163
+ #
1164
+ # @option params [String] :next_token
1165
+ # An opaque string that indicates the position at which to begin the
1166
+ # next list of tasks.
1167
+ #
1168
+ # @return [Types::ListTasksResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1169
+ #
1170
+ # * {Types::ListTasksResponse#tasks #tasks} => Array&lt;Types::TaskListEntry&gt;
1171
+ # * {Types::ListTasksResponse#next_token #next_token} => String
1172
+ #
1173
+ # @example Request syntax with placeholder values
1174
+ #
1175
+ # resp = client.list_tasks({
1176
+ # max_results: 1,
1177
+ # next_token: "NextToken",
1178
+ # })
1179
+ #
1180
+ # @example Response structure
1181
+ #
1182
+ # resp.tasks #=> Array
1183
+ # resp.tasks[0].task_arn #=> String
1184
+ # resp.tasks[0].status #=> String, one of "AVAILABLE", "CREATING", "RUNNING", "UNAVAILABLE"
1185
+ # resp.tasks[0].name #=> String
1186
+ # resp.next_token #=> String
1187
+ #
1188
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/ListTasks AWS API Documentation
1189
+ #
1190
+ # @overload list_tasks(params = {})
1191
+ # @param [Hash] params ({})
1192
+ def list_tasks(params = {}, options = {})
1193
+ req = build_request(:list_tasks, params)
1194
+ req.send_request(options)
1195
+ end
1196
+
1197
+ # Starts a specific invocation of a task. A `TaskExecution` value
1198
+ # represents an individual run of a task. Each task can have at most one
1199
+ # `TaskExecution` at a time.
1200
+ #
1201
+ # `TaskExecution` has the following transition phases: INITIALIZING \|
1202
+ # PREPARING \| TRANSFERRING \| VERIFYING \| SUCCESS/FAILURE.
1203
+ #
1204
+ # For detailed information, see *Task Execution* in [Components and
1205
+ # Terminology][1] in the *AWS DataSync User Guide*.
1206
+ #
1207
+ #
1208
+ #
1209
+ # [1]: https://docs.aws.amazon.com/sync-service/latest/userguide/how-awssync-works.html#terminology
1210
+ #
1211
+ # @option params [required, String] :task_arn
1212
+ # The Amazon Resource Name (ARN) of the task to start.
1213
+ #
1214
+ # @option params [Types::Options] :override_options
1215
+ # Represents the options that are available to control the behavior of a
1216
+ # StartTaskExecution operation. Behavior includes preserving metadata
1217
+ # such as user ID (UID), group ID (GID), and file permissions, and also
1218
+ # overwriting files in the destination, data integrity verification, and
1219
+ # so on.
1220
+ #
1221
+ # A task has a set of default options associated with it. If you don't
1222
+ # specify an option in StartTaskExecution, the default value is used.
1223
+ # You can override the defaults options on each task execution by
1224
+ # specifying an overriding `Options` value to StartTaskExecution.
1225
+ #
1226
+ # @return [Types::StartTaskExecutionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1227
+ #
1228
+ # * {Types::StartTaskExecutionResponse#task_execution_arn #task_execution_arn} => String
1229
+ #
1230
+ # @example Request syntax with placeholder values
1231
+ #
1232
+ # resp = client.start_task_execution({
1233
+ # task_arn: "TaskArn", # required
1234
+ # override_options: {
1235
+ # verify_mode: "POINT_IN_TIME_CONSISTENT", # accepts POINT_IN_TIME_CONSISTENT, NONE
1236
+ # atime: "NONE", # accepts NONE, BEST_EFFORT
1237
+ # mtime: "NONE", # accepts NONE, PRESERVE
1238
+ # uid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
1239
+ # gid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
1240
+ # preserve_deleted_files: "PRESERVE", # accepts PRESERVE, REMOVE
1241
+ # preserve_devices: "NONE", # accepts NONE, PRESERVE
1242
+ # posix_permissions: "NONE", # accepts NONE, BEST_EFFORT, PRESERVE
1243
+ # bytes_per_second: 1,
1244
+ # },
1245
+ # })
1246
+ #
1247
+ # @example Response structure
1248
+ #
1249
+ # resp.task_execution_arn #=> String
1250
+ #
1251
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/StartTaskExecution AWS API Documentation
1252
+ #
1253
+ # @overload start_task_execution(params = {})
1254
+ # @param [Hash] params ({})
1255
+ def start_task_execution(params = {}, options = {})
1256
+ req = build_request(:start_task_execution, params)
1257
+ req.send_request(options)
1258
+ end
1259
+
1260
+ # Applies a key-value pair to an AWS resource.
1261
+ #
1262
+ # @option params [required, String] :resource_arn
1263
+ # The Amazon Resource Name (ARN) of the resource to apply the tag to.
1264
+ #
1265
+ # @option params [required, Array<Types::TagListEntry>] :tags
1266
+ # The tags to apply.
1267
+ #
1268
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1269
+ #
1270
+ # @example Request syntax with placeholder values
1271
+ #
1272
+ # resp = client.tag_resource({
1273
+ # resource_arn: "TaggableResourceArn", # required
1274
+ # tags: [ # required
1275
+ # {
1276
+ # key: "TagKey",
1277
+ # value: "TagValue",
1278
+ # },
1279
+ # ],
1280
+ # })
1281
+ #
1282
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/TagResource AWS API Documentation
1283
+ #
1284
+ # @overload tag_resource(params = {})
1285
+ # @param [Hash] params ({})
1286
+ def tag_resource(params = {}, options = {})
1287
+ req = build_request(:tag_resource, params)
1288
+ req.send_request(options)
1289
+ end
1290
+
1291
+ # Removes a tag from an AWS resource.
1292
+ #
1293
+ # @option params [required, String] :resource_arn
1294
+ # The Amazon Resource Name (ARN) of the resource to remove the tag from.
1295
+ #
1296
+ # @option params [required, Array<String>] :keys
1297
+ # The keys in the key-value pair in the tag to remove.
1298
+ #
1299
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1300
+ #
1301
+ # @example Request syntax with placeholder values
1302
+ #
1303
+ # resp = client.untag_resource({
1304
+ # resource_arn: "TaggableResourceArn", # required
1305
+ # keys: ["TagKey"], # required
1306
+ # })
1307
+ #
1308
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UntagResource AWS API Documentation
1309
+ #
1310
+ # @overload untag_resource(params = {})
1311
+ # @param [Hash] params ({})
1312
+ def untag_resource(params = {}, options = {})
1313
+ req = build_request(:untag_resource, params)
1314
+ req.send_request(options)
1315
+ end
1316
+
1317
+ # Updates the name of an agent.
1318
+ #
1319
+ # @option params [required, String] :agent_arn
1320
+ # The Amazon Resource Name (ARN) of the agent to update.
1321
+ #
1322
+ # @option params [String] :name
1323
+ # The name that you want to use to configure the agent.
1324
+ #
1325
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1326
+ #
1327
+ # @example Request syntax with placeholder values
1328
+ #
1329
+ # resp = client.update_agent({
1330
+ # agent_arn: "AgentArn", # required
1331
+ # name: "TagValue",
1332
+ # })
1333
+ #
1334
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateAgent AWS API Documentation
1335
+ #
1336
+ # @overload update_agent(params = {})
1337
+ # @param [Hash] params ({})
1338
+ def update_agent(params = {}, options = {})
1339
+ req = build_request(:update_agent, params)
1340
+ req.send_request(options)
1341
+ end
1342
+
1343
+ # Updates the metadata associated with a task.
1344
+ #
1345
+ # @option params [required, String] :task_arn
1346
+ # The Amazon Resource Name (ARN) of the resource name of the task to
1347
+ # update.
1348
+ #
1349
+ # @option params [Types::Options] :options
1350
+ # Represents the options that are available to control the behavior of a
1351
+ # StartTaskExecution operation. Behavior includes preserving metadata
1352
+ # such as user ID (UID), group ID (GID), and file permissions, and also
1353
+ # overwriting files in the destination, data integrity verification, and
1354
+ # so on.
1355
+ #
1356
+ # A task has a set of default options associated with it. If you don't
1357
+ # specify an option in StartTaskExecution, the default value is used.
1358
+ # You can override the defaults options on each task execution by
1359
+ # specifying an overriding `Options` value to StartTaskExecution.
1360
+ #
1361
+ # @option params [String] :name
1362
+ # The name of the task to update.
1363
+ #
1364
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1365
+ #
1366
+ # @example Request syntax with placeholder values
1367
+ #
1368
+ # resp = client.update_task({
1369
+ # task_arn: "TaskArn", # required
1370
+ # options: {
1371
+ # verify_mode: "POINT_IN_TIME_CONSISTENT", # accepts POINT_IN_TIME_CONSISTENT, NONE
1372
+ # atime: "NONE", # accepts NONE, BEST_EFFORT
1373
+ # mtime: "NONE", # accepts NONE, PRESERVE
1374
+ # uid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
1375
+ # gid: "NONE", # accepts NONE, INT_VALUE, NAME, BOTH
1376
+ # preserve_deleted_files: "PRESERVE", # accepts PRESERVE, REMOVE
1377
+ # preserve_devices: "NONE", # accepts NONE, PRESERVE
1378
+ # posix_permissions: "NONE", # accepts NONE, BEST_EFFORT, PRESERVE
1379
+ # bytes_per_second: 1,
1380
+ # },
1381
+ # name: "TagValue",
1382
+ # })
1383
+ #
1384
+ # @see http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/UpdateTask AWS API Documentation
1385
+ #
1386
+ # @overload update_task(params = {})
1387
+ # @param [Hash] params ({})
1388
+ def update_task(params = {}, options = {})
1389
+ req = build_request(:update_task, params)
1390
+ req.send_request(options)
1391
+ end
1392
+
1393
+ # @!endgroup
1394
+
1395
+ # @param params ({})
1396
+ # @api private
1397
+ def build_request(operation_name, params = {})
1398
+ handlers = @handlers.for(operation_name)
1399
+ context = Seahorse::Client::RequestContext.new(
1400
+ operation_name: operation_name,
1401
+ operation: config.api.operation(operation_name),
1402
+ client: self,
1403
+ params: params,
1404
+ config: config)
1405
+ context[:gem_name] = 'aws-sdk-datasync'
1406
+ context[:gem_version] = '1.0.0'
1407
+ Seahorse::Client::Request.new(handlers, context)
1408
+ end
1409
+
1410
+ # @api private
1411
+ # @deprecated
1412
+ def waiter_names
1413
+ []
1414
+ end
1415
+
1416
+ class << self
1417
+
1418
+ # @api private
1419
+ attr_reader :identifier
1420
+
1421
+ # @api private
1422
+ def errors_module
1423
+ Errors
1424
+ end
1425
+
1426
+ end
1427
+ end
1428
+ end