aws-sdk-simpledbv2 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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-simpledbv2/client.rb +865 -0
- data/lib/aws-sdk-simpledbv2/client_api.rb +184 -0
- data/lib/aws-sdk-simpledbv2/customizations.rb +0 -0
- data/lib/aws-sdk-simpledbv2/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-simpledbv2/endpoint_provider.rb +53 -0
- data/lib/aws-sdk-simpledbv2/endpoints.rb +20 -0
- data/lib/aws-sdk-simpledbv2/errors.rb +150 -0
- data/lib/aws-sdk-simpledbv2/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-simpledbv2/resource.rb +26 -0
- data/lib/aws-sdk-simpledbv2/types.rb +369 -0
- data/lib/aws-sdk-simpledbv2/waiters.rb +120 -0
- data/lib/aws-sdk-simpledbv2.rb +62 -0
- data/sig/client.rbs +144 -0
- data/sig/errors.rbs +37 -0
- data/sig/resource.rbs +85 -0
- data/sig/types.rbs +109 -0
- data/sig/waiters.rbs +23 -0
- metadata +97 -0
|
@@ -0,0 +1,865 @@
|
|
|
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'
|
|
11
|
+
require 'aws-sdk-core/plugins/credentials_configuration'
|
|
12
|
+
require 'aws-sdk-core/plugins/logging'
|
|
13
|
+
require 'aws-sdk-core/plugins/param_converter'
|
|
14
|
+
require 'aws-sdk-core/plugins/param_validator'
|
|
15
|
+
require 'aws-sdk-core/plugins/user_agent'
|
|
16
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors'
|
|
17
|
+
require 'aws-sdk-core/plugins/retry_errors'
|
|
18
|
+
require 'aws-sdk-core/plugins/global_configuration'
|
|
19
|
+
require 'aws-sdk-core/plugins/regional_endpoint'
|
|
20
|
+
require 'aws-sdk-core/plugins/endpoint_discovery'
|
|
21
|
+
require 'aws-sdk-core/plugins/endpoint_pattern'
|
|
22
|
+
require 'aws-sdk-core/plugins/response_paging'
|
|
23
|
+
require 'aws-sdk-core/plugins/stub_responses'
|
|
24
|
+
require 'aws-sdk-core/plugins/idempotency_token'
|
|
25
|
+
require 'aws-sdk-core/plugins/invocation_id'
|
|
26
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter'
|
|
27
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin'
|
|
28
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin'
|
|
29
|
+
require 'aws-sdk-core/plugins/transfer_encoding'
|
|
30
|
+
require 'aws-sdk-core/plugins/http_checksum'
|
|
31
|
+
require 'aws-sdk-core/plugins/checksum_algorithm'
|
|
32
|
+
require 'aws-sdk-core/plugins/request_compression'
|
|
33
|
+
require 'aws-sdk-core/plugins/defaults_mode'
|
|
34
|
+
require 'aws-sdk-core/plugins/recursion_detection'
|
|
35
|
+
require 'aws-sdk-core/plugins/telemetry'
|
|
36
|
+
require 'aws-sdk-core/plugins/sign'
|
|
37
|
+
require 'aws-sdk-core/plugins/protocols/rest_json'
|
|
38
|
+
|
|
39
|
+
module Aws::SimpleDBv2
|
|
40
|
+
# An API client for SimpleDBv2. To construct a client, you need to configure a `:region` and `:credentials`.
|
|
41
|
+
#
|
|
42
|
+
# client = Aws::SimpleDBv2::Client.new(
|
|
43
|
+
# region: region_name,
|
|
44
|
+
# credentials: credentials,
|
|
45
|
+
# # ...
|
|
46
|
+
# )
|
|
47
|
+
#
|
|
48
|
+
# For details on configuring region and credentials see
|
|
49
|
+
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
|
50
|
+
#
|
|
51
|
+
# See {#initialize} for a full list of supported configuration options.
|
|
52
|
+
class Client < Seahorse::Client::Base
|
|
53
|
+
|
|
54
|
+
include Aws::ClientStubs
|
|
55
|
+
|
|
56
|
+
@identifier = :simpledbv2
|
|
57
|
+
|
|
58
|
+
set_api(ClientApi::API)
|
|
59
|
+
|
|
60
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
|
61
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
|
62
|
+
add_plugin(Aws::Plugins::Logging)
|
|
63
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
|
64
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
|
65
|
+
add_plugin(Aws::Plugins::UserAgent)
|
|
66
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
|
67
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
|
68
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
|
69
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
|
70
|
+
add_plugin(Aws::Plugins::EndpointDiscovery)
|
|
71
|
+
add_plugin(Aws::Plugins::EndpointPattern)
|
|
72
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
|
73
|
+
add_plugin(Aws::Plugins::StubResponses)
|
|
74
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
|
75
|
+
add_plugin(Aws::Plugins::InvocationId)
|
|
76
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
|
77
|
+
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
|
78
|
+
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
|
79
|
+
add_plugin(Aws::Plugins::TransferEncoding)
|
|
80
|
+
add_plugin(Aws::Plugins::HttpChecksum)
|
|
81
|
+
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
|
82
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
|
83
|
+
add_plugin(Aws::Plugins::DefaultsMode)
|
|
84
|
+
add_plugin(Aws::Plugins::RecursionDetection)
|
|
85
|
+
add_plugin(Aws::Plugins::Telemetry)
|
|
86
|
+
add_plugin(Aws::Plugins::Sign)
|
|
87
|
+
add_plugin(Aws::Plugins::Protocols::RestJson)
|
|
88
|
+
add_plugin(Aws::SimpleDBv2::Plugins::Endpoints)
|
|
89
|
+
|
|
90
|
+
# @overload initialize(options)
|
|
91
|
+
# @param [Hash] options
|
|
92
|
+
#
|
|
93
|
+
# @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
|
|
94
|
+
# A list of plugins to apply to the client. Each plugin is either a
|
|
95
|
+
# class name or an instance of a plugin class.
|
|
96
|
+
#
|
|
97
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
|
98
|
+
# Your AWS credentials used for authentication. This can be any class that includes and implements
|
|
99
|
+
# `Aws::CredentialProvider`, or instance of any one of the following classes:
|
|
100
|
+
#
|
|
101
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
|
102
|
+
# credentials.
|
|
103
|
+
#
|
|
104
|
+
# * `Aws::SharedCredentials` - Used for loading static credentials from a
|
|
105
|
+
# shared file, such as `~/.aws/config`.
|
|
106
|
+
#
|
|
107
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
|
108
|
+
#
|
|
109
|
+
# * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
|
|
110
|
+
# assume a role after providing credentials via the web.
|
|
111
|
+
#
|
|
112
|
+
# * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
|
|
113
|
+
# access token generated from `aws login`.
|
|
114
|
+
#
|
|
115
|
+
# * `Aws::ProcessCredentials` - Used for loading credentials from a
|
|
116
|
+
# process that outputs to stdout.
|
|
117
|
+
#
|
|
118
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
|
119
|
+
# from an EC2 IMDS on an EC2 instance.
|
|
120
|
+
#
|
|
121
|
+
# * `Aws::ECSCredentials` - Used for loading credentials from
|
|
122
|
+
# instances running in ECS.
|
|
123
|
+
#
|
|
124
|
+
# * `Aws::CognitoIdentityCredentials` - Used for loading credentials
|
|
125
|
+
# from the Cognito Identity service.
|
|
126
|
+
#
|
|
127
|
+
# When `:credentials` are not configured directly, the following locations will be searched for credentials:
|
|
128
|
+
#
|
|
129
|
+
# * `Aws.config[:credentials]`
|
|
130
|
+
#
|
|
131
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
|
132
|
+
# `:account_id` options.
|
|
133
|
+
#
|
|
134
|
+
# * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
|
|
135
|
+
# `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
|
|
136
|
+
#
|
|
137
|
+
# * `~/.aws/credentials`
|
|
138
|
+
#
|
|
139
|
+
# * `~/.aws/config`
|
|
140
|
+
#
|
|
141
|
+
# * EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive.
|
|
142
|
+
# Construct and pass an instance of `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
|
143
|
+
# enable retries and extended timeouts. Instance profile credential fetching can be disabled by
|
|
144
|
+
# setting `ENV['AWS_EC2_METADATA_DISABLED']` to `true`.
|
|
145
|
+
#
|
|
146
|
+
# @option options [required, String] :region
|
|
147
|
+
# The AWS region to connect to. The configured `:region` is
|
|
148
|
+
# used to determine the service `:endpoint`. When not passed,
|
|
149
|
+
# a default `:region` is searched for in the following locations:
|
|
150
|
+
#
|
|
151
|
+
# * `Aws.config[:region]`
|
|
152
|
+
# * `ENV['AWS_REGION']`
|
|
153
|
+
# * `ENV['AMAZON_REGION']`
|
|
154
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
|
155
|
+
# * `~/.aws/credentials`
|
|
156
|
+
# * `~/.aws/config`
|
|
157
|
+
#
|
|
158
|
+
# @option options [String] :access_key_id
|
|
159
|
+
#
|
|
160
|
+
# @option options [String] :account_id
|
|
161
|
+
#
|
|
162
|
+
# @option options [Boolean] :active_endpoint_cache (false)
|
|
163
|
+
# When set to `true`, a thread polling for endpoints will be running in
|
|
164
|
+
# the background every 60 secs (default). Defaults to `false`.
|
|
165
|
+
#
|
|
166
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
|
167
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
|
168
|
+
# until there is sufficent client side capacity to retry the request.
|
|
169
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
|
170
|
+
# not retry instead of sleeping.
|
|
171
|
+
#
|
|
172
|
+
# @option options [Array<String>] :auth_scheme_preference
|
|
173
|
+
# A list of preferred authentication schemes to use when making a request. Supported values are:
|
|
174
|
+
# `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
|
|
175
|
+
# shared config as `auth_scheme_preference`, the value should be a comma-separated list.
|
|
176
|
+
#
|
|
177
|
+
# @option options [Boolean] :client_side_monitoring (false)
|
|
178
|
+
# When `true`, client-side metrics will be collected for all API requests from
|
|
179
|
+
# this client.
|
|
180
|
+
#
|
|
181
|
+
# @option options [String] :client_side_monitoring_client_id ("")
|
|
182
|
+
# Allows you to provide an identifier for this client which will be attached to
|
|
183
|
+
# all generated client side metrics. Defaults to an empty string.
|
|
184
|
+
#
|
|
185
|
+
# @option options [String] :client_side_monitoring_host ("127.0.0.1")
|
|
186
|
+
# Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
|
|
187
|
+
# side monitoring agent is running on, where client metrics will be published via UDP.
|
|
188
|
+
#
|
|
189
|
+
# @option options [Integer] :client_side_monitoring_port (31000)
|
|
190
|
+
# Required for publishing client metrics. The port that the client side monitoring
|
|
191
|
+
# agent is running on, where client metrics will be published via UDP.
|
|
192
|
+
#
|
|
193
|
+
# @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
|
|
194
|
+
# Allows you to provide a custom client-side monitoring publisher class. By default,
|
|
195
|
+
# will use the Client Side Monitoring Agent Publisher.
|
|
196
|
+
#
|
|
197
|
+
# @option options [Boolean] :convert_params (true)
|
|
198
|
+
# When `true`, an attempt is made to coerce request parameters into
|
|
199
|
+
# the required types.
|
|
200
|
+
#
|
|
201
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
|
202
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
|
203
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
|
204
|
+
#
|
|
205
|
+
# @option options [String] :defaults_mode ("legacy")
|
|
206
|
+
# See {Aws::DefaultsModeConfiguration} for a list of the
|
|
207
|
+
# accepted modes and the configuration defaults that are included.
|
|
208
|
+
#
|
|
209
|
+
# @option options [Boolean] :disable_host_prefix_injection (false)
|
|
210
|
+
# When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
|
|
211
|
+
#
|
|
212
|
+
# @option options [Boolean] :disable_request_compression (false)
|
|
213
|
+
# When set to 'true' the request body will not be compressed
|
|
214
|
+
# for supported operations.
|
|
215
|
+
#
|
|
216
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
|
217
|
+
# Normally you should not configure the `:endpoint` option
|
|
218
|
+
# directly. This is normally constructed from the `:region`
|
|
219
|
+
# option. Configuring `:endpoint` is normally reserved for
|
|
220
|
+
# connecting to test or custom endpoints. The endpoint should
|
|
221
|
+
# be a URI formatted like:
|
|
222
|
+
#
|
|
223
|
+
# 'http://example.com'
|
|
224
|
+
# 'https://example.com'
|
|
225
|
+
# 'http://example.com:123'
|
|
226
|
+
#
|
|
227
|
+
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
|
228
|
+
# Used for the maximum size limit of the LRU cache storing endpoints data
|
|
229
|
+
# for endpoint discovery enabled operations. Defaults to 1000.
|
|
230
|
+
#
|
|
231
|
+
# @option options [Integer] :endpoint_cache_max_threads (10)
|
|
232
|
+
# Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
|
|
233
|
+
#
|
|
234
|
+
# @option options [Integer] :endpoint_cache_poll_interval (60)
|
|
235
|
+
# When :endpoint_discovery and :active_endpoint_cache is enabled,
|
|
236
|
+
# Use this option to config the time interval in seconds for making
|
|
237
|
+
# requests fetching endpoints information. Defaults to 60 sec.
|
|
238
|
+
#
|
|
239
|
+
# @option options [Boolean] :endpoint_discovery (false)
|
|
240
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
|
241
|
+
#
|
|
242
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
|
243
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
|
244
|
+
# variables and the shared configuration file.
|
|
245
|
+
#
|
|
246
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
|
247
|
+
# The log formatter.
|
|
248
|
+
#
|
|
249
|
+
# @option options [Symbol] :log_level (:info)
|
|
250
|
+
# The log level to send messages to the `:logger` at.
|
|
251
|
+
#
|
|
252
|
+
# @option options [Logger] :logger
|
|
253
|
+
# The Logger instance to send log messages to. If this option
|
|
254
|
+
# is not set, logging will be disabled.
|
|
255
|
+
#
|
|
256
|
+
# @option options [Integer] :max_attempts (3)
|
|
257
|
+
# An integer representing the maximum number attempts that will be made for
|
|
258
|
+
# a single request, including the initial attempt. For example,
|
|
259
|
+
# setting this value to 5 will result in a request being retried up to
|
|
260
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
|
261
|
+
#
|
|
262
|
+
# @option options [String] :profile ("default")
|
|
263
|
+
# Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
|
|
264
|
+
# When not specified, 'default' is used.
|
|
265
|
+
#
|
|
266
|
+
# @option options [String] :request_checksum_calculation ("when_supported")
|
|
267
|
+
# Determines when a checksum will be calculated for request payloads. Values are:
|
|
268
|
+
#
|
|
269
|
+
# * `when_supported` - (default) When set, a checksum will be
|
|
270
|
+
# calculated for all request payloads of operations modeled with the
|
|
271
|
+
# `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
|
|
272
|
+
# `requestAlgorithmMember` is modeled.
|
|
273
|
+
# * `when_required` - When set, a checksum will only be calculated for
|
|
274
|
+
# request payloads of operations modeled with the `httpChecksum` trait where
|
|
275
|
+
# `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
|
|
276
|
+
# is modeled and supplied.
|
|
277
|
+
#
|
|
278
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
|
279
|
+
# The minimum size in bytes that triggers compression for request
|
|
280
|
+
# bodies. The value must be non-negative integer value between 0
|
|
281
|
+
# and 10485780 bytes inclusive.
|
|
282
|
+
#
|
|
283
|
+
# @option options [String] :response_checksum_validation ("when_supported")
|
|
284
|
+
# Determines when checksum validation will be performed on response payloads. Values are:
|
|
285
|
+
#
|
|
286
|
+
# * `when_supported` - (default) When set, checksum validation is performed on all
|
|
287
|
+
# response payloads of operations modeled with the `httpChecksum` trait where
|
|
288
|
+
# `responseAlgorithms` is modeled, except when no modeled checksum algorithms
|
|
289
|
+
# are supported.
|
|
290
|
+
# * `when_required` - When set, checksum validation is not performed on
|
|
291
|
+
# response payloads of operations unless the checksum algorithm is supported and
|
|
292
|
+
# the `requestValidationModeMember` member is set to `ENABLED`.
|
|
293
|
+
#
|
|
294
|
+
# @option options [Proc] :retry_backoff
|
|
295
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
|
296
|
+
# This option is only used in the `legacy` retry mode.
|
|
297
|
+
#
|
|
298
|
+
# @option options [Float] :retry_base_delay (0.3)
|
|
299
|
+
# The base delay in seconds used by the default backoff function. This option
|
|
300
|
+
# is only used in the `legacy` retry mode.
|
|
301
|
+
#
|
|
302
|
+
# @option options [Symbol] :retry_jitter (:none)
|
|
303
|
+
# A delay randomiser function used by the default backoff function.
|
|
304
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
|
305
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
|
306
|
+
# in the `legacy` retry mode.
|
|
307
|
+
#
|
|
308
|
+
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
|
309
|
+
#
|
|
310
|
+
# @option options [Integer] :retry_limit (3)
|
|
311
|
+
# The maximum number of times to retry failed requests. Only
|
|
312
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
|
313
|
+
# are retried. Generally, these are throttling errors, data
|
|
314
|
+
# checksum errors, networking errors, timeout errors, auth errors,
|
|
315
|
+
# endpoint discovery, and errors from expired credentials.
|
|
316
|
+
# This option is only used in the `legacy` retry mode.
|
|
317
|
+
#
|
|
318
|
+
# @option options [Integer] :retry_max_delay (0)
|
|
319
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
|
320
|
+
# used by the default backoff function. This option is only used in the
|
|
321
|
+
# `legacy` retry mode.
|
|
322
|
+
#
|
|
323
|
+
# @option options [String] :retry_mode ("legacy")
|
|
324
|
+
# Specifies which retry algorithm to use. Values are:
|
|
325
|
+
#
|
|
326
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
|
327
|
+
# no retry mode is provided.
|
|
328
|
+
#
|
|
329
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
|
330
|
+
# This includes support for retry quotas, which limit the number of
|
|
331
|
+
# unsuccessful retries a client can make.
|
|
332
|
+
#
|
|
333
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
|
334
|
+
# functionality of `standard` mode along with automatic client side
|
|
335
|
+
# throttling. This is a provisional mode that may change behavior
|
|
336
|
+
# in the future.
|
|
337
|
+
#
|
|
338
|
+
# @option options [String] :sdk_ua_app_id
|
|
339
|
+
# A unique and opaque application ID that is appended to the
|
|
340
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
|
341
|
+
# maximum length of 50. This variable is sourced from environment
|
|
342
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
|
343
|
+
#
|
|
344
|
+
# @option options [String] :secret_access_key
|
|
345
|
+
#
|
|
346
|
+
# @option options [String] :session_token
|
|
347
|
+
#
|
|
348
|
+
# @option options [Array] :sigv4a_signing_region_set
|
|
349
|
+
# A list of regions that should be signed with SigV4a signing. When
|
|
350
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
|
351
|
+
# in the following locations:
|
|
352
|
+
#
|
|
353
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
|
354
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
|
355
|
+
# * `~/.aws/config`
|
|
356
|
+
#
|
|
357
|
+
# @option options [Boolean] :stub_responses (false)
|
|
358
|
+
# Causes the client to return stubbed responses. By default
|
|
359
|
+
# fake responses are generated and returned. You can specify
|
|
360
|
+
# the response data to return or errors to raise by calling
|
|
361
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
|
362
|
+
#
|
|
363
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
|
364
|
+
# requests are made, and retries are disabled.
|
|
365
|
+
#
|
|
366
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
|
367
|
+
# Allows you to provide a telemetry provider, which is used to
|
|
368
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
|
369
|
+
# will not record or emit any telemetry data. The SDK supports the
|
|
370
|
+
# following telemetry providers:
|
|
371
|
+
#
|
|
372
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
|
373
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
|
374
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
|
375
|
+
#
|
|
376
|
+
# @option options [Aws::TokenProvider] :token_provider
|
|
377
|
+
# Your Bearer token used for authentication. This can be any class that includes and implements
|
|
378
|
+
# `Aws::TokenProvider`, or instance of any one of the following classes:
|
|
379
|
+
#
|
|
380
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
|
381
|
+
# tokens.
|
|
382
|
+
#
|
|
383
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
|
384
|
+
# access token generated from `aws login`.
|
|
385
|
+
#
|
|
386
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
|
387
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
|
388
|
+
#
|
|
389
|
+
# @option options [Boolean] :use_dualstack_endpoint
|
|
390
|
+
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
|
391
|
+
# will be used if available.
|
|
392
|
+
#
|
|
393
|
+
# @option options [Boolean] :use_fips_endpoint
|
|
394
|
+
# When set to `true`, fips compatible endpoints will be used if available.
|
|
395
|
+
# When a `fips` region is used, the region is normalized and this config
|
|
396
|
+
# is set to `true`.
|
|
397
|
+
#
|
|
398
|
+
# @option options [Boolean] :validate_params (true)
|
|
399
|
+
# When `true`, request parameters are validated before
|
|
400
|
+
# sending the request.
|
|
401
|
+
#
|
|
402
|
+
# @option options [Aws::SimpleDBv2::EndpointProvider] :endpoint_provider
|
|
403
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
|
404
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
|
405
|
+
# `Aws::SimpleDBv2::EndpointParameters`.
|
|
406
|
+
#
|
|
407
|
+
# @option options [Float] :http_continue_timeout (1)
|
|
408
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
|
409
|
+
# request body. This option has no effect unless the request has "Expect"
|
|
410
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
|
411
|
+
# behaviour. This value can safely be set per request on the session.
|
|
412
|
+
#
|
|
413
|
+
# @option options [Float] :http_idle_timeout (5)
|
|
414
|
+
# The number of seconds a connection is allowed to sit idle before it
|
|
415
|
+
# is considered stale. Stale connections are closed and removed from the
|
|
416
|
+
# pool before making a request.
|
|
417
|
+
#
|
|
418
|
+
# @option options [Float] :http_open_timeout (15)
|
|
419
|
+
# The default number of seconds to wait for response data.
|
|
420
|
+
# This value can safely be set per-request on the session.
|
|
421
|
+
#
|
|
422
|
+
# @option options [URI::HTTP,String] :http_proxy
|
|
423
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
|
424
|
+
#
|
|
425
|
+
# @option options [Float] :http_read_timeout (60)
|
|
426
|
+
# The default number of seconds to wait for response data.
|
|
427
|
+
# This value can safely be set per-request on the session.
|
|
428
|
+
#
|
|
429
|
+
# @option options [Boolean] :http_wire_trace (false)
|
|
430
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
|
431
|
+
#
|
|
432
|
+
# @option options [Proc] :on_chunk_received
|
|
433
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
434
|
+
# of the response body is received. It provides three arguments: the chunk,
|
|
435
|
+
# the number of bytes received, and the total number of
|
|
436
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
|
437
|
+
#
|
|
438
|
+
# @option options [Proc] :on_chunk_sent
|
|
439
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
440
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
|
441
|
+
# the number of bytes read from the body, and the total number of
|
|
442
|
+
# bytes in the body.
|
|
443
|
+
#
|
|
444
|
+
# @option options [Boolean] :raise_response_errors (true)
|
|
445
|
+
# When `true`, response errors are raised.
|
|
446
|
+
#
|
|
447
|
+
# @option options [String] :ssl_ca_bundle
|
|
448
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
|
449
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
|
450
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
|
451
|
+
#
|
|
452
|
+
# @option options [String] :ssl_ca_directory
|
|
453
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
|
454
|
+
# authority files for verifying peer certificates. If you do
|
|
455
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
|
456
|
+
# default will be used if available.
|
|
457
|
+
#
|
|
458
|
+
# @option options [String] :ssl_ca_store
|
|
459
|
+
# Sets the X509::Store to verify peer certificate.
|
|
460
|
+
#
|
|
461
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
|
462
|
+
# Sets a client certificate when creating http connections.
|
|
463
|
+
#
|
|
464
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
|
465
|
+
# Sets a client key when creating http connections.
|
|
466
|
+
#
|
|
467
|
+
# @option options [Float] :ssl_timeout
|
|
468
|
+
# Sets the SSL timeout in seconds
|
|
469
|
+
#
|
|
470
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
|
471
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
|
472
|
+
#
|
|
473
|
+
def initialize(*args)
|
|
474
|
+
super
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
# @!group API Operations
|
|
478
|
+
|
|
479
|
+
# Returns information for an existing domain export.
|
|
480
|
+
#
|
|
481
|
+
# @option params [required, String] :export_arn
|
|
482
|
+
# Unique ARN identifier of the export.
|
|
483
|
+
#
|
|
484
|
+
# @return [Types::GetExportResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
485
|
+
#
|
|
486
|
+
# * {Types::GetExportResponse#export_arn #export_arn} => String
|
|
487
|
+
# * {Types::GetExportResponse#client_token #client_token} => String
|
|
488
|
+
# * {Types::GetExportResponse#export_status #export_status} => String
|
|
489
|
+
# * {Types::GetExportResponse#domain_name #domain_name} => String
|
|
490
|
+
# * {Types::GetExportResponse#requested_at #requested_at} => Time
|
|
491
|
+
# * {Types::GetExportResponse#s3_bucket #s3_bucket} => String
|
|
492
|
+
# * {Types::GetExportResponse#s3_key_prefix #s3_key_prefix} => String
|
|
493
|
+
# * {Types::GetExportResponse#s3_sse_algorithm #s3_sse_algorithm} => String
|
|
494
|
+
# * {Types::GetExportResponse#s3_sse_kms_key_id #s3_sse_kms_key_id} => String
|
|
495
|
+
# * {Types::GetExportResponse#s3_bucket_owner #s3_bucket_owner} => String
|
|
496
|
+
# * {Types::GetExportResponse#failure_code #failure_code} => String
|
|
497
|
+
# * {Types::GetExportResponse#failure_message #failure_message} => String
|
|
498
|
+
# * {Types::GetExportResponse#export_manifest #export_manifest} => String
|
|
499
|
+
# * {Types::GetExportResponse#items_count #items_count} => Integer
|
|
500
|
+
# * {Types::GetExportResponse#export_data_cutoff_time #export_data_cutoff_time} => Time
|
|
501
|
+
#
|
|
502
|
+
#
|
|
503
|
+
# @example Example: Get export details
|
|
504
|
+
#
|
|
505
|
+
# resp = client.get_export({
|
|
506
|
+
# export_arn: "arn:aws:sdb:us-east-1:123456789012:export/abc123",
|
|
507
|
+
# })
|
|
508
|
+
#
|
|
509
|
+
# resp.to_h outputs the following:
|
|
510
|
+
# {
|
|
511
|
+
# client_token: "abc123-def456-ghi789",
|
|
512
|
+
# domain_name: "my-domain",
|
|
513
|
+
# export_arn: "arn:aws:sdb:us-east-1:123456789012:export/abc123",
|
|
514
|
+
# export_data_cutoff_time: Time.parse(1234567895),
|
|
515
|
+
# export_status: "SUCCEEDED",
|
|
516
|
+
# requested_at: Time.parse(1234567890),
|
|
517
|
+
# s3_bucket: "my-export-bucket",
|
|
518
|
+
# }
|
|
519
|
+
#
|
|
520
|
+
# @example Request syntax with placeholder values
|
|
521
|
+
#
|
|
522
|
+
# resp = client.get_export({
|
|
523
|
+
# export_arn: "ExportArn", # required
|
|
524
|
+
# })
|
|
525
|
+
#
|
|
526
|
+
# @example Response structure
|
|
527
|
+
#
|
|
528
|
+
# resp.export_arn #=> String
|
|
529
|
+
# resp.client_token #=> String
|
|
530
|
+
# resp.export_status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCEEDED", "FAILED"
|
|
531
|
+
# resp.domain_name #=> String
|
|
532
|
+
# resp.requested_at #=> Time
|
|
533
|
+
# resp.s3_bucket #=> String
|
|
534
|
+
# resp.s3_key_prefix #=> String
|
|
535
|
+
# resp.s3_sse_algorithm #=> String, one of "AES256", "KMS"
|
|
536
|
+
# resp.s3_sse_kms_key_id #=> String
|
|
537
|
+
# resp.s3_bucket_owner #=> String
|
|
538
|
+
# resp.failure_code #=> String
|
|
539
|
+
# resp.failure_message #=> String
|
|
540
|
+
# resp.export_manifest #=> String
|
|
541
|
+
# resp.items_count #=> Integer
|
|
542
|
+
# resp.export_data_cutoff_time #=> Time
|
|
543
|
+
#
|
|
544
|
+
#
|
|
545
|
+
# The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
|
|
546
|
+
#
|
|
547
|
+
# * export_succeeded
|
|
548
|
+
#
|
|
549
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/simpledbv2-2025-09-26/GetExport AWS API Documentation
|
|
550
|
+
#
|
|
551
|
+
# @overload get_export(params = {})
|
|
552
|
+
# @param [Hash] params ({})
|
|
553
|
+
def get_export(params = {}, options = {})
|
|
554
|
+
req = build_request(:get_export, params)
|
|
555
|
+
req.send_request(options)
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
# Lists all exports that were created. The results are paginated and can
|
|
559
|
+
# be filtered by domain name.
|
|
560
|
+
#
|
|
561
|
+
# @option params [String] :domain_name
|
|
562
|
+
# The name of the domain to filter exports. If not provided, exports for
|
|
563
|
+
# all the domains will be listed.
|
|
564
|
+
#
|
|
565
|
+
# @option params [Integer] :max_results
|
|
566
|
+
# The maximum number of exports to return in a single response.
|
|
567
|
+
#
|
|
568
|
+
# @option params [String] :next_token
|
|
569
|
+
# A pagination token used to retrieve the next page of results. This
|
|
570
|
+
# token is obtained from the nextToken field in the previous
|
|
571
|
+
# ListExportsResponse. Leave empty for the first request.
|
|
572
|
+
#
|
|
573
|
+
# @return [Types::ListExportsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
574
|
+
#
|
|
575
|
+
# * {Types::ListExportsResponse#export_summaries #export_summaries} => Array<Types::ExportSummary>
|
|
576
|
+
# * {Types::ListExportsResponse#next_token #next_token} => String
|
|
577
|
+
#
|
|
578
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
|
579
|
+
#
|
|
580
|
+
#
|
|
581
|
+
# @example Example: List all exports
|
|
582
|
+
#
|
|
583
|
+
# resp = client.list_exports({
|
|
584
|
+
# })
|
|
585
|
+
#
|
|
586
|
+
# resp.to_h outputs the following:
|
|
587
|
+
# {
|
|
588
|
+
# export_summaries: [
|
|
589
|
+
# {
|
|
590
|
+
# domain_name: "my-domain",
|
|
591
|
+
# export_arn: "arn:aws:sdb:us-east-1:123456789012:export/abc123",
|
|
592
|
+
# export_status: "SUCCEEDED",
|
|
593
|
+
# requested_at: Time.parse(1234567890),
|
|
594
|
+
# },
|
|
595
|
+
# ],
|
|
596
|
+
# }
|
|
597
|
+
#
|
|
598
|
+
# @example Request syntax with placeholder values
|
|
599
|
+
#
|
|
600
|
+
# resp = client.list_exports({
|
|
601
|
+
# domain_name: "DomainName",
|
|
602
|
+
# max_results: 1,
|
|
603
|
+
# next_token: "NextToken",
|
|
604
|
+
# })
|
|
605
|
+
#
|
|
606
|
+
# @example Response structure
|
|
607
|
+
#
|
|
608
|
+
# resp.export_summaries #=> Array
|
|
609
|
+
# resp.export_summaries[0].export_arn #=> String
|
|
610
|
+
# resp.export_summaries[0].export_status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCEEDED", "FAILED"
|
|
611
|
+
# resp.export_summaries[0].requested_at #=> Time
|
|
612
|
+
# resp.export_summaries[0].domain_name #=> String
|
|
613
|
+
# resp.next_token #=> String
|
|
614
|
+
#
|
|
615
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/simpledbv2-2025-09-26/ListExports AWS API Documentation
|
|
616
|
+
#
|
|
617
|
+
# @overload list_exports(params = {})
|
|
618
|
+
# @param [Hash] params ({})
|
|
619
|
+
def list_exports(params = {}, options = {})
|
|
620
|
+
req = build_request(:list_exports, params)
|
|
621
|
+
req.send_request(options)
|
|
622
|
+
end
|
|
623
|
+
|
|
624
|
+
# Initiates the export of a SimpleDB domain to an S3 bucket.
|
|
625
|
+
#
|
|
626
|
+
# @option params [String] :client_token
|
|
627
|
+
# Providing a ClientToken makes the call to StartDomainExport API
|
|
628
|
+
# idempotent, meaning that multiple identical calls have the same effect
|
|
629
|
+
# as one single call. A client token is valid for 8 hours after the
|
|
630
|
+
# first request that uses it is completed. After 8 hours, any request
|
|
631
|
+
# with the same client token is treated as a new request. Do not
|
|
632
|
+
# resubmit the same request with the same client token for more than 8
|
|
633
|
+
# hours, or the result might not be idempotent. If you submit a request
|
|
634
|
+
# with the same client token but a change in other parameters within the
|
|
635
|
+
# 8-hour idempotency window, a ConflictException will be returned.
|
|
636
|
+
#
|
|
637
|
+
# **A suitable default value is auto-generated.** You should normally
|
|
638
|
+
# not need to pass this option.**
|
|
639
|
+
#
|
|
640
|
+
# @option params [required, String] :domain_name
|
|
641
|
+
# The name of the domain to export.
|
|
642
|
+
#
|
|
643
|
+
# @option params [required, String] :s3_bucket
|
|
644
|
+
# The name of the S3 bucket where the domain data will be exported.
|
|
645
|
+
#
|
|
646
|
+
# @option params [String] :s3_key_prefix
|
|
647
|
+
# The prefix string to be used to generate the S3 object keys for export
|
|
648
|
+
# artifacts.
|
|
649
|
+
#
|
|
650
|
+
# @option params [String] :s3_sse_algorithm
|
|
651
|
+
# The server-side encryption algorithm to use for the exported data in
|
|
652
|
+
# S3. Valid values are: AES256 (SSE-S3) and KMS (SSE-KMS). If not
|
|
653
|
+
# specified, bucket's default encryption will apply.
|
|
654
|
+
#
|
|
655
|
+
# @option params [String] :s3_sse_kms_key_id
|
|
656
|
+
# The KMS key ID to use for server-side encryption with AWS KMS-managed
|
|
657
|
+
# keys (SSE-KMS). This parameter is only expected with KMS as the S3 SSE
|
|
658
|
+
# algorithm.
|
|
659
|
+
#
|
|
660
|
+
# @option params [String] :s3_bucket_owner
|
|
661
|
+
# The ID of the AWS account that owns the bucket the export will be
|
|
662
|
+
# stored in.
|
|
663
|
+
#
|
|
664
|
+
# @return [Types::StartDomainExportResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
665
|
+
#
|
|
666
|
+
# * {Types::StartDomainExportResponse#client_token #client_token} => String
|
|
667
|
+
# * {Types::StartDomainExportResponse#export_arn #export_arn} => String
|
|
668
|
+
# * {Types::StartDomainExportResponse#requested_at #requested_at} => Time
|
|
669
|
+
#
|
|
670
|
+
#
|
|
671
|
+
# @example Example: Start a domain export
|
|
672
|
+
#
|
|
673
|
+
# resp = client.start_domain_export({
|
|
674
|
+
# domain_name: "my-domain",
|
|
675
|
+
# s3_bucket: "my-export-bucket",
|
|
676
|
+
# })
|
|
677
|
+
#
|
|
678
|
+
# resp.to_h outputs the following:
|
|
679
|
+
# {
|
|
680
|
+
# client_token: "abc123-def456-ghi789",
|
|
681
|
+
# export_arn: "arn:aws:sdb:us-east-1:123456789012:export/abc123",
|
|
682
|
+
# requested_at: Time.parse(1234567890),
|
|
683
|
+
# }
|
|
684
|
+
#
|
|
685
|
+
# @example Request syntax with placeholder values
|
|
686
|
+
#
|
|
687
|
+
# resp = client.start_domain_export({
|
|
688
|
+
# client_token: "IdempotencyToken",
|
|
689
|
+
# domain_name: "DomainName", # required
|
|
690
|
+
# s3_bucket: "S3BucketName", # required
|
|
691
|
+
# s3_key_prefix: "S3KeyPrefix",
|
|
692
|
+
# s3_sse_algorithm: "AES256", # accepts AES256, KMS
|
|
693
|
+
# s3_sse_kms_key_id: "S3SseKmsKeyId",
|
|
694
|
+
# s3_bucket_owner: "AwsAccountId",
|
|
695
|
+
# })
|
|
696
|
+
#
|
|
697
|
+
# @example Response structure
|
|
698
|
+
#
|
|
699
|
+
# resp.client_token #=> String
|
|
700
|
+
# resp.export_arn #=> String
|
|
701
|
+
# resp.requested_at #=> Time
|
|
702
|
+
#
|
|
703
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/simpledbv2-2025-09-26/StartDomainExport AWS API Documentation
|
|
704
|
+
#
|
|
705
|
+
# @overload start_domain_export(params = {})
|
|
706
|
+
# @param [Hash] params ({})
|
|
707
|
+
def start_domain_export(params = {}, options = {})
|
|
708
|
+
req = build_request(:start_domain_export, params)
|
|
709
|
+
req.send_request(options)
|
|
710
|
+
end
|
|
711
|
+
|
|
712
|
+
# @!endgroup
|
|
713
|
+
|
|
714
|
+
# @param params ({})
|
|
715
|
+
# @api private
|
|
716
|
+
def build_request(operation_name, params = {})
|
|
717
|
+
handlers = @handlers.for(operation_name)
|
|
718
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
|
719
|
+
Aws::Telemetry.module_to_tracer_name('Aws::SimpleDBv2')
|
|
720
|
+
)
|
|
721
|
+
context = Seahorse::Client::RequestContext.new(
|
|
722
|
+
operation_name: operation_name,
|
|
723
|
+
operation: config.api.operation(operation_name),
|
|
724
|
+
client: self,
|
|
725
|
+
params: params,
|
|
726
|
+
config: config,
|
|
727
|
+
tracer: tracer
|
|
728
|
+
)
|
|
729
|
+
context[:gem_name] = 'aws-sdk-simpledbv2'
|
|
730
|
+
context[:gem_version] = '1.0.0'
|
|
731
|
+
Seahorse::Client::Request.new(handlers, context)
|
|
732
|
+
end
|
|
733
|
+
|
|
734
|
+
# Polls an API operation until a resource enters a desired state.
|
|
735
|
+
#
|
|
736
|
+
# ## Basic Usage
|
|
737
|
+
#
|
|
738
|
+
# A waiter will call an API operation until:
|
|
739
|
+
#
|
|
740
|
+
# * It is successful
|
|
741
|
+
# * It enters a terminal state
|
|
742
|
+
# * It makes the maximum number of attempts
|
|
743
|
+
#
|
|
744
|
+
# In between attempts, the waiter will sleep.
|
|
745
|
+
#
|
|
746
|
+
# # polls in a loop, sleeping between attempts
|
|
747
|
+
# client.wait_until(waiter_name, params)
|
|
748
|
+
#
|
|
749
|
+
# ## Configuration
|
|
750
|
+
#
|
|
751
|
+
# You can configure the maximum number of polling attempts, and the
|
|
752
|
+
# delay (in seconds) between each polling attempt. You can pass
|
|
753
|
+
# configuration as the final arguments hash.
|
|
754
|
+
#
|
|
755
|
+
# # poll for ~25 seconds
|
|
756
|
+
# client.wait_until(waiter_name, params, {
|
|
757
|
+
# max_attempts: 5,
|
|
758
|
+
# delay: 5,
|
|
759
|
+
# })
|
|
760
|
+
#
|
|
761
|
+
# ## Callbacks
|
|
762
|
+
#
|
|
763
|
+
# You can be notified before each polling attempt and before each
|
|
764
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
|
765
|
+
# it will terminate the waiter.
|
|
766
|
+
#
|
|
767
|
+
# started_at = Time.now
|
|
768
|
+
# client.wait_until(waiter_name, params, {
|
|
769
|
+
#
|
|
770
|
+
# # disable max attempts
|
|
771
|
+
# max_attempts: nil,
|
|
772
|
+
#
|
|
773
|
+
# # poll for 1 hour, instead of a number of attempts
|
|
774
|
+
# before_wait: -> (attempts, response) do
|
|
775
|
+
# throw :failure if Time.now - started_at > 3600
|
|
776
|
+
# end
|
|
777
|
+
# })
|
|
778
|
+
#
|
|
779
|
+
# ## Handling Errors
|
|
780
|
+
#
|
|
781
|
+
# When a waiter is unsuccessful, it will raise an error.
|
|
782
|
+
# All of the failure errors extend from
|
|
783
|
+
# {Aws::Waiters::Errors::WaiterFailed}.
|
|
784
|
+
#
|
|
785
|
+
# begin
|
|
786
|
+
# client.wait_until(...)
|
|
787
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
|
788
|
+
# # resource did not enter the desired state in time
|
|
789
|
+
# end
|
|
790
|
+
#
|
|
791
|
+
# ## Valid Waiters
|
|
792
|
+
#
|
|
793
|
+
# The following table lists the valid waiter names, the operations they call,
|
|
794
|
+
# and the default `:delay` and `:max_attempts` values.
|
|
795
|
+
#
|
|
796
|
+
# | waiter_name | params | :delay | :max_attempts |
|
|
797
|
+
# | ---------------- | ------------------- | -------- | ------------- |
|
|
798
|
+
# | export_succeeded | {Client#get_export} | 30 | 5 |
|
|
799
|
+
#
|
|
800
|
+
# @raise [Errors::FailureStateError] Raised when the waiter terminates
|
|
801
|
+
# because the waiter has entered a state that it will not transition
|
|
802
|
+
# out of, preventing success.
|
|
803
|
+
#
|
|
804
|
+
# @raise [Errors::TooManyAttemptsError] Raised when the configured
|
|
805
|
+
# maximum number of attempts have been made, and the waiter is not
|
|
806
|
+
# yet successful.
|
|
807
|
+
#
|
|
808
|
+
# @raise [Errors::UnexpectedError] Raised when an error is encounted
|
|
809
|
+
# while polling for a resource that is not expected.
|
|
810
|
+
#
|
|
811
|
+
# @raise [Errors::NoSuchWaiterError] Raised when you request to wait
|
|
812
|
+
# for an unknown state.
|
|
813
|
+
#
|
|
814
|
+
# @return [Boolean] Returns `true` if the waiter was successful.
|
|
815
|
+
# @param [Symbol] waiter_name
|
|
816
|
+
# @param [Hash] params ({})
|
|
817
|
+
# @param [Hash] options ({})
|
|
818
|
+
# @option options [Integer] :max_attempts
|
|
819
|
+
# @option options [Integer] :delay
|
|
820
|
+
# @option options [Proc] :before_attempt
|
|
821
|
+
# @option options [Proc] :before_wait
|
|
822
|
+
def wait_until(waiter_name, params = {}, options = {})
|
|
823
|
+
w = waiter(waiter_name, options)
|
|
824
|
+
yield(w.waiter) if block_given? # deprecated
|
|
825
|
+
w.wait(params)
|
|
826
|
+
end
|
|
827
|
+
|
|
828
|
+
# @api private
|
|
829
|
+
# @deprecated
|
|
830
|
+
def waiter_names
|
|
831
|
+
waiters.keys
|
|
832
|
+
end
|
|
833
|
+
|
|
834
|
+
private
|
|
835
|
+
|
|
836
|
+
# @param [Symbol] waiter_name
|
|
837
|
+
# @param [Hash] options ({})
|
|
838
|
+
def waiter(waiter_name, options = {})
|
|
839
|
+
waiter_class = waiters[waiter_name]
|
|
840
|
+
if waiter_class
|
|
841
|
+
waiter_class.new(options.merge(client: self))
|
|
842
|
+
else
|
|
843
|
+
raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
|
|
844
|
+
end
|
|
845
|
+
end
|
|
846
|
+
|
|
847
|
+
def waiters
|
|
848
|
+
{
|
|
849
|
+
export_succeeded: Waiters::ExportSucceeded
|
|
850
|
+
}
|
|
851
|
+
end
|
|
852
|
+
|
|
853
|
+
class << self
|
|
854
|
+
|
|
855
|
+
# @api private
|
|
856
|
+
attr_reader :identifier
|
|
857
|
+
|
|
858
|
+
# @api private
|
|
859
|
+
def errors_module
|
|
860
|
+
Errors
|
|
861
|
+
end
|
|
862
|
+
|
|
863
|
+
end
|
|
864
|
+
end
|
|
865
|
+
end
|