aws-sdk-backupgateway 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,1009 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ require 'seahorse/client/plugins/content_length.rb'
11
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
+ require 'aws-sdk-core/plugins/logging.rb'
13
+ require 'aws-sdk-core/plugins/param_converter.rb'
14
+ require 'aws-sdk-core/plugins/param_validator.rb'
15
+ require 'aws-sdk-core/plugins/user_agent.rb'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
+ require 'aws-sdk-core/plugins/retry_errors.rb'
18
+ require 'aws-sdk-core/plugins/global_configuration.rb'
19
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
+ require 'aws-sdk-core/plugins/response_paging.rb'
23
+ require 'aws-sdk-core/plugins/stub_responses.rb'
24
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/signature_v4.rb'
31
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
32
+
33
+ Aws::Plugins::GlobalConfiguration.add_identifier(:backupgateway)
34
+
35
+ module Aws::BackupGateway
36
+ # An API client for BackupGateway. To construct a client, you need to configure a `:region` and `:credentials`.
37
+ #
38
+ # client = Aws::BackupGateway::Client.new(
39
+ # region: region_name,
40
+ # credentials: credentials,
41
+ # # ...
42
+ # )
43
+ #
44
+ # For details on configuring region and credentials see
45
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
46
+ #
47
+ # See {#initialize} for a full list of supported configuration options.
48
+ class Client < Seahorse::Client::Base
49
+
50
+ include Aws::ClientStubs
51
+
52
+ @identifier = :backupgateway
53
+
54
+ set_api(ClientApi::API)
55
+
56
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
57
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
58
+ add_plugin(Aws::Plugins::Logging)
59
+ add_plugin(Aws::Plugins::ParamConverter)
60
+ add_plugin(Aws::Plugins::ParamValidator)
61
+ add_plugin(Aws::Plugins::UserAgent)
62
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
63
+ add_plugin(Aws::Plugins::RetryErrors)
64
+ add_plugin(Aws::Plugins::GlobalConfiguration)
65
+ add_plugin(Aws::Plugins::RegionalEndpoint)
66
+ add_plugin(Aws::Plugins::EndpointDiscovery)
67
+ add_plugin(Aws::Plugins::EndpointPattern)
68
+ add_plugin(Aws::Plugins::ResponsePaging)
69
+ add_plugin(Aws::Plugins::StubResponses)
70
+ add_plugin(Aws::Plugins::IdempotencyToken)
71
+ add_plugin(Aws::Plugins::JsonvalueConverter)
72
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
73
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
74
+ add_plugin(Aws::Plugins::TransferEncoding)
75
+ add_plugin(Aws::Plugins::HttpChecksum)
76
+ add_plugin(Aws::Plugins::SignatureV4)
77
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
78
+
79
+ # @overload initialize(options)
80
+ # @param [Hash] options
81
+ # @option options [required, Aws::CredentialProvider] :credentials
82
+ # Your AWS credentials. This can be an instance of any one of the
83
+ # following classes:
84
+ #
85
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
86
+ # credentials.
87
+ #
88
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
89
+ # shared file, such as `~/.aws/config`.
90
+ #
91
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
92
+ #
93
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
94
+ # assume a role after providing credentials via the web.
95
+ #
96
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
97
+ # access token generated from `aws login`.
98
+ #
99
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
100
+ # process that outputs to stdout.
101
+ #
102
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
103
+ # from an EC2 IMDS on an EC2 instance.
104
+ #
105
+ # * `Aws::ECSCredentials` - Used for loading credentials from
106
+ # instances running in ECS.
107
+ #
108
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
109
+ # from the Cognito Identity service.
110
+ #
111
+ # When `:credentials` are not configured directly, the following
112
+ # locations will be searched for credentials:
113
+ #
114
+ # * `Aws.config[:credentials]`
115
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
116
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
117
+ # * `~/.aws/credentials`
118
+ # * `~/.aws/config`
119
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
+ # are very aggressive. Construct and pass an instance of
121
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
+ # enable retries and extended timeouts. Instance profile credential
123
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
124
+ # to true.
125
+ #
126
+ # @option options [required, String] :region
127
+ # The AWS region to connect to. The configured `:region` is
128
+ # used to determine the service `:endpoint`. When not passed,
129
+ # a default `:region` is searched for in the following locations:
130
+ #
131
+ # * `Aws.config[:region]`
132
+ # * `ENV['AWS_REGION']`
133
+ # * `ENV['AMAZON_REGION']`
134
+ # * `ENV['AWS_DEFAULT_REGION']`
135
+ # * `~/.aws/credentials`
136
+ # * `~/.aws/config`
137
+ #
138
+ # @option options [String] :access_key_id
139
+ #
140
+ # @option options [Boolean] :active_endpoint_cache (false)
141
+ # When set to `true`, a thread polling for endpoints will be running in
142
+ # the background every 60 secs (default). Defaults to `false`.
143
+ #
144
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
145
+ # Used only in `adaptive` retry mode. When true, the request will sleep
146
+ # until there is sufficent client side capacity to retry the request.
147
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
148
+ # not retry instead of sleeping.
149
+ #
150
+ # @option options [Boolean] :client_side_monitoring (false)
151
+ # When `true`, client-side metrics will be collected for all API requests from
152
+ # this client.
153
+ #
154
+ # @option options [String] :client_side_monitoring_client_id ("")
155
+ # Allows you to provide an identifier for this client which will be attached to
156
+ # all generated client side metrics. Defaults to an empty string.
157
+ #
158
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
159
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
160
+ # side monitoring agent is running on, where client metrics will be published via UDP.
161
+ #
162
+ # @option options [Integer] :client_side_monitoring_port (31000)
163
+ # Required for publishing client metrics. The port that the client side monitoring
164
+ # agent is running on, where client metrics will be published via UDP.
165
+ #
166
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
167
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
168
+ # will use the Client Side Monitoring Agent Publisher.
169
+ #
170
+ # @option options [Boolean] :convert_params (true)
171
+ # When `true`, an attempt is made to coerce request parameters into
172
+ # the required types.
173
+ #
174
+ # @option options [Boolean] :correct_clock_skew (true)
175
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
176
+ # a clock skew correction and retry requests with skewed client clocks.
177
+ #
178
+ # @option options [Boolean] :disable_host_prefix_injection (false)
179
+ # Set to true to disable SDK automatically adding host prefix
180
+ # to default service endpoint when available.
181
+ #
182
+ # @option options [String] :endpoint
183
+ # The client endpoint is normally constructed from the `:region`
184
+ # option. You should only configure an `:endpoint` when connecting
185
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
186
+ #
187
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
188
+ # Used for the maximum size limit of the LRU cache storing endpoints data
189
+ # for endpoint discovery enabled operations. Defaults to 1000.
190
+ #
191
+ # @option options [Integer] :endpoint_cache_max_threads (10)
192
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
193
+ #
194
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
195
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
196
+ # Use this option to config the time interval in seconds for making
197
+ # requests fetching endpoints information. Defaults to 60 sec.
198
+ #
199
+ # @option options [Boolean] :endpoint_discovery (false)
200
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
201
+ #
202
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
203
+ # The log formatter.
204
+ #
205
+ # @option options [Symbol] :log_level (:info)
206
+ # The log level to send messages to the `:logger` at.
207
+ #
208
+ # @option options [Logger] :logger
209
+ # The Logger instance to send log messages to. If this option
210
+ # is not set, logging will be disabled.
211
+ #
212
+ # @option options [Integer] :max_attempts (3)
213
+ # An integer representing the maximum number attempts that will be made for
214
+ # a single request, including the initial attempt. For example,
215
+ # setting this value to 5 will result in a request being retried up to
216
+ # 4 times. Used in `standard` and `adaptive` retry modes.
217
+ #
218
+ # @option options [String] :profile ("default")
219
+ # Used when loading credentials from the shared credentials file
220
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
221
+ #
222
+ # @option options [Proc] :retry_backoff
223
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
224
+ # This option is only used in the `legacy` retry mode.
225
+ #
226
+ # @option options [Float] :retry_base_delay (0.3)
227
+ # The base delay in seconds used by the default backoff function. This option
228
+ # is only used in the `legacy` retry mode.
229
+ #
230
+ # @option options [Symbol] :retry_jitter (:none)
231
+ # A delay randomiser function used by the default backoff function.
232
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
233
+ # otherwise a Proc that takes and returns a number. This option is only used
234
+ # in the `legacy` retry mode.
235
+ #
236
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
237
+ #
238
+ # @option options [Integer] :retry_limit (3)
239
+ # The maximum number of times to retry failed requests. Only
240
+ # ~ 500 level server errors and certain ~ 400 level client errors
241
+ # are retried. Generally, these are throttling errors, data
242
+ # checksum errors, networking errors, timeout errors, auth errors,
243
+ # endpoint discovery, and errors from expired credentials.
244
+ # This option is only used in the `legacy` retry mode.
245
+ #
246
+ # @option options [Integer] :retry_max_delay (0)
247
+ # The maximum number of seconds to delay between retries (0 for no limit)
248
+ # used by the default backoff function. This option is only used in the
249
+ # `legacy` retry mode.
250
+ #
251
+ # @option options [String] :retry_mode ("legacy")
252
+ # Specifies which retry algorithm to use. Values are:
253
+ #
254
+ # * `legacy` - The pre-existing retry behavior. This is default value if
255
+ # no retry mode is provided.
256
+ #
257
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
258
+ # This includes support for retry quotas, which limit the number of
259
+ # unsuccessful retries a client can make.
260
+ #
261
+ # * `adaptive` - An experimental retry mode that includes all the
262
+ # functionality of `standard` mode along with automatic client side
263
+ # throttling. This is a provisional mode that may change behavior
264
+ # in the future.
265
+ #
266
+ #
267
+ # @option options [String] :secret_access_key
268
+ #
269
+ # @option options [String] :session_token
270
+ #
271
+ # @option options [Boolean] :simple_json (false)
272
+ # Disables request parameter conversion, validation, and formatting.
273
+ # Also disable response data type conversions. This option is useful
274
+ # when you want to ensure the highest level of performance by
275
+ # avoiding overhead of walking request parameters and response data
276
+ # structures.
277
+ #
278
+ # When `:simple_json` is enabled, the request parameters hash must
279
+ # be formatted exactly as the DynamoDB API expects.
280
+ #
281
+ # @option options [Boolean] :stub_responses (false)
282
+ # Causes the client to return stubbed responses. By default
283
+ # fake responses are generated and returned. You can specify
284
+ # the response data to return or errors to raise by calling
285
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
286
+ #
287
+ # ** Please note ** When response stubbing is enabled, no HTTP
288
+ # requests are made, and retries are disabled.
289
+ #
290
+ # @option options [Boolean] :use_dualstack_endpoint
291
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
292
+ # will be used if available.
293
+ #
294
+ # @option options [Boolean] :use_fips_endpoint
295
+ # When set to `true`, fips compatible endpoints will be used if available.
296
+ # When a `fips` region is used, the region is normalized and this config
297
+ # is set to `true`.
298
+ #
299
+ # @option options [Boolean] :validate_params (true)
300
+ # When `true`, request parameters are validated before
301
+ # sending the request.
302
+ #
303
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
304
+ # requests through. Formatted like 'http://proxy.com:123'.
305
+ #
306
+ # @option options [Float] :http_open_timeout (15) The number of
307
+ # seconds to wait when opening a HTTP session before raising a
308
+ # `Timeout::Error`.
309
+ #
310
+ # @option options [Integer] :http_read_timeout (60) The default
311
+ # number of seconds to wait for response data. This value can
312
+ # safely be set per-request on the session.
313
+ #
314
+ # @option options [Float] :http_idle_timeout (5) The number of
315
+ # seconds a connection is allowed to sit idle before it is
316
+ # considered stale. Stale connections are closed and removed
317
+ # from the pool before making a request.
318
+ #
319
+ # @option options [Float] :http_continue_timeout (1) The number of
320
+ # seconds to wait for a 100-continue response before sending the
321
+ # request body. This option has no effect unless the request has
322
+ # "Expect" header set to "100-continue". Defaults to `nil` which
323
+ # disables this behaviour. This value can safely be set per
324
+ # request on the session.
325
+ #
326
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
327
+ # HTTP debug output will be sent to the `:logger`.
328
+ #
329
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
330
+ # SSL peer certificates are verified when establishing a
331
+ # connection.
332
+ #
333
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
334
+ # certificate authority bundle file that should be used when
335
+ # verifying peer certificates. If you do not pass
336
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
337
+ # will be used if available.
338
+ #
339
+ # @option options [String] :ssl_ca_directory Full path of the
340
+ # directory that contains the unbundled SSL certificate
341
+ # authority files for verifying peer certificates. If you do
342
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
343
+ # system default will be used if available.
344
+ #
345
+ def initialize(*args)
346
+ super
347
+ end
348
+
349
+ # @!group API Operations
350
+
351
+ # Associates a backup gateway with your server. After you complete the
352
+ # association process, you can back up and restore your VMs through the
353
+ # gateway.
354
+ #
355
+ # @option params [required, String] :gateway_arn
356
+ # The Amazon Resource Name (ARN) of the gateway. Use the `ListGateways`
357
+ # operation to return a list of gateways for your account and Amazon Web
358
+ # Services Region.
359
+ #
360
+ # @option params [required, String] :server_arn
361
+ # The Amazon Resource Name (ARN) of the server that hosts your virtual
362
+ # machines.
363
+ #
364
+ # @return [Types::AssociateGatewayToServerOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
365
+ #
366
+ # * {Types::AssociateGatewayToServerOutput#gateway_arn #gateway_arn} => String
367
+ #
368
+ # @example Request syntax with placeholder values
369
+ #
370
+ # resp = client.associate_gateway_to_server({
371
+ # gateway_arn: "GatewayArn", # required
372
+ # server_arn: "ServerArn", # required
373
+ # })
374
+ #
375
+ # @example Response structure
376
+ #
377
+ # resp.gateway_arn #=> String
378
+ #
379
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/AssociateGatewayToServer AWS API Documentation
380
+ #
381
+ # @overload associate_gateway_to_server(params = {})
382
+ # @param [Hash] params ({})
383
+ def associate_gateway_to_server(params = {}, options = {})
384
+ req = build_request(:associate_gateway_to_server, params)
385
+ req.send_request(options)
386
+ end
387
+
388
+ # Creates a backup gateway. After you create a gateway, you can
389
+ # associate it with a server using the `AssociateGatewayToServer`
390
+ # operation.
391
+ #
392
+ # @option params [required, String] :activation_key
393
+ # The activation key of the created gateway.
394
+ #
395
+ # @option params [required, String] :gateway_display_name
396
+ # The display name of the created gateway.
397
+ #
398
+ # @option params [required, String] :gateway_type
399
+ # The type of created gateway.
400
+ #
401
+ # @option params [Array<Types::Tag>] :tags
402
+ # A list of up to 50 tags to assign to the gateway. Each tag is a
403
+ # key-value pair.
404
+ #
405
+ # @return [Types::CreateGatewayOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
406
+ #
407
+ # * {Types::CreateGatewayOutput#gateway_arn #gateway_arn} => String
408
+ #
409
+ # @example Request syntax with placeholder values
410
+ #
411
+ # resp = client.create_gateway({
412
+ # activation_key: "ActivationKey", # required
413
+ # gateway_display_name: "Name", # required
414
+ # gateway_type: "BACKUP_VM", # required, accepts BACKUP_VM
415
+ # tags: [
416
+ # {
417
+ # key: "TagKey", # required
418
+ # value: "TagValue", # required
419
+ # },
420
+ # ],
421
+ # })
422
+ #
423
+ # @example Response structure
424
+ #
425
+ # resp.gateway_arn #=> String
426
+ #
427
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/CreateGateway AWS API Documentation
428
+ #
429
+ # @overload create_gateway(params = {})
430
+ # @param [Hash] params ({})
431
+ def create_gateway(params = {}, options = {})
432
+ req = build_request(:create_gateway, params)
433
+ req.send_request(options)
434
+ end
435
+
436
+ # Deletes a backup gateway.
437
+ #
438
+ # @option params [required, String] :gateway_arn
439
+ # The Amazon Resource Name (ARN) of the gateway to delete.
440
+ #
441
+ # @return [Types::DeleteGatewayOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
442
+ #
443
+ # * {Types::DeleteGatewayOutput#gateway_arn #gateway_arn} => String
444
+ #
445
+ # @example Request syntax with placeholder values
446
+ #
447
+ # resp = client.delete_gateway({
448
+ # gateway_arn: "GatewayArn", # required
449
+ # })
450
+ #
451
+ # @example Response structure
452
+ #
453
+ # resp.gateway_arn #=> String
454
+ #
455
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/DeleteGateway AWS API Documentation
456
+ #
457
+ # @overload delete_gateway(params = {})
458
+ # @param [Hash] params ({})
459
+ def delete_gateway(params = {}, options = {})
460
+ req = build_request(:delete_gateway, params)
461
+ req.send_request(options)
462
+ end
463
+
464
+ # Deletes a hypervisor.
465
+ #
466
+ # @option params [required, String] :hypervisor_arn
467
+ # The Amazon Resource Name (ARN) of the hypervisor to delete.
468
+ #
469
+ # @return [Types::DeleteHypervisorOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
470
+ #
471
+ # * {Types::DeleteHypervisorOutput#hypervisor_arn #hypervisor_arn} => String
472
+ #
473
+ # @example Request syntax with placeholder values
474
+ #
475
+ # resp = client.delete_hypervisor({
476
+ # hypervisor_arn: "ServerArn", # required
477
+ # })
478
+ #
479
+ # @example Response structure
480
+ #
481
+ # resp.hypervisor_arn #=> String
482
+ #
483
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/DeleteHypervisor AWS API Documentation
484
+ #
485
+ # @overload delete_hypervisor(params = {})
486
+ # @param [Hash] params ({})
487
+ def delete_hypervisor(params = {}, options = {})
488
+ req = build_request(:delete_hypervisor, params)
489
+ req.send_request(options)
490
+ end
491
+
492
+ # Disassociates a backup gateway from the specified server. After the
493
+ # disassociation process finishes, the gateway can no longer access the
494
+ # virtual machines on the server.
495
+ #
496
+ # @option params [required, String] :gateway_arn
497
+ # The Amazon Resource Name (ARN) of the gateway to disassociate.
498
+ #
499
+ # @return [Types::DisassociateGatewayFromServerOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
500
+ #
501
+ # * {Types::DisassociateGatewayFromServerOutput#gateway_arn #gateway_arn} => String
502
+ #
503
+ # @example Request syntax with placeholder values
504
+ #
505
+ # resp = client.disassociate_gateway_from_server({
506
+ # gateway_arn: "GatewayArn", # required
507
+ # })
508
+ #
509
+ # @example Response structure
510
+ #
511
+ # resp.gateway_arn #=> String
512
+ #
513
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/DisassociateGatewayFromServer AWS API Documentation
514
+ #
515
+ # @overload disassociate_gateway_from_server(params = {})
516
+ # @param [Hash] params ({})
517
+ def disassociate_gateway_from_server(params = {}, options = {})
518
+ req = build_request(:disassociate_gateway_from_server, params)
519
+ req.send_request(options)
520
+ end
521
+
522
+ # Connect to a hypervisor by importing its configuration.
523
+ #
524
+ # @option params [required, String] :host
525
+ # The server host of the hypervisor. This can be either an IP address or
526
+ # a fully-qualified domain name (FQDN).
527
+ #
528
+ # @option params [String] :kms_key_arn
529
+ # The Key Management Service for the hypervisor.
530
+ #
531
+ # @option params [required, String] :name
532
+ # The name of the hypervisor.
533
+ #
534
+ # @option params [String] :password
535
+ # The password for the hypervisor.
536
+ #
537
+ # @option params [Array<Types::Tag>] :tags
538
+ # The tags of the hypervisor configuration to import.
539
+ #
540
+ # @option params [String] :username
541
+ # The username for the hypervisor.
542
+ #
543
+ # @return [Types::ImportHypervisorConfigurationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
544
+ #
545
+ # * {Types::ImportHypervisorConfigurationOutput#hypervisor_arn #hypervisor_arn} => String
546
+ #
547
+ # @example Request syntax with placeholder values
548
+ #
549
+ # resp = client.import_hypervisor_configuration({
550
+ # host: "Host", # required
551
+ # kms_key_arn: "KmsKeyArn",
552
+ # name: "Name", # required
553
+ # password: "Password",
554
+ # tags: [
555
+ # {
556
+ # key: "TagKey", # required
557
+ # value: "TagValue", # required
558
+ # },
559
+ # ],
560
+ # username: "Username",
561
+ # })
562
+ #
563
+ # @example Response structure
564
+ #
565
+ # resp.hypervisor_arn #=> String
566
+ #
567
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/ImportHypervisorConfiguration AWS API Documentation
568
+ #
569
+ # @overload import_hypervisor_configuration(params = {})
570
+ # @param [Hash] params ({})
571
+ def import_hypervisor_configuration(params = {}, options = {})
572
+ req = build_request(:import_hypervisor_configuration, params)
573
+ req.send_request(options)
574
+ end
575
+
576
+ # Lists backup gateways owned by an Amazon Web Services account in an
577
+ # Amazon Web Services Region. The returned list is ordered by gateway
578
+ # Amazon Resource Name (ARN).
579
+ #
580
+ # @option params [Integer] :max_results
581
+ # The maximum number of gateways to list.
582
+ #
583
+ # @option params [String] :next_token
584
+ # The next item following a partial list of returned resources. For
585
+ # example, if a request is made to return `MaxResults` number of
586
+ # resources, `NextToken` allows you to return more items in your list
587
+ # starting at the location pointed to by the next token.
588
+ #
589
+ # @return [Types::ListGatewaysOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
590
+ #
591
+ # * {Types::ListGatewaysOutput#gateways #gateways} => Array&lt;Types::Gateway&gt;
592
+ # * {Types::ListGatewaysOutput#next_token #next_token} => String
593
+ #
594
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
595
+ #
596
+ # @example Request syntax with placeholder values
597
+ #
598
+ # resp = client.list_gateways({
599
+ # max_results: 1,
600
+ # next_token: "NextToken",
601
+ # })
602
+ #
603
+ # @example Response structure
604
+ #
605
+ # resp.gateways #=> Array
606
+ # resp.gateways[0].gateway_arn #=> String
607
+ # resp.gateways[0].gateway_display_name #=> String
608
+ # resp.gateways[0].gateway_type #=> String, one of "BACKUP_VM"
609
+ # resp.gateways[0].hypervisor_id #=> String
610
+ # resp.gateways[0].last_seen_time #=> Time
611
+ # resp.next_token #=> String
612
+ #
613
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/ListGateways AWS API Documentation
614
+ #
615
+ # @overload list_gateways(params = {})
616
+ # @param [Hash] params ({})
617
+ def list_gateways(params = {}, options = {})
618
+ req = build_request(:list_gateways, params)
619
+ req.send_request(options)
620
+ end
621
+
622
+ # Lists your hypervisors.
623
+ #
624
+ # @option params [Integer] :max_results
625
+ # The maximum number of hypervisors to list.
626
+ #
627
+ # @option params [String] :next_token
628
+ # The next item following a partial list of returned resources. For
629
+ # example, if a request is made to return `maxResults` number of
630
+ # resources, `NextToken` allows you to return more items in your list
631
+ # starting at the location pointed to by the next token.
632
+ #
633
+ # @return [Types::ListHypervisorsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
634
+ #
635
+ # * {Types::ListHypervisorsOutput#hypervisors #hypervisors} => Array&lt;Types::Hypervisor&gt;
636
+ # * {Types::ListHypervisorsOutput#next_token #next_token} => String
637
+ #
638
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
639
+ #
640
+ # @example Request syntax with placeholder values
641
+ #
642
+ # resp = client.list_hypervisors({
643
+ # max_results: 1,
644
+ # next_token: "NextToken",
645
+ # })
646
+ #
647
+ # @example Response structure
648
+ #
649
+ # resp.hypervisors #=> Array
650
+ # resp.hypervisors[0].host #=> String
651
+ # resp.hypervisors[0].hypervisor_arn #=> String
652
+ # resp.hypervisors[0].kms_key_arn #=> String
653
+ # resp.hypervisors[0].name #=> String
654
+ # resp.hypervisors[0].state #=> String, one of "PENDING", "ONLINE", "OFFLINE", "ERROR"
655
+ # resp.next_token #=> String
656
+ #
657
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/ListHypervisors AWS API Documentation
658
+ #
659
+ # @overload list_hypervisors(params = {})
660
+ # @param [Hash] params ({})
661
+ def list_hypervisors(params = {}, options = {})
662
+ req = build_request(:list_hypervisors, params)
663
+ req.send_request(options)
664
+ end
665
+
666
+ # Lists the tags applied to the resource identified by its Amazon
667
+ # Resource Name (ARN).
668
+ #
669
+ # @option params [required, String] :resource_arn
670
+ # The Amazon Resource Name (ARN) of the resource's tags to list.
671
+ #
672
+ # @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
673
+ #
674
+ # * {Types::ListTagsForResourceOutput#resource_arn #resource_arn} => String
675
+ # * {Types::ListTagsForResourceOutput#tags #tags} => Array&lt;Types::Tag&gt;
676
+ #
677
+ # @example Request syntax with placeholder values
678
+ #
679
+ # resp = client.list_tags_for_resource({
680
+ # resource_arn: "ResourceArn", # required
681
+ # })
682
+ #
683
+ # @example Response structure
684
+ #
685
+ # resp.resource_arn #=> String
686
+ # resp.tags #=> Array
687
+ # resp.tags[0].key #=> String
688
+ # resp.tags[0].value #=> String
689
+ #
690
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/ListTagsForResource AWS API Documentation
691
+ #
692
+ # @overload list_tags_for_resource(params = {})
693
+ # @param [Hash] params ({})
694
+ def list_tags_for_resource(params = {}, options = {})
695
+ req = build_request(:list_tags_for_resource, params)
696
+ req.send_request(options)
697
+ end
698
+
699
+ # Lists your virtual machines.
700
+ #
701
+ # @option params [Integer] :max_results
702
+ # The maximum number of virtual machines to list.
703
+ #
704
+ # @option params [String] :next_token
705
+ # The next item following a partial list of returned resources. For
706
+ # example, if a request is made to return `maxResults` number of
707
+ # resources, `NextToken` allows you to return more items in your list
708
+ # starting at the location pointed to by the next token.
709
+ #
710
+ # @return [Types::ListVirtualMachinesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
711
+ #
712
+ # * {Types::ListVirtualMachinesOutput#next_token #next_token} => String
713
+ # * {Types::ListVirtualMachinesOutput#virtual_machines #virtual_machines} => Array&lt;Types::VirtualMachine&gt;
714
+ #
715
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
716
+ #
717
+ # @example Request syntax with placeholder values
718
+ #
719
+ # resp = client.list_virtual_machines({
720
+ # max_results: 1,
721
+ # next_token: "NextToken",
722
+ # })
723
+ #
724
+ # @example Response structure
725
+ #
726
+ # resp.next_token #=> String
727
+ # resp.virtual_machines #=> Array
728
+ # resp.virtual_machines[0].host_name #=> String
729
+ # resp.virtual_machines[0].hypervisor_id #=> String
730
+ # resp.virtual_machines[0].last_backup_date #=> Time
731
+ # resp.virtual_machines[0].name #=> String
732
+ # resp.virtual_machines[0].path #=> String
733
+ # resp.virtual_machines[0].resource_arn #=> String
734
+ #
735
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/ListVirtualMachines AWS API Documentation
736
+ #
737
+ # @overload list_virtual_machines(params = {})
738
+ # @param [Hash] params ({})
739
+ def list_virtual_machines(params = {}, options = {})
740
+ req = build_request(:list_virtual_machines, params)
741
+ req.send_request(options)
742
+ end
743
+
744
+ # Set the maintenance start time for a gateway.
745
+ #
746
+ # @option params [Integer] :day_of_month
747
+ # The day of the month start maintenance on a gateway.
748
+ #
749
+ # Valid values range from `Sunday` to `Saturday`.
750
+ #
751
+ # @option params [Integer] :day_of_week
752
+ # The day of the week to start maintenance on a gateway.
753
+ #
754
+ # @option params [required, String] :gateway_arn
755
+ # The Amazon Resource Name (ARN) for the gateway, used to specify its
756
+ # maintenance start time.
757
+ #
758
+ # @option params [required, Integer] :hour_of_day
759
+ # The hour of the day to start maintenance on a gateway.
760
+ #
761
+ # @option params [required, Integer] :minute_of_hour
762
+ # The minute of the hour to start maintenance on a gateway.
763
+ #
764
+ # @return [Types::PutMaintenanceStartTimeOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
765
+ #
766
+ # * {Types::PutMaintenanceStartTimeOutput#gateway_arn #gateway_arn} => String
767
+ #
768
+ # @example Request syntax with placeholder values
769
+ #
770
+ # resp = client.put_maintenance_start_time({
771
+ # day_of_month: 1,
772
+ # day_of_week: 1,
773
+ # gateway_arn: "GatewayArn", # required
774
+ # hour_of_day: 1, # required
775
+ # minute_of_hour: 1, # required
776
+ # })
777
+ #
778
+ # @example Response structure
779
+ #
780
+ # resp.gateway_arn #=> String
781
+ #
782
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/PutMaintenanceStartTime AWS API Documentation
783
+ #
784
+ # @overload put_maintenance_start_time(params = {})
785
+ # @param [Hash] params ({})
786
+ def put_maintenance_start_time(params = {}, options = {})
787
+ req = build_request(:put_maintenance_start_time, params)
788
+ req.send_request(options)
789
+ end
790
+
791
+ # Tag the resource.
792
+ #
793
+ # @option params [required, String] :resource_arn
794
+ # The Amazon Resource Name (ARN) of the resource to tag.
795
+ #
796
+ # @option params [required, Array<Types::Tag>] :tags
797
+ # A list of tags to assign to the resource.
798
+ #
799
+ # @return [Types::TagResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
800
+ #
801
+ # * {Types::TagResourceOutput#resource_arn #resource_arn} => String
802
+ #
803
+ # @example Request syntax with placeholder values
804
+ #
805
+ # resp = client.tag_resource({
806
+ # resource_arn: "ResourceArn", # required
807
+ # tags: [ # required
808
+ # {
809
+ # key: "TagKey", # required
810
+ # value: "TagValue", # required
811
+ # },
812
+ # ],
813
+ # })
814
+ #
815
+ # @example Response structure
816
+ #
817
+ # resp.resource_arn #=> String
818
+ #
819
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/TagResource AWS API Documentation
820
+ #
821
+ # @overload tag_resource(params = {})
822
+ # @param [Hash] params ({})
823
+ def tag_resource(params = {}, options = {})
824
+ req = build_request(:tag_resource, params)
825
+ req.send_request(options)
826
+ end
827
+
828
+ # Tests your hypervisor configuration to validate that backup gateway
829
+ # can connect with the hypervisor and its resources.
830
+ #
831
+ # @option params [required, String] :gateway_arn
832
+ # The Amazon Resource Name (ARN) of the gateway to the hypervisor to
833
+ # test.
834
+ #
835
+ # @option params [required, String] :host
836
+ # The server host of the hypervisor. This can be either an IP address or
837
+ # a fully-qualified domain name (FQDN).
838
+ #
839
+ # @option params [String] :password
840
+ # The password for the hypervisor.
841
+ #
842
+ # @option params [String] :username
843
+ # The username for the hypervisor.
844
+ #
845
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
846
+ #
847
+ # @example Request syntax with placeholder values
848
+ #
849
+ # resp = client.test_hypervisor_configuration({
850
+ # gateway_arn: "GatewayArn", # required
851
+ # host: "Host", # required
852
+ # password: "Password",
853
+ # username: "Username",
854
+ # })
855
+ #
856
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/TestHypervisorConfiguration AWS API Documentation
857
+ #
858
+ # @overload test_hypervisor_configuration(params = {})
859
+ # @param [Hash] params ({})
860
+ def test_hypervisor_configuration(params = {}, options = {})
861
+ req = build_request(:test_hypervisor_configuration, params)
862
+ req.send_request(options)
863
+ end
864
+
865
+ # Removes tags from the resource.
866
+ #
867
+ # @option params [required, String] :resource_arn
868
+ # The Amazon Resource Name (ARN) of the resource from which to remove
869
+ # tags.
870
+ #
871
+ # @option params [required, Array<String>] :tag_keys
872
+ # The list of tag keys specifying which tags to remove.
873
+ #
874
+ # @return [Types::UntagResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
875
+ #
876
+ # * {Types::UntagResourceOutput#resource_arn #resource_arn} => String
877
+ #
878
+ # @example Request syntax with placeholder values
879
+ #
880
+ # resp = client.untag_resource({
881
+ # resource_arn: "ResourceArn", # required
882
+ # tag_keys: ["TagKey"], # required
883
+ # })
884
+ #
885
+ # @example Response structure
886
+ #
887
+ # resp.resource_arn #=> String
888
+ #
889
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/UntagResource AWS API Documentation
890
+ #
891
+ # @overload untag_resource(params = {})
892
+ # @param [Hash] params ({})
893
+ def untag_resource(params = {}, options = {})
894
+ req = build_request(:untag_resource, params)
895
+ req.send_request(options)
896
+ end
897
+
898
+ # Updates a gateway's name. Specify which gateway to update using the
899
+ # Amazon Resource Name (ARN) of the gateway in your request.
900
+ #
901
+ # @option params [required, String] :gateway_arn
902
+ # The Amazon Resource Name (ARN) of the gateway to update.
903
+ #
904
+ # @option params [String] :gateway_display_name
905
+ # The updated display name of the gateway.
906
+ #
907
+ # @return [Types::UpdateGatewayInformationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
908
+ #
909
+ # * {Types::UpdateGatewayInformationOutput#gateway_arn #gateway_arn} => String
910
+ #
911
+ # @example Request syntax with placeholder values
912
+ #
913
+ # resp = client.update_gateway_information({
914
+ # gateway_arn: "GatewayArn", # required
915
+ # gateway_display_name: "Name",
916
+ # })
917
+ #
918
+ # @example Response structure
919
+ #
920
+ # resp.gateway_arn #=> String
921
+ #
922
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/UpdateGatewayInformation AWS API Documentation
923
+ #
924
+ # @overload update_gateway_information(params = {})
925
+ # @param [Hash] params ({})
926
+ def update_gateway_information(params = {}, options = {})
927
+ req = build_request(:update_gateway_information, params)
928
+ req.send_request(options)
929
+ end
930
+
931
+ # Updates a hypervisor metadata, including its host, username, and
932
+ # password. Specify which hypervisor to update using the Amazon Resource
933
+ # Name (ARN) of the hypervisor in your request.
934
+ #
935
+ # @option params [String] :host
936
+ # The updated host of the hypervisor. This can be either an IP address
937
+ # or a fully-qualified domain name (FQDN).
938
+ #
939
+ # @option params [required, String] :hypervisor_arn
940
+ # The Amazon Resource Name (ARN) of the hypervisor to update.
941
+ #
942
+ # @option params [String] :password
943
+ # The updated password for the hypervisor.
944
+ #
945
+ # @option params [String] :username
946
+ # The updated username for the hypervisor.
947
+ #
948
+ # @return [Types::UpdateHypervisorOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
949
+ #
950
+ # * {Types::UpdateHypervisorOutput#hypervisor_arn #hypervisor_arn} => String
951
+ #
952
+ # @example Request syntax with placeholder values
953
+ #
954
+ # resp = client.update_hypervisor({
955
+ # host: "Host",
956
+ # hypervisor_arn: "ServerArn", # required
957
+ # password: "Password",
958
+ # username: "Username",
959
+ # })
960
+ #
961
+ # @example Response structure
962
+ #
963
+ # resp.hypervisor_arn #=> String
964
+ #
965
+ # @see http://docs.aws.amazon.com/goto/WebAPI/backup-gateway-2021-01-01/UpdateHypervisor AWS API Documentation
966
+ #
967
+ # @overload update_hypervisor(params = {})
968
+ # @param [Hash] params ({})
969
+ def update_hypervisor(params = {}, options = {})
970
+ req = build_request(:update_hypervisor, params)
971
+ req.send_request(options)
972
+ end
973
+
974
+ # @!endgroup
975
+
976
+ # @param params ({})
977
+ # @api private
978
+ def build_request(operation_name, params = {})
979
+ handlers = @handlers.for(operation_name)
980
+ context = Seahorse::Client::RequestContext.new(
981
+ operation_name: operation_name,
982
+ operation: config.api.operation(operation_name),
983
+ client: self,
984
+ params: params,
985
+ config: config)
986
+ context[:gem_name] = 'aws-sdk-backupgateway'
987
+ context[:gem_version] = '1.0.0'
988
+ Seahorse::Client::Request.new(handlers, context)
989
+ end
990
+
991
+ # @api private
992
+ # @deprecated
993
+ def waiter_names
994
+ []
995
+ end
996
+
997
+ class << self
998
+
999
+ # @api private
1000
+ attr_reader :identifier
1001
+
1002
+ # @api private
1003
+ def errors_module
1004
+ Errors
1005
+ end
1006
+
1007
+ end
1008
+ end
1009
+ end