aws-sdk-dynamodb 1.134.0 → 1.136.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d36160f6acf115ec55724591b185d9b6127f36867948c6797e69dc476799535
4
- data.tar.gz: 434fdb75008e87c49b68063e47fee19b41ff14bad1cd5991ee3050e41868cdab
3
+ metadata.gz: 996ac4d5e7d98fbcdb9aae0a71cc6c05bd3be295a92474ea4327a09e04f968e8
4
+ data.tar.gz: ff07d63bfc47f61145108c407e716b77eaa1be90249a1fcc9cda3f65bfaa5c8e
5
5
  SHA512:
6
- metadata.gz: dd11f850b04ebd3cc249d8a118ffbdf0c2a1e742ebf67e6fb6409f9779515aca5f02afb8d5f6d2768dba11522f2f15574c97c3bf03733bc2f7d835332946005e
7
- data.tar.gz: b935ab00066836ba8b1a38112a51e482a59fbb2e2e91fe4de031b9c941f5ec3874eafebbecebab404ef63e3cc8e538edb7b89a5bbf6db6e301ae7b99b2610514
6
+ metadata.gz: 2f5f8a9874d15bc96e9b848c61814d899e948bfeab118d17768d01b08009cfff352d3defd994c9f316376644ca4efae53b8fbdfa92fea42ac81c09c4dca5f88d
7
+ data.tar.gz: 4594247893b4f745e885e74c5e1ba1c74f9e70cc9c2a7b77fda871d65592cd103192197901d4ab00f2301d9520ebf15298f8da779cd782cf3a53ff5d81f6aacf
data/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.136.0 (2025-02-06)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.135.0 (2025-01-30)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
14
+ * Issue - Allow other retry configs to influence DynamoDB extended retries.
15
+
4
16
  1.134.0 (2025-01-15)
5
17
  ------------------
6
18
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.134.0
1
+ 1.136.0
@@ -301,7 +301,7 @@ module Aws::DynamoDB
301
301
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
302
302
  # This option is only used in the `legacy` retry mode.
303
303
  #
304
- # @option options [Float] :retry_base_delay (0.3)
304
+ # @option options [Float] :retry_base_delay (0.05)
305
305
  # The base delay in seconds used by the default backoff function. This option
306
306
  # is only used in the `legacy` retry mode.
307
307
  #
@@ -317,8 +317,9 @@ module Aws::DynamoDB
317
317
  # The maximum number of times to retry failed requests. Only
318
318
  # ~ 500 level server errors and certain ~ 400 level client errors
319
319
  # are retried. Generally, these are throttling errors, data
320
- # checksum errors, networking errors, timeout errors and auth
321
- # errors from expired credentials.
320
+ # checksum errors, networking errors, timeout errors, auth errors,
321
+ # endpoint discovery, and errors from expired credentials.
322
+ # This option is only used in the `legacy` retry mode.
322
323
  #
323
324
  # @option options [Integer] :retry_max_delay (0)
324
325
  # The maximum number of seconds to delay between retries (0 for no limit)
@@ -8625,7 +8626,7 @@ module Aws::DynamoDB
8625
8626
  tracer: tracer
8626
8627
  )
8627
8628
  context[:gem_name] = 'aws-sdk-dynamodb'
8628
- context[:gem_version] = '1.134.0'
8629
+ context[:gem_version] = '1.136.0'
8629
8630
  Seahorse::Client::Request.new(handlers, context)
8630
8631
  end
8631
8632
 
@@ -10,78 +10,72 @@
10
10
  module Aws::DynamoDB
11
11
  class EndpointProvider
12
12
  def resolve_endpoint(parameters)
13
- region = parameters.region
14
- use_dual_stack = parameters.use_dual_stack
15
- use_fips = parameters.use_fips
16
- endpoint = parameters.endpoint
17
- account_id = parameters.account_id
18
- account_id_endpoint_mode = parameters.account_id_endpoint_mode
19
- if Aws::Endpoints::Matchers.set?(endpoint)
20
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
13
+ if Aws::Endpoints::Matchers.set?(parameters.endpoint)
14
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
21
15
  raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
22
16
  end
23
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
17
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
24
18
  raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
25
19
  end
26
- return Aws::Endpoints::Endpoint.new(url: "#{endpoint}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
20
+ return Aws::Endpoints::Endpoint.new(url: "#{parameters.endpoint}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
27
21
  end
28
- if Aws::Endpoints::Matchers.set?(region)
29
- if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
30
- if Aws::Endpoints::Matchers.string_equals?(region, "local")
31
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
22
+ if Aws::Endpoints::Matchers.set?(parameters.region)
23
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
24
+ if Aws::Endpoints::Matchers.string_equals?(parameters.region, "local")
25
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
32
26
  raise ArgumentError, "Invalid Configuration: FIPS and local endpoint are not supported"
33
27
  end
34
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
28
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
35
29
  raise ArgumentError, "Invalid Configuration: Dualstack and local endpoint are not supported"
36
30
  end
37
31
  return Aws::Endpoints::Endpoint.new(url: "http://localhost:8000", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"dynamodb", "signingRegion"=>"us-east-1"}]}, metadata: { account_id_endpoint: false })
38
32
  end
39
- if Aws::Endpoints::Matchers.set?(account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(account_id_endpoint_mode, "required") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(account_id))
33
+ if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "required") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(parameters.account_id))
40
34
  raise ArgumentError, "AccountIdEndpointMode is required but no AccountID was provided or able to be loaded."
41
35
  end
42
- if Aws::Endpoints::Matchers.set?(account_id) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.valid_host_label?(account_id, false))
36
+ if Aws::Endpoints::Matchers.set?(parameters.account_id) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.valid_host_label?(parameters.account_id, false))
43
37
  raise ArgumentError, "Credentials-sourced account ID parameter is invalid"
44
38
  end
45
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
39
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
46
40
  if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true) && Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"), true)
47
- if Aws::Endpoints::Matchers.set?(account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(account_id_endpoint_mode, "disabled")
48
- return Aws::Endpoints::Endpoint.new(url: "https://dynamodb-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
41
+ if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")
42
+ return Aws::Endpoints::Endpoint.new(url: "https://dynamodb-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
49
43
  end
50
- return Aws::Endpoints::Endpoint.new(url: "https://dynamodb-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
44
+ return Aws::Endpoints::Endpoint.new(url: "https://dynamodb-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
51
45
  end
52
46
  raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
53
47
  end
54
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
48
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
55
49
  if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
56
50
  if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
57
- if Aws::Endpoints::Matchers.set?(account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(account_id_endpoint_mode, "disabled")
58
- return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
51
+ if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")
52
+ return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
59
53
  end
60
- return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
54
+ return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
61
55
  end
62
- if Aws::Endpoints::Matchers.set?(account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(account_id_endpoint_mode, "disabled")
63
- return Aws::Endpoints::Endpoint.new(url: "https://dynamodb-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
56
+ if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")
57
+ return Aws::Endpoints::Endpoint.new(url: "https://dynamodb-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
64
58
  end
65
- return Aws::Endpoints::Endpoint.new(url: "https://dynamodb-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
59
+ return Aws::Endpoints::Endpoint.new(url: "https://dynamodb-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
66
60
  end
67
61
  raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
68
62
  end
69
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
63
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
70
64
  if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"), true)
71
- if Aws::Endpoints::Matchers.set?(account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(account_id_endpoint_mode, "disabled")
72
- return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
65
+ if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")
66
+ return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
73
67
  end
74
- return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
68
+ return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
75
69
  end
76
70
  raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
77
71
  end
78
- if Aws::Endpoints::Matchers.set?(account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(account_id_endpoint_mode, "disabled")
79
- return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
72
+ if Aws::Endpoints::Matchers.set?(parameters.account_id_endpoint_mode) && Aws::Endpoints::Matchers.string_equals?(parameters.account_id_endpoint_mode, "disabled")
73
+ return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
80
74
  end
81
- if Aws::Endpoints::Matchers.set?(account_id) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true))
82
- return Aws::Endpoints::Endpoint.new(url: "https://#{account_id}.ddb.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: true })
75
+ if Aws::Endpoints::Matchers.set?(parameters.account_id) && Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true))
76
+ return Aws::Endpoints::Endpoint.new(url: "https://#{parameters.account_id}.ddb.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: true })
83
77
  end
84
- return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
78
+ return Aws::Endpoints::Endpoint.new(url: "https://dynamodb.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {}, metadata: { account_id_endpoint: false })
85
79
  end
86
80
  end
87
81
  raise ArgumentError, "Invalid Configuration: Missing Region"
@@ -4,25 +4,49 @@ module Aws
4
4
  module DynamoDB
5
5
  module Plugins
6
6
  class ExtendedRetries < Seahorse::Client::Plugin
7
+ DEFAULT_BACKOFF = lambda do |c|
8
+ return unless c.retries > 1
7
9
 
8
- option(:retry_limit,
10
+ delay = 2**(c.retries - 1) * c.config.retry_base_delay
11
+ if (c.config.retry_max_delay || 0) > 0
12
+ delay = [delay, c.config.retry_max_delay].min
13
+ end
14
+ jitter = c.config.retry_jitter
15
+ jitter = Aws::Plugins::RetryErrors::JITTERS[jitter] if jitter.is_a?(Symbol)
16
+ delay = jitter.call(delay) if jitter
17
+ Kernel.sleep(delay)
18
+ end
19
+
20
+ option(
21
+ :retry_limit,
9
22
  default: 10,
10
- required: false,
11
23
  doc_type: Integer,
12
24
  docstring: <<-DOCS)
13
25
  The maximum number of times to retry failed requests. Only
14
26
  ~ 500 level server errors and certain ~ 400 level client errors
15
27
  are retried. Generally, these are throttling errors, data
16
- checksum errors, networking errors, timeout errors and auth
17
- errors from expired credentials.
18
- DOCS
28
+ checksum errors, networking errors, timeout errors, auth errors,
29
+ endpoint discovery, and errors from expired credentials.
30
+ This option is only used in the `legacy` retry mode.
31
+ DOCS
19
32
 
20
- option(:retry_backoff, default: lambda { |context|
21
- if context.retries > 1
22
- Kernel.sleep(50 * (2 ** (context.retries - 1)) / 1000.0)
23
- end
24
- })
33
+ option(
34
+ :retry_base_delay,
35
+ default: 0.05,
36
+ doc_type: Float,
37
+ docstring: <<-DOCS)
38
+ The base delay in seconds used by the default backoff function. This option
39
+ is only used in the `legacy` retry mode.
40
+ DOCS
25
41
 
42
+ option(
43
+ :retry_backoff,
44
+ default: DEFAULT_BACKOFF,
45
+ doc_type: Proc,
46
+ docstring: <<-DOCS)
47
+ A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
48
+ This option is only used in the `legacy` retry mode.
49
+ DOCS
26
50
  end
27
51
  end
28
52
  end
@@ -56,7 +56,7 @@ module Aws::DynamoDB
56
56
  autoload :Endpoints, 'aws-sdk-dynamodb/endpoints'
57
57
  autoload :Table, 'aws-sdk-dynamodb/table'
58
58
 
59
- GEM_VERSION = '1.134.0'
59
+ GEM_VERSION = '1.136.0'
60
60
 
61
61
  end
62
62
 
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.134.0
4
+ version: 1.136.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: 2025-01-15 00:00:00.000000000 Z
11
+ date: 2025-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core