aws-sdk-core 3.197.2 → 3.199.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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -4
  5. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  6. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  7. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  8. data/lib/aws-sdk-core/cbor/cbor_engine.rb +19 -0
  9. data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
  10. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  11. data/lib/aws-sdk-core/cbor.rb +106 -0
  12. data/lib/aws-sdk-core/client_stubs.rb +3 -2
  13. data/lib/aws-sdk-core/error_handler.rb +41 -0
  14. data/lib/aws-sdk-core/json/error_handler.rb +6 -8
  15. data/lib/aws-sdk-core/json/handler.rb +5 -6
  16. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  17. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  18. data/lib/aws-sdk-core/json/parser.rb +2 -0
  19. data/lib/aws-sdk-core/json.rb +43 -14
  20. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  21. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  22. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  23. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  24. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  25. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +4 -3
  26. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +5 -1
  27. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  28. data/lib/aws-sdk-core/plugins/retry_errors.rb +0 -1
  29. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  30. data/lib/aws-sdk-core/query/handler.rb +4 -4
  31. data/lib/aws-sdk-core/query.rb +2 -1
  32. data/lib/aws-sdk-core/rest/{request/content_type.rb → content_type_handler.rb} +1 -1
  33. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  34. data/lib/aws-sdk-core/rest.rb +1 -1
  35. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  36. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +45 -0
  37. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +84 -0
  38. data/lib/aws-sdk-core/rpc_v2/handler.rb +74 -0
  39. data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
  40. data/lib/aws-sdk-core/rpc_v2.rb +6 -0
  41. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +41 -0
  42. data/lib/aws-sdk-core/xml/error_handler.rb +11 -37
  43. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  44. data/lib/aws-sdk-core.rb +6 -2
  45. data/lib/aws-sdk-sso/client.rb +6 -3
  46. data/lib/aws-sdk-sso.rb +1 -1
  47. data/lib/aws-sdk-ssooidc/client.rb +6 -3
  48. data/lib/aws-sdk-ssooidc.rb +1 -1
  49. data/lib/aws-sdk-sts/client.rb +6 -3
  50. data/lib/aws-sdk-sts.rb +1 -1
  51. data/lib/seahorse/client/base.rb +17 -7
  52. data/lib/seahorse/client/handler.rb +1 -1
  53. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  54. metadata +22 -8
  55. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  56. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  57. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  58. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  59. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -91,6 +91,11 @@ module Aws::STS
91
91
 
92
92
  # @overload initialize(options)
93
93
  # @param [Hash] options
94
+ #
95
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
96
+ # A list of plugins to apply to the client. Each plugin is either a
97
+ # class name or an instance of a plugin class.
98
+ #
94
99
  # @option options [required, Aws::CredentialProvider] :credentials
95
100
  # Your AWS credentials. This can be an instance of any one of the
96
101
  # following classes:
@@ -211,7 +216,6 @@ module Aws::STS
211
216
  # 'https://example.com'
212
217
  # 'http://example.com:123'
213
218
  #
214
- #
215
219
  # @option options [Integer] :endpoint_cache_max_entries (1000)
216
220
  # Used for the maximum size limit of the LRU cache storing endpoints data
217
221
  # for endpoint discovery enabled operations. Defaults to 1000.
@@ -300,7 +304,6 @@ module Aws::STS
300
304
  # throttling. This is a provisional mode that may change behavior
301
305
  # in the future.
302
306
  #
303
- #
304
307
  # @option options [String] :sdk_ua_app_id
305
308
  # A unique and opaque application ID that is appended to the
306
309
  # User-Agent header as app/sdk_ua_app_id. It should have a
@@ -2377,7 +2380,7 @@ module Aws::STS
2377
2380
  params: params,
2378
2381
  config: config)
2379
2382
  context[:gem_name] = 'aws-sdk-core'
2380
- context[:gem_version] = '3.197.2'
2383
+ context[:gem_version] = '3.199.0'
2381
2384
  Seahorse::Client::Request.new(handlers, context)
2382
2385
  end
2383
2386
 
data/lib/aws-sdk-sts.rb CHANGED
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-sts/customizations'
54
54
  # @!group service
55
55
  module Aws::STS
56
56
 
57
- GEM_VERSION = '3.197.2'
57
+ GEM_VERSION = '3.199.0'
58
58
 
59
59
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'thread'
4
-
5
3
  module Seahorse
6
4
  module Client
7
5
  class Base
@@ -60,6 +58,7 @@ module Seahorse
60
58
  def build_config(plugins, options)
61
59
  config = Configuration.new
62
60
  config.add_option(:api)
61
+ config.add_option(:plugins)
63
62
  plugins.each do |plugin|
64
63
  plugin.add_options(config) if plugin.respond_to?(:add_options)
65
64
  end
@@ -96,9 +95,9 @@ module Seahorse
96
95
  class << self
97
96
 
98
97
  def new(options = {})
99
- plugins = build_plugins
100
98
  options = options.dup
101
- before_initialize(plugins, options)
99
+ plugins = build_plugins(self.plugins + options.fetch(:plugins, []))
100
+ plugins = before_initialize(plugins, options)
102
101
  client = allocate
103
102
  client.send(:initialize, plugins, options)
104
103
  client
@@ -209,17 +208,28 @@ module Seahorse
209
208
  include(operations_module)
210
209
  end
211
210
 
212
- def build_plugins
211
+ def build_plugins(plugins)
213
212
  plugins.map { |plugin| plugin.is_a?(Class) ? plugin.new : plugin }
214
213
  end
215
214
 
216
215
  def before_initialize(plugins, options)
217
- plugins.each do |plugin|
218
- plugin.before_initialize(self, options) if plugin.respond_to?(:before_initialize)
216
+ queue = Queue.new
217
+ plugins.each { |plugin| queue.push(plugin) }
218
+ until queue.empty?
219
+ plugin = queue.pop
220
+ next unless plugin.respond_to?(:before_initialize)
221
+
222
+ plugins_before = options.fetch(:plugins, [])
223
+ plugin.before_initialize(self, options)
224
+ plugins_after = build_plugins(options.fetch(:plugins, []) - plugins_before)
225
+ # Plugins with before_initialize can add other plugins
226
+ plugins_after.each { |p| queue.push(p); plugins << p }
219
227
  end
228
+ plugins
220
229
  end
221
230
 
222
231
  def inherited(subclass)
232
+ super
223
233
  subclass.instance_variable_set('@plugins', PluginList.new(@plugins))
224
234
  end
225
235
 
@@ -15,7 +15,7 @@ module Seahorse
15
15
  attr_accessor :handler
16
16
 
17
17
  # @param [RequestContext] context
18
- # @return [Response]
18
+ # @return [Seahorse::Response]
19
19
  def call(context)
20
20
  @handler.call(context)
21
21
  end
@@ -17,7 +17,6 @@ be a URI formatted like:
17
17
  'http://example.com'
18
18
  'https://example.com'
19
19
  'http://example.com:123'
20
-
21
20
  DOCS
22
21
 
23
22
  def add_handlers(handlers, config)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.197.2
4
+ version: 3.199.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: 2024-06-20 00:00:00.000000000 Z
11
+ date: 2024-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -111,6 +111,10 @@ files:
111
111
  - lib/aws-sdk-core/binary/event_parser.rb
112
112
  - lib/aws-sdk-core/binary/event_stream_decoder.rb
113
113
  - lib/aws-sdk-core/binary/event_stream_encoder.rb
114
+ - lib/aws-sdk-core/cbor.rb
115
+ - lib/aws-sdk-core/cbor/cbor_engine.rb
116
+ - lib/aws-sdk-core/cbor/decoder.rb
117
+ - lib/aws-sdk-core/cbor/encoder.rb
114
118
  - lib/aws-sdk-core/client_side_monitoring/publisher.rb
115
119
  - lib/aws-sdk-core/client_side_monitoring/request_metrics.rb
116
120
  - lib/aws-sdk-core/client_stubs.rb
@@ -136,6 +140,7 @@ files:
136
140
  - lib/aws-sdk-core/endpoints/templater.rb
137
141
  - lib/aws-sdk-core/endpoints/tree_rule.rb
138
142
  - lib/aws-sdk-core/endpoints/url.rb
143
+ - lib/aws-sdk-core/error_handler.rb
139
144
  - lib/aws-sdk-core/errors.rb
140
145
  - lib/aws-sdk-core/event_emitter.rb
141
146
  - lib/aws-sdk-core/ini_parser.rb
@@ -184,6 +189,7 @@ files:
184
189
  - lib/aws-sdk-core/plugins/protocols/query.rb
185
190
  - lib/aws-sdk-core/plugins/protocols/rest_json.rb
186
191
  - lib/aws-sdk-core/plugins/protocols/rest_xml.rb
192
+ - lib/aws-sdk-core/plugins/protocols/rpc_v2.rb
187
193
  - lib/aws-sdk-core/plugins/recursion_detection.rb
188
194
  - lib/aws-sdk-core/plugins/regional_endpoint.rb
189
195
  - lib/aws-sdk-core/plugins/request_compression.rb
@@ -201,6 +207,7 @@ files:
201
207
  - lib/aws-sdk-core/plugins/user_agent.rb
202
208
  - lib/aws-sdk-core/process_credentials.rb
203
209
  - lib/aws-sdk-core/query.rb
210
+ - lib/aws-sdk-core/query/ec2_handler.rb
204
211
  - lib/aws-sdk-core/query/ec2_param_builder.rb
205
212
  - lib/aws-sdk-core/query/handler.rb
206
213
  - lib/aws-sdk-core/query/param.rb
@@ -210,10 +217,10 @@ files:
210
217
  - lib/aws-sdk-core/refreshing_token.rb
211
218
  - lib/aws-sdk-core/resources/collection.rb
212
219
  - lib/aws-sdk-core/rest.rb
220
+ - lib/aws-sdk-core/rest/content_type_handler.rb
213
221
  - lib/aws-sdk-core/rest/handler.rb
214
222
  - lib/aws-sdk-core/rest/request/body.rb
215
223
  - lib/aws-sdk-core/rest/request/builder.rb
216
- - lib/aws-sdk-core/rest/request/content_type.rb
217
224
  - lib/aws-sdk-core/rest/request/endpoint.rb
218
225
  - lib/aws-sdk-core/rest/request/headers.rb
219
226
  - lib/aws-sdk-core/rest/request/querystring_builder.rb
@@ -222,6 +229,12 @@ files:
222
229
  - lib/aws-sdk-core/rest/response/headers.rb
223
230
  - lib/aws-sdk-core/rest/response/parser.rb
224
231
  - lib/aws-sdk-core/rest/response/status_code.rb
232
+ - lib/aws-sdk-core/rpc_v2.rb
233
+ - lib/aws-sdk-core/rpc_v2/builder.rb
234
+ - lib/aws-sdk-core/rpc_v2/content_type_handler.rb
235
+ - lib/aws-sdk-core/rpc_v2/error_handler.rb
236
+ - lib/aws-sdk-core/rpc_v2/handler.rb
237
+ - lib/aws-sdk-core/rpc_v2/parser.rb
225
238
  - lib/aws-sdk-core/shared_config.rb
226
239
  - lib/aws-sdk-core/shared_credentials.rb
227
240
  - lib/aws-sdk-core/sso_credentials.rb
@@ -237,6 +250,7 @@ files:
237
250
  - lib/aws-sdk-core/stubbing/protocols/rest.rb
238
251
  - lib/aws-sdk-core/stubbing/protocols/rest_json.rb
239
252
  - lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
253
+ - lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb
240
254
  - lib/aws-sdk-core/stubbing/stub_data.rb
241
255
  - lib/aws-sdk-core/stubbing/xml_error.rb
242
256
  - lib/aws-sdk-core/token.rb
@@ -255,13 +269,13 @@ files:
255
269
  - lib/aws-sdk-core/xml/doc_builder.rb
256
270
  - lib/aws-sdk-core/xml/error_handler.rb
257
271
  - lib/aws-sdk-core/xml/parser.rb
258
- - lib/aws-sdk-core/xml/parser/engines/libxml.rb
259
- - lib/aws-sdk-core/xml/parser/engines/nokogiri.rb
260
- - lib/aws-sdk-core/xml/parser/engines/oga.rb
261
- - lib/aws-sdk-core/xml/parser/engines/ox.rb
262
- - lib/aws-sdk-core/xml/parser/engines/rexml.rb
263
272
  - lib/aws-sdk-core/xml/parser/frame.rb
273
+ - lib/aws-sdk-core/xml/parser/libxml_engine.rb
274
+ - lib/aws-sdk-core/xml/parser/nokogiri_engine.rb
275
+ - lib/aws-sdk-core/xml/parser/oga_engine.rb
276
+ - lib/aws-sdk-core/xml/parser/ox_engine.rb
264
277
  - lib/aws-sdk-core/xml/parser/parsing_error.rb
278
+ - lib/aws-sdk-core/xml/parser/rexml_engine.rb
265
279
  - lib/aws-sdk-core/xml/parser/stack.rb
266
280
  - lib/aws-sdk-sso.rb
267
281
  - lib/aws-sdk-sso/client.rb