aws-sdk-dynamodb 1.44.0 → 1.45.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 +4 -4
- data/lib/aws-sdk-dynamodb.rb +7 -4
- data/lib/aws-sdk-dynamodb/client.rb +58 -8
- data/lib/aws-sdk-dynamodb/errors.rb +47 -25
- data/lib/aws-sdk-dynamodb/resource.rb +7 -0
- data/lib/aws-sdk-dynamodb/table.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7ab1b7eb6c5743bf574f6f54f95c9efdf042da4
|
4
|
+
data.tar.gz: 0e101caf9a248990e4ddfa52c3ca8b073847ff9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbcfaf39a1e03666bde252e223f55f831c99c713f9b2ea3d201e3097a1e9c84f77e1e6f20df3e86c463d6731fff669881aa278f2f54988a8d2e6d5393c43682a
|
7
|
+
data.tar.gz: a384bbc0749ed6381e6893c3392b4ab6eb79726a992c8b85e46ce7ea232385d960cddd59641df1c2178b8b7c270cb76da4def58d5464f333f97ce42ffb2b0301
|
data/lib/aws-sdk-dynamodb.rb
CHANGED
@@ -26,17 +26,20 @@ require_relative 'aws-sdk-dynamodb/customizations'
|
|
26
26
|
# methods each accept a hash of request parameters and return a response
|
27
27
|
# structure.
|
28
28
|
#
|
29
|
+
# dynamo_db = Aws::DynamoDB::Client.new
|
30
|
+
# resp = dynamo_db.batch_get_item(params)
|
31
|
+
#
|
29
32
|
# See {Client} for more information.
|
30
33
|
#
|
31
34
|
# # Errors
|
32
35
|
#
|
33
|
-
# Errors returned from Amazon DynamoDB
|
34
|
-
# extend {Errors::ServiceError}.
|
36
|
+
# Errors returned from Amazon DynamoDB are defined in the
|
37
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
35
38
|
#
|
36
39
|
# begin
|
37
40
|
# # do stuff
|
38
41
|
# rescue Aws::DynamoDB::Errors::ServiceError
|
39
|
-
# # rescues all
|
42
|
+
# # rescues all Amazon DynamoDB API errors
|
40
43
|
# end
|
41
44
|
#
|
42
45
|
# See {Errors} for more information.
|
@@ -44,6 +47,6 @@ require_relative 'aws-sdk-dynamodb/customizations'
|
|
44
47
|
# @service
|
45
48
|
module Aws::DynamoDB
|
46
49
|
|
47
|
-
GEM_VERSION = '1.
|
50
|
+
GEM_VERSION = '1.45.0'
|
48
51
|
|
49
52
|
end
|
@@ -33,6 +33,18 @@ require 'aws-sdk-dynamodb/plugins/crc32_validation.rb'
|
|
33
33
|
Aws::Plugins::GlobalConfiguration.add_identifier(:dynamodb)
|
34
34
|
|
35
35
|
module Aws::DynamoDB
|
36
|
+
# An API client for DynamoDB. To construct a client, you need to configure a `:region` and `:credentials`.
|
37
|
+
#
|
38
|
+
# client = Aws::DynamoDB::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.
|
36
48
|
class Client < Seahorse::Client::Base
|
37
49
|
|
38
50
|
include Aws::ClientStubs
|
@@ -114,6 +126,12 @@ module Aws::DynamoDB
|
|
114
126
|
# When set to `true`, a thread polling for endpoints will be running in
|
115
127
|
# the background every 60 secs (default). Defaults to `false`.
|
116
128
|
#
|
129
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
130
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
131
|
+
# until there is sufficent client side capacity to retry the request.
|
132
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
133
|
+
# not retry instead of sleeping.
|
134
|
+
#
|
117
135
|
# @option options [Boolean] :client_side_monitoring (false)
|
118
136
|
# When `true`, client-side metrics will be collected for all API requests from
|
119
137
|
# this client.
|
@@ -144,6 +162,10 @@ module Aws::DynamoDB
|
|
144
162
|
# When `true`, an attempt is made to coerce request parameters into
|
145
163
|
# the required types.
|
146
164
|
#
|
165
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
166
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
167
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
168
|
+
#
|
147
169
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
148
170
|
# Set to true to disable SDK automatically adding host prefix
|
149
171
|
# to default service endpoint when available.
|
@@ -178,15 +200,29 @@ module Aws::DynamoDB
|
|
178
200
|
# The Logger instance to send log messages to. If this option
|
179
201
|
# is not set, logging will be disabled.
|
180
202
|
#
|
203
|
+
# @option options [Integer] :max_attempts (3)
|
204
|
+
# An integer representing the maximum number attempts that will be made for
|
205
|
+
# a single request, including the initial attempt. For example,
|
206
|
+
# setting this value to 5 will result in a request being retried up to
|
207
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
208
|
+
#
|
181
209
|
# @option options [String] :profile ("default")
|
182
210
|
# Used when loading credentials from the shared credentials file
|
183
211
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
184
212
|
#
|
213
|
+
# @option options [Proc] :retry_backoff
|
214
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
215
|
+
# This option is only used in the `legacy` retry mode.
|
216
|
+
#
|
185
217
|
# @option options [Float] :retry_base_delay (0.3)
|
186
|
-
# The base delay in seconds used by the default backoff function.
|
218
|
+
# The base delay in seconds used by the default backoff function. This option
|
219
|
+
# is only used in the `legacy` retry mode.
|
187
220
|
#
|
188
221
|
# @option options [Symbol] :retry_jitter (:none)
|
189
|
-
# A delay randomiser function used by the default backoff function.
|
222
|
+
# A delay randomiser function used by the default backoff function.
|
223
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
224
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
225
|
+
# in the `legacy` retry mode.
|
190
226
|
#
|
191
227
|
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
192
228
|
#
|
@@ -198,7 +234,21 @@ module Aws::DynamoDB
|
|
198
234
|
# errors from expired credentials.
|
199
235
|
#
|
200
236
|
# @option options [Integer] :retry_max_delay (0)
|
201
|
-
# The maximum number of seconds to delay between retries (0 for no limit)
|
237
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
238
|
+
# used by the default backoff function. This option is only used in the
|
239
|
+
# `legacy` retry mode.
|
240
|
+
#
|
241
|
+
# @option options [String] :retry_mode ("legacy")
|
242
|
+
# Specifies which retry algorithm to use. Values are:
|
243
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
244
|
+
# no retry mode is provided.
|
245
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
246
|
+
# This includes support for retry quotas, which limit the number of
|
247
|
+
# unsuccessful retries a client can make.
|
248
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
249
|
+
# functionality of `standard` mode along with automatic client side
|
250
|
+
# throttling. This is a provisional mode that may change behavior
|
251
|
+
# in the future.
|
202
252
|
#
|
203
253
|
# @option options [String] :secret_access_key
|
204
254
|
#
|
@@ -239,16 +289,16 @@ module Aws::DynamoDB
|
|
239
289
|
# requests through. Formatted like 'http://proxy.com:123'.
|
240
290
|
#
|
241
291
|
# @option options [Float] :http_open_timeout (15) The number of
|
242
|
-
# seconds to wait when opening a HTTP session before
|
292
|
+
# seconds to wait when opening a HTTP session before raising a
|
243
293
|
# `Timeout::Error`.
|
244
294
|
#
|
245
295
|
# @option options [Integer] :http_read_timeout (60) The default
|
246
296
|
# number of seconds to wait for response data. This value can
|
247
297
|
# safely be set
|
248
|
-
# per-request on the session
|
298
|
+
# per-request on the session yielded by {#session_for}.
|
249
299
|
#
|
250
300
|
# @option options [Float] :http_idle_timeout (5) The number of
|
251
|
-
# seconds a connection is allowed to sit
|
301
|
+
# seconds a connection is allowed to sit idle before it is
|
252
302
|
# considered stale. Stale connections are closed and removed
|
253
303
|
# from the pool before making a request.
|
254
304
|
#
|
@@ -257,7 +307,7 @@ module Aws::DynamoDB
|
|
257
307
|
# request body. This option has no effect unless the request has
|
258
308
|
# "Expect" header set to "100-continue". Defaults to `nil` which
|
259
309
|
# disables this behaviour. This value can safely be set per
|
260
|
-
# request on the session
|
310
|
+
# request on the session yielded by {#session_for}.
|
261
311
|
#
|
262
312
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
263
313
|
# HTTP debug output will be sent to the `:logger`.
|
@@ -6561,7 +6611,7 @@ module Aws::DynamoDB
|
|
6561
6611
|
params: params,
|
6562
6612
|
config: config)
|
6563
6613
|
context[:gem_name] = 'aws-sdk-dynamodb'
|
6564
|
-
context[:gem_version] = '1.
|
6614
|
+
context[:gem_version] = '1.45.0'
|
6565
6615
|
Seahorse::Client::Request.new(handlers, context)
|
6566
6616
|
end
|
6567
6617
|
|
@@ -6,6 +6,53 @@
|
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
8
|
module Aws::DynamoDB
|
9
|
+
|
10
|
+
# When DynamoDB returns an error response, the Ruby SDK constructs and raises an error.
|
11
|
+
# These errors all extend Aws::DynamoDB::Errors::ServiceError < {Aws::Errors::ServiceError}
|
12
|
+
#
|
13
|
+
# You can rescue all DynamoDB errors using ServiceError:
|
14
|
+
#
|
15
|
+
# begin
|
16
|
+
# # do stuff
|
17
|
+
# rescue Aws::DynamoDB::Errors::ServiceError
|
18
|
+
# # rescues all DynamoDB API errors
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
#
|
22
|
+
# ## Request Context
|
23
|
+
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
|
24
|
+
# information about the request that generated the error.
|
25
|
+
# See {Seahorse::Client::RequestContext} for more information.
|
26
|
+
#
|
27
|
+
# ## Error Classes
|
28
|
+
# * {BackupInUseException}
|
29
|
+
# * {BackupNotFoundException}
|
30
|
+
# * {ConditionalCheckFailedException}
|
31
|
+
# * {ContinuousBackupsUnavailableException}
|
32
|
+
# * {GlobalTableAlreadyExistsException}
|
33
|
+
# * {GlobalTableNotFoundException}
|
34
|
+
# * {IdempotentParameterMismatchException}
|
35
|
+
# * {IndexNotFoundException}
|
36
|
+
# * {InternalServerError}
|
37
|
+
# * {InvalidRestoreTimeException}
|
38
|
+
# * {ItemCollectionSizeLimitExceededException}
|
39
|
+
# * {LimitExceededException}
|
40
|
+
# * {PointInTimeRecoveryUnavailableException}
|
41
|
+
# * {ProvisionedThroughputExceededException}
|
42
|
+
# * {ReplicaAlreadyExistsException}
|
43
|
+
# * {ReplicaNotFoundException}
|
44
|
+
# * {RequestLimitExceeded}
|
45
|
+
# * {ResourceInUseException}
|
46
|
+
# * {ResourceNotFoundException}
|
47
|
+
# * {TableAlreadyExistsException}
|
48
|
+
# * {TableInUseException}
|
49
|
+
# * {TableNotFoundException}
|
50
|
+
# * {TransactionCanceledException}
|
51
|
+
# * {TransactionConflictException}
|
52
|
+
# * {TransactionInProgressException}
|
53
|
+
#
|
54
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
55
|
+
# if they are not defined above.
|
9
56
|
module Errors
|
10
57
|
|
11
58
|
extend Aws::Errors::DynamicErrors
|
@@ -23,7 +70,6 @@ module Aws::DynamoDB
|
|
23
70
|
def message
|
24
71
|
@message || @data[:message]
|
25
72
|
end
|
26
|
-
|
27
73
|
end
|
28
74
|
|
29
75
|
class BackupNotFoundException < ServiceError
|
@@ -39,7 +85,6 @@ module Aws::DynamoDB
|
|
39
85
|
def message
|
40
86
|
@message || @data[:message]
|
41
87
|
end
|
42
|
-
|
43
88
|
end
|
44
89
|
|
45
90
|
class ConditionalCheckFailedException < ServiceError
|
@@ -55,7 +100,6 @@ module Aws::DynamoDB
|
|
55
100
|
def message
|
56
101
|
@message || @data[:message]
|
57
102
|
end
|
58
|
-
|
59
103
|
end
|
60
104
|
|
61
105
|
class ContinuousBackupsUnavailableException < ServiceError
|
@@ -71,7 +115,6 @@ module Aws::DynamoDB
|
|
71
115
|
def message
|
72
116
|
@message || @data[:message]
|
73
117
|
end
|
74
|
-
|
75
118
|
end
|
76
119
|
|
77
120
|
class GlobalTableAlreadyExistsException < ServiceError
|
@@ -87,7 +130,6 @@ module Aws::DynamoDB
|
|
87
130
|
def message
|
88
131
|
@message || @data[:message]
|
89
132
|
end
|
90
|
-
|
91
133
|
end
|
92
134
|
|
93
135
|
class GlobalTableNotFoundException < ServiceError
|
@@ -103,7 +145,6 @@ module Aws::DynamoDB
|
|
103
145
|
def message
|
104
146
|
@message || @data[:message]
|
105
147
|
end
|
106
|
-
|
107
148
|
end
|
108
149
|
|
109
150
|
class IdempotentParameterMismatchException < ServiceError
|
@@ -119,7 +160,6 @@ module Aws::DynamoDB
|
|
119
160
|
def message
|
120
161
|
@message || @data[:message]
|
121
162
|
end
|
122
|
-
|
123
163
|
end
|
124
164
|
|
125
165
|
class IndexNotFoundException < ServiceError
|
@@ -135,7 +175,6 @@ module Aws::DynamoDB
|
|
135
175
|
def message
|
136
176
|
@message || @data[:message]
|
137
177
|
end
|
138
|
-
|
139
178
|
end
|
140
179
|
|
141
180
|
class InternalServerError < ServiceError
|
@@ -151,7 +190,6 @@ module Aws::DynamoDB
|
|
151
190
|
def message
|
152
191
|
@message || @data[:message]
|
153
192
|
end
|
154
|
-
|
155
193
|
end
|
156
194
|
|
157
195
|
class InvalidRestoreTimeException < ServiceError
|
@@ -167,7 +205,6 @@ module Aws::DynamoDB
|
|
167
205
|
def message
|
168
206
|
@message || @data[:message]
|
169
207
|
end
|
170
|
-
|
171
208
|
end
|
172
209
|
|
173
210
|
class ItemCollectionSizeLimitExceededException < ServiceError
|
@@ -183,7 +220,6 @@ module Aws::DynamoDB
|
|
183
220
|
def message
|
184
221
|
@message || @data[:message]
|
185
222
|
end
|
186
|
-
|
187
223
|
end
|
188
224
|
|
189
225
|
class LimitExceededException < ServiceError
|
@@ -199,7 +235,6 @@ module Aws::DynamoDB
|
|
199
235
|
def message
|
200
236
|
@message || @data[:message]
|
201
237
|
end
|
202
|
-
|
203
238
|
end
|
204
239
|
|
205
240
|
class PointInTimeRecoveryUnavailableException < ServiceError
|
@@ -215,7 +250,6 @@ module Aws::DynamoDB
|
|
215
250
|
def message
|
216
251
|
@message || @data[:message]
|
217
252
|
end
|
218
|
-
|
219
253
|
end
|
220
254
|
|
221
255
|
class ProvisionedThroughputExceededException < ServiceError
|
@@ -231,7 +265,6 @@ module Aws::DynamoDB
|
|
231
265
|
def message
|
232
266
|
@message || @data[:message]
|
233
267
|
end
|
234
|
-
|
235
268
|
end
|
236
269
|
|
237
270
|
class ReplicaAlreadyExistsException < ServiceError
|
@@ -247,7 +280,6 @@ module Aws::DynamoDB
|
|
247
280
|
def message
|
248
281
|
@message || @data[:message]
|
249
282
|
end
|
250
|
-
|
251
283
|
end
|
252
284
|
|
253
285
|
class ReplicaNotFoundException < ServiceError
|
@@ -263,7 +295,6 @@ module Aws::DynamoDB
|
|
263
295
|
def message
|
264
296
|
@message || @data[:message]
|
265
297
|
end
|
266
|
-
|
267
298
|
end
|
268
299
|
|
269
300
|
class RequestLimitExceeded < ServiceError
|
@@ -279,7 +310,6 @@ module Aws::DynamoDB
|
|
279
310
|
def message
|
280
311
|
@message || @data[:message]
|
281
312
|
end
|
282
|
-
|
283
313
|
end
|
284
314
|
|
285
315
|
class ResourceInUseException < ServiceError
|
@@ -295,7 +325,6 @@ module Aws::DynamoDB
|
|
295
325
|
def message
|
296
326
|
@message || @data[:message]
|
297
327
|
end
|
298
|
-
|
299
328
|
end
|
300
329
|
|
301
330
|
class ResourceNotFoundException < ServiceError
|
@@ -311,7 +340,6 @@ module Aws::DynamoDB
|
|
311
340
|
def message
|
312
341
|
@message || @data[:message]
|
313
342
|
end
|
314
|
-
|
315
343
|
end
|
316
344
|
|
317
345
|
class TableAlreadyExistsException < ServiceError
|
@@ -327,7 +355,6 @@ module Aws::DynamoDB
|
|
327
355
|
def message
|
328
356
|
@message || @data[:message]
|
329
357
|
end
|
330
|
-
|
331
358
|
end
|
332
359
|
|
333
360
|
class TableInUseException < ServiceError
|
@@ -343,7 +370,6 @@ module Aws::DynamoDB
|
|
343
370
|
def message
|
344
371
|
@message || @data[:message]
|
345
372
|
end
|
346
|
-
|
347
373
|
end
|
348
374
|
|
349
375
|
class TableNotFoundException < ServiceError
|
@@ -359,7 +385,6 @@ module Aws::DynamoDB
|
|
359
385
|
def message
|
360
386
|
@message || @data[:message]
|
361
387
|
end
|
362
|
-
|
363
388
|
end
|
364
389
|
|
365
390
|
class TransactionCanceledException < ServiceError
|
@@ -380,7 +405,6 @@ module Aws::DynamoDB
|
|
380
405
|
def cancellation_reasons
|
381
406
|
@data[:cancellation_reasons]
|
382
407
|
end
|
383
|
-
|
384
408
|
end
|
385
409
|
|
386
410
|
class TransactionConflictException < ServiceError
|
@@ -396,7 +420,6 @@ module Aws::DynamoDB
|
|
396
420
|
def message
|
397
421
|
@message || @data[:message]
|
398
422
|
end
|
399
|
-
|
400
423
|
end
|
401
424
|
|
402
425
|
class TransactionInProgressException < ServiceError
|
@@ -412,7 +435,6 @@ module Aws::DynamoDB
|
|
412
435
|
def message
|
413
436
|
@message || @data[:message]
|
414
437
|
end
|
415
|
-
|
416
438
|
end
|
417
439
|
|
418
440
|
end
|
@@ -6,6 +6,13 @@
|
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
8
|
module Aws::DynamoDB
|
9
|
+
# This class provides a resource oriented interface for DynamoDB.
|
10
|
+
# To create a resource object:
|
11
|
+
# resource = Aws::DynamoDB::Resource.new(region: 'us-west-2')
|
12
|
+
# You can supply a client object with custom configuration that will be used for all resource operations.
|
13
|
+
# If you do not pass +:client+, a default client will be constructed.
|
14
|
+
# client = Aws::DynamoDB::Client.new(region: 'us-west-2')
|
15
|
+
# resource = Aws::DynamoDB::Resource.new(client: client)
|
9
16
|
class Resource
|
10
17
|
|
11
18
|
# @param options ({})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-dynamodb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.45.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|