aws-sdk-core 3.114.1 → 3.130.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +216 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +153 -0
  5. data/lib/aws-defaults/defaults_mode_config_resolver.rb +107 -0
  6. data/lib/aws-defaults.rb +3 -0
  7. data/lib/aws-sdk-core/assume_role_credentials.rb +19 -0
  8. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +7 -1
  9. data/lib/aws-sdk-core/client_stubs.rb +5 -1
  10. data/lib/aws-sdk-core/credential_provider_chain.rb +2 -1
  11. data/lib/aws-sdk-core/ec2_metadata.rb +27 -7
  12. data/lib/aws-sdk-core/ecs_credentials.rb +5 -0
  13. data/lib/aws-sdk-core/errors.rb +5 -1
  14. data/lib/aws-sdk-core/instance_profile_credentials.rb +119 -18
  15. data/lib/aws-sdk-core/json/json_engine.rb +10 -8
  16. data/lib/aws-sdk-core/json/oj_engine.rb +33 -6
  17. data/lib/aws-sdk-core/json/parser.rb +8 -0
  18. data/lib/aws-sdk-core/json.rb +8 -26
  19. data/lib/aws-sdk-core/log/param_filter.rb +9 -1
  20. data/lib/aws-sdk-core/pageable_response.rb +72 -26
  21. data/lib/aws-sdk-core/pager.rb +3 -0
  22. data/lib/aws-sdk-core/param_validator.rb +29 -0
  23. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +340 -0
  24. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +3 -1
  25. data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
  26. data/lib/aws-sdk-core/plugins/http_checksum.rb +8 -1
  27. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +17 -0
  28. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +16 -1
  29. data/lib/aws-sdk-core/plugins/recursion_detection.rb +27 -0
  30. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +47 -1
  31. data/lib/aws-sdk-core/plugins/response_paging.rb +1 -1
  32. data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +5 -3
  33. data/lib/aws-sdk-core/plugins/retry_errors.rb +21 -5
  34. data/lib/aws-sdk-core/plugins/signature_v4.rb +15 -24
  35. data/lib/aws-sdk-core/plugins/stub_responses.rb +5 -1
  36. data/lib/aws-sdk-core/process_credentials.rb +3 -2
  37. data/lib/aws-sdk-core/refreshing_credentials.rb +40 -11
  38. data/lib/aws-sdk-core/rest/request/body.rb +19 -1
  39. data/lib/aws-sdk-core/rest/request/headers.rb +18 -6
  40. data/lib/aws-sdk-core/rest/response/headers.rb +3 -1
  41. data/lib/aws-sdk-core/shared_config.rb +27 -8
  42. data/lib/aws-sdk-core/shared_credentials.rb +7 -1
  43. data/lib/aws-sdk-core/sso_credentials.rb +8 -3
  44. data/lib/aws-sdk-core/structure.rb +10 -1
  45. data/lib/aws-sdk-core/xml/parser/engines/ox.rb +1 -1
  46. data/lib/aws-sdk-core/xml/parser/engines/rexml.rb +0 -8
  47. data/lib/aws-sdk-core/xml/parser/frame.rb +23 -0
  48. data/lib/aws-sdk-core.rb +6 -0
  49. data/lib/aws-sdk-sso/client.rb +27 -5
  50. data/lib/aws-sdk-sso.rb +1 -1
  51. data/lib/aws-sdk-sts/client.rb +424 -415
  52. data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +5 -1
  53. data/lib/aws-sdk-sts/presigner.rb +7 -1
  54. data/lib/aws-sdk-sts/types.rb +199 -181
  55. data/lib/aws-sdk-sts.rb +1 -1
  56. data/lib/seahorse/client/configuration.rb +4 -0
  57. data/lib/seahorse/client/h2/connection.rb +14 -11
  58. data/lib/seahorse/client/h2/handler.rb +4 -5
  59. data/lib/seahorse/client/net_http/connection_pool.rb +7 -0
  60. data/lib/seahorse/client/net_http/handler.rb +15 -7
  61. data/lib/seahorse/client/net_http/patches.rb +13 -84
  62. data/lib/seahorse/client/plugins/content_length.rb +11 -5
  63. data/lib/seahorse/client/plugins/net_http.rb +33 -2
  64. data/lib/seahorse/model/operation.rb +3 -0
  65. data/lib/seahorse/model/shapes.rb +25 -0
  66. metadata +11 -6
  67. data/lib/aws-sdk-sso/plugins/content_type.rb +0 -25
data/lib/aws-sdk-sts.rb CHANGED
@@ -50,6 +50,6 @@ require_relative 'aws-sdk-sts/customizations'
50
50
  # @!group service
51
51
  module Aws::STS
52
52
 
53
- GEM_VERSION = '3.114.1'
53
+ GEM_VERSION = '3.130.1'
54
54
 
55
55
  end
@@ -195,6 +195,10 @@ module Seahorse
195
195
  @members.include?(method_name) or super
196
196
  end
197
197
 
198
+ def override_config(k, v)
199
+ @struct[k] = v
200
+ end
201
+
198
202
  private
199
203
 
200
204
  def value_at(opt_name)
@@ -1,10 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- if RUBY_VERSION >= '2.1'
4
- begin
5
- require 'http/2'
6
- rescue LoadError; end
7
- end
3
+ begin
4
+ require 'http/2'
5
+ rescue LoadError; end
8
6
  require 'openssl'
9
7
  require 'socket'
10
8
 
@@ -80,13 +78,18 @@ module Seahorse
80
78
  _nonblocking_connect(tcp, addr)
81
79
  debug_output('opened')
82
80
 
83
- @socket = OpenSSL::SSL::SSLSocket.new(tcp, _tls_context)
84
- @socket.sync_close = true
85
- @socket.hostname = endpoint.host
81
+ if endpoint.scheme == 'https'
82
+ @socket = OpenSSL::SSL::SSLSocket.new(tcp, _tls_context)
83
+ @socket.sync_close = true
84
+ @socket.hostname = endpoint.host
85
+
86
+ debug_output("starting TLS for #{endpoint.host}:#{endpoint.port} ...")
87
+ @socket.connect
88
+ debug_output('TLS established')
89
+ else
90
+ @socket = tcp
91
+ end
86
92
 
87
- debug_output("starting TLS for #{endpoint.host}:#{endpoint.port} ...")
88
- @socket.connect
89
- debug_output('TLS established')
90
93
  _register_h2_callbacks
91
94
  @status = :active
92
95
  elsif @status == :closed
@@ -1,10 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- if RUBY_VERSION >= '2.1'
4
- begin
5
- require 'http/2'
6
- rescue LoadError; end
7
- end
3
+ begin
4
+ require 'http/2'
5
+ rescue LoadError; end
6
+
8
7
  require 'securerandom'
9
8
 
10
9
  module Seahorse
@@ -34,6 +34,7 @@ module Seahorse
34
34
  ssl_ca_bundle: nil,
35
35
  ssl_ca_directory: nil,
36
36
  ssl_ca_store: nil,
37
+ ssl_timeout: nil
37
38
  }
38
39
 
39
40
  # @api private
@@ -187,6 +188,9 @@ module Seahorse
187
188
  # disables this behaviour. This value can safely be set per
188
189
  # request on the session yielded by {#session_for}.
189
190
  #
191
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
192
+ # in seconds.
193
+ #
190
194
  # @option options [Boolean] :http_wire_trace (false) When `true`,
191
195
  # HTTP debug output will be sent to the `:logger`.
192
196
  #
@@ -248,6 +252,7 @@ module Seahorse
248
252
  :ssl_ca_bundle => options[:ssl_ca_bundle],
249
253
  :ssl_ca_directory => options[:ssl_ca_directory],
250
254
  :ssl_ca_store => options[:ssl_ca_store],
255
+ :ssl_timeout => options[:ssl_timeout]
251
256
  }
252
257
  end
253
258
 
@@ -285,6 +290,8 @@ module Seahorse
285
290
 
286
291
  if endpoint.scheme == 'https'
287
292
  http.use_ssl = true
293
+ http.ssl_timeout = ssl_timeout
294
+
288
295
  if ssl_verify_peer?
289
296
  http.verify_mode = OpenSSL::SSL::VERIFY_PEER
290
297
  http.ca_file = ssl_ca_bundle if ssl_ca_bundle
@@ -74,8 +74,9 @@ module Seahorse
74
74
  # @return [void]
75
75
  def transmit(config, req, resp)
76
76
  session(config, req) do |http|
77
+ # Monkey patch default content-type set by Net::HTTP
78
+ Thread.current[:net_http_skip_default_content_type] = true
77
79
  http.request(build_net_request(req)) do |net_resp|
78
-
79
80
  status_code = net_resp.code.to_i
80
81
  headers = extract_headers(net_resp)
81
82
 
@@ -96,6 +97,9 @@ module Seahorse
96
97
  rescue => error
97
98
  # not retryable
98
99
  resp.signal_error(error)
100
+ ensure
101
+ # ensure we turn off monkey patch in case of error
102
+ Thread.current[:net_http_skip_default_content_type] = nil
99
103
  end
100
104
 
101
105
  def complete_response(req, resp, bytes_received)
@@ -147,7 +151,12 @@ module Seahorse
147
151
  def build_net_request(request)
148
152
  request_class = net_http_request_class(request)
149
153
  req = request_class.new(request.endpoint.request_uri, headers(request))
150
- req.body_stream = request.body
154
+ # Net::HTTP adds a default Content-Type when a body is present.
155
+ # Set the body stream when it has an unknown size or when it is > 0.
156
+ if !request.body.respond_to?(:size) ||
157
+ (request.body.respond_to?(:size) && request.body.size > 0)
158
+ req.body_stream = request.body
159
+ end
151
160
  req
152
161
  end
153
162
 
@@ -166,14 +175,13 @@ module Seahorse
166
175
  # @return [Hash] Returns a vanilla hash of headers to send with the
167
176
  # HTTP request.
168
177
  def headers(request)
169
- # Net::HTTP adds default headers for content-type to POSTs (1.8.7+)
170
- # and accept-encoding (2.0.0+). Setting a default empty value defeats
171
- # this.
178
+ # Net::HTTP adds a default header for accept-encoding (2.0.0+).
179
+ # Setting a default empty value defeats this.
172
180
  #
173
- # Removing these are necessary for most services to not break request
181
+ # Removing this is necessary for most services to not break request
174
182
  # signatures as well as dynamodb crc32 checks (these fail if the
175
183
  # response is gzipped).
176
- headers = { 'content-type' => '', 'accept-encoding' => '' }
184
+ headers = { 'accept-encoding' => '' }
177
185
  request.headers.each_pair do |key, value|
178
186
  headers[key] = value
179
187
  end
@@ -11,97 +11,26 @@ module Seahorse
11
11
  module Patches
12
12
 
13
13
  def self.apply!
14
+ Net::HTTPGenericRequest.prepend(PatchDefaultContentType)
14
15
  return unless RUBY_VERSION < '2.5'
15
- if RUBY_VERSION >= '2.3'
16
- Net::HTTP::IDEMPOTENT_METHODS_.clear
17
- return
18
- end
19
- # no further patches needed for above versions
20
16
 
21
- if RUBY_VERSION >= '2.0'
22
- Net::HTTP.send(:include, Ruby_2)
23
- Net::HTTP::IDEMPOTENT_METHODS_.clear
24
- elsif RUBY_VERSION >= '1.9.3'
25
- Net::HTTP.send(:include, Ruby_1_9_3)
26
- end
27
- Net::HTTP.send(:alias_method, :old_transport_request, :transport_request)
28
- Net::HTTP.send(:alias_method, :transport_request, :new_transport_request)
17
+ Net::HTTP::IDEMPOTENT_METHODS_.clear
29
18
  end
30
19
 
31
- module Ruby_2
32
- def new_transport_request(req)
33
- count = 0
34
- begin
35
- begin_transport req
36
- res = catch(:response) {
37
- req.exec @socket, @curr_http_version, edit_path(req.path)
38
- begin
39
- res = Net::HTTPResponse.read_new(@socket)
40
- res.decode_content = req.decode_content
41
- end while res.kind_of?(Net::HTTPInformation)
42
-
43
- res.uri = req.uri
44
-
45
- res
46
- }
47
- res.reading_body(@socket, req.response_body_permitted?) {
48
- yield res if block_given?
49
- }
50
- rescue Net::OpenTimeout
51
- raise
52
- rescue Net::ReadTimeout, IOError, EOFError,
53
- Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE,
54
- # avoid a dependency on OpenSSL
55
- defined?(OpenSSL::SSL) ? OpenSSL::SSL::SSLError : IOError,
56
- Timeout::Error => exception
57
- if count == 0 && Net::HTTP::IDEMPOTENT_METHODS_.include?(req.method)
58
- count += 1
59
- @socket.close if @socket and not @socket.closed?
60
- D "Conn close because of error #{exception}, and retry"
61
- if req.body_stream
62
- if req.body_stream.respond_to?(:rewind)
63
- req.body_stream.rewind
64
- else
65
- raise
66
- end
67
- end
68
- retry
69
- end
70
- D "Conn close because of error #{exception}"
71
- @socket.close if @socket and not @socket.closed?
72
- raise
73
- end
74
-
75
- end_transport req, res
76
- res
77
- rescue => exception
78
- D "Conn close because of error #{exception}"
79
- @socket.close if @socket and not @socket.closed?
80
- raise exception
20
+ # For requests with bodys, Net::HTTP sets a default content type of:
21
+ # 'application/x-www-form-urlencoded'
22
+ # There are cases where we should not send content type at all.
23
+ # Even when no body is supplied, Net::HTTP uses a default empty body
24
+ # and sets it anyway. This patch disables the behavior when a Thread
25
+ # local variable is set.
26
+ module PatchDefaultContentType
27
+ def supply_default_content_type
28
+ return if Thread.current[:net_http_skip_default_content_type]
29
+
30
+ super
81
31
  end
82
32
  end
83
33
 
84
- module Ruby_1_9_3
85
- def new_transport_request(req)
86
- begin_transport req
87
- res = catch(:response) {
88
- req.exec @socket, @curr_http_version, edit_path(req.path)
89
- begin
90
- res = Net::HTTPResponse.read_new(@socket)
91
- end while res.kind_of?(Net::HTTPContinue)
92
- res
93
- }
94
- res.reading_body(@socket, req.response_body_permitted?) {
95
- yield res if block_given?
96
- }
97
- end_transport req, res
98
- res
99
- rescue => exception
100
- D "Conn close because of error #{exception}"
101
- @socket.close if @socket and not @socket.closed?
102
- raise exception
103
- end
104
- end
105
34
  end
106
35
  end
107
36
  end
@@ -7,16 +7,22 @@ module Seahorse
7
7
 
8
8
  # @api private
9
9
  class Handler < Client::Handler
10
+ # https://github.com/ruby/net-http/blob/master/lib/net/http/requests.rb
11
+ # Methods without body are forwards compatible, because content-length
12
+ # may be set for requests without body but is technically incorrect.
13
+ METHODS_WITHOUT_BODY = Set.new(
14
+ %w[GET HEAD DELETE OPTIONS TRACE COPY MOVE]
15
+ )
10
16
 
11
17
  def call(context)
12
- # If it's an IO object and not a File / String / String IO
13
- if context.http_request.body.respond_to?(:size)
14
- length = context.http_request.body.size
15
- context.http_request.headers['Content-Length'] = length
18
+ body = context.http_request.body
19
+ method = context.http_request.http_method
20
+ # We use Net::HTTP with body_stream which doesn't do this by default
21
+ if body.respond_to?(:size) && !METHODS_WITHOUT_BODY.include?(method)
22
+ context.http_request.headers['Content-Length'] = body.size
16
23
  end
17
24
  @handler.call(context)
18
25
  end
19
-
20
26
  end
21
27
 
22
28
  handler(Handler, step: :sign, priority: 0)
@@ -9,9 +9,13 @@ module Seahorse
9
9
 
10
10
  option(:http_proxy, default: nil, doc_type: String, docstring: '')
11
11
 
12
- option(:http_open_timeout, default: 15, doc_type: Integer, docstring: '')
12
+ option(:http_open_timeout, default: 15, doc_type: Integer, docstring: '') do |cfg|
13
+ resolve_http_open_timeout(cfg)
14
+ end
13
15
 
14
- option(:http_read_timeout, default: 60, doc_type: Integer, docstring: '')
16
+ option(:http_read_timeout, default: 60, doc_type: Integer, docstring: '') do |cfg|
17
+ resolve_http_read_timeout(cfg)
18
+ end
15
19
 
16
20
  option(:http_idle_timeout, default: 5, doc_type: Integer, docstring: '')
17
21
 
@@ -30,10 +34,37 @@ module Seahorse
30
34
 
31
35
  option(:ssl_ca_store, default: nil, doc_type: String, docstring: '')
32
36
 
37
+ option(:ssl_timeout, default: nil, doc_type: Float, docstring: '') do |cfg|
38
+ resolve_ssl_timeout(cfg)
39
+ end
40
+
33
41
  option(:logger) # for backwards compat
34
42
 
35
43
  handler(Client::NetHttp::Handler, step: :send)
36
44
 
45
+ def self.resolve_http_open_timeout(cfg)
46
+ default_mode_value =
47
+ if cfg.respond_to?(:defaults_mode_config_resolver)
48
+ cfg.defaults_mode_config_resolver.resolve(:http_open_timeout)
49
+ end
50
+ default_mode_value || 15
51
+ end
52
+
53
+ def self.resolve_http_read_timeout(cfg)
54
+ default_mode_value =
55
+ if cfg.respond_to?(:defaults_mode_config_resolver)
56
+ cfg.defaults_mode_config_resolver.resolve(:http_read_timeout)
57
+ end
58
+ default_mode_value || 60
59
+ end
60
+
61
+ def self.resolve_ssl_timeout(cfg)
62
+ default_mode_value =
63
+ if cfg.respond_to?(:defaults_mode_config_resolver)
64
+ cfg.defaults_mode_config_resolver.resolve(:ssl_timeout)
65
+ end
66
+ default_mode_value || nil
67
+ end
37
68
  end
38
69
  end
39
70
  end
@@ -25,6 +25,9 @@ module Seahorse
25
25
  # @return [Boolean]
26
26
  attr_accessor :http_checksum_required
27
27
 
28
+ # @return [Hash]
29
+ attr_accessor :http_checksum
30
+
28
31
  # @return [Boolean]
29
32
  attr_accessor :deprecated
30
33
 
@@ -61,6 +61,9 @@ module Seahorse
61
61
  # @return [Boolean]
62
62
  attr_accessor :eventheader_type
63
63
 
64
+ # @return [Boolean]
65
+ attr_accessor :document
66
+
64
67
  # @return [String, nil]
65
68
  def location
66
69
  @location || (shape && shape[:location])
@@ -114,6 +117,9 @@ module Seahorse
114
117
  # @return [String, nil]
115
118
  attr_accessor :documentation
116
119
 
120
+ # @return [Boolean]
121
+ attr_accessor :union
122
+
117
123
  # Gets metadata for the given `key`.
118
124
  def [](key)
119
125
  @metadata[key.to_s]
@@ -264,8 +270,27 @@ module Seahorse
264
270
 
265
271
  end
266
272
 
273
+ class UnionShape < StructureShape
274
+ def initialize(options = {})
275
+ @member_subclasses = {}
276
+ super options.merge(union: true)
277
+ end
278
+
279
+ # @api private
280
+ def member_subclass(member)
281
+ @member_subclasses[member]
282
+ end
283
+
284
+ # @api private
285
+ def add_member_subclass(member, subclass)
286
+ @member_subclasses[member] = subclass
287
+ end
288
+ end
289
+
267
290
  class TimestampShape < Shape; end
268
291
 
292
+ class DocumentShape < Shape; end
293
+
269
294
  end
270
295
  end
271
296
  end
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.114.1
4
+ version: 3.130.1
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: 2021-06-02 00:00:00.000000000 Z
11
+ date: 2022-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '1'
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 1.239.0
36
+ version: 1.525.0
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '1'
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 1.239.0
46
+ version: 1.525.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: aws-sigv4
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -89,6 +89,9 @@ files:
89
89
  - LICENSE.txt
90
90
  - VERSION
91
91
  - ca-bundle.crt
92
+ - lib/aws-defaults.rb
93
+ - lib/aws-defaults/default_configuration.rb
94
+ - lib/aws-defaults/defaults_mode_config_resolver.rb
92
95
  - lib/aws-sdk-core.rb
93
96
  - lib/aws-sdk-core/arn.rb
94
97
  - lib/aws-sdk-core/arn_parser.rb
@@ -136,9 +139,11 @@ files:
136
139
  - lib/aws-sdk-core/plugins/apig_authorizer_token.rb
137
140
  - lib/aws-sdk-core/plugins/apig_credentials_configuration.rb
138
141
  - lib/aws-sdk-core/plugins/apig_user_agent.rb
142
+ - lib/aws-sdk-core/plugins/checksum_algorithm.rb
139
143
  - lib/aws-sdk-core/plugins/client_metrics_plugin.rb
140
144
  - lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb
141
145
  - lib/aws-sdk-core/plugins/credentials_configuration.rb
146
+ - lib/aws-sdk-core/plugins/defaults_mode.rb
142
147
  - lib/aws-sdk-core/plugins/endpoint_discovery.rb
143
148
  - lib/aws-sdk-core/plugins/endpoint_pattern.rb
144
149
  - lib/aws-sdk-core/plugins/event_stream_configuration.rb
@@ -157,6 +162,7 @@ files:
157
162
  - lib/aws-sdk-core/plugins/protocols/query.rb
158
163
  - lib/aws-sdk-core/plugins/protocols/rest_json.rb
159
164
  - lib/aws-sdk-core/plugins/protocols/rest_xml.rb
165
+ - lib/aws-sdk-core/plugins/recursion_detection.rb
160
166
  - lib/aws-sdk-core/plugins/regional_endpoint.rb
161
167
  - lib/aws-sdk-core/plugins/response_paging.rb
162
168
  - lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb
@@ -230,7 +236,6 @@ files:
230
236
  - lib/aws-sdk-sso/client_api.rb
231
237
  - lib/aws-sdk-sso/customizations.rb
232
238
  - lib/aws-sdk-sso/errors.rb
233
- - lib/aws-sdk-sso/plugins/content_type.rb
234
239
  - lib/aws-sdk-sso/resource.rb
235
240
  - lib/aws-sdk-sso/types.rb
236
241
  - lib/aws-sdk-sts.rb
@@ -300,7 +305,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
300
305
  requirements:
301
306
  - - ">="
302
307
  - !ruby/object:Gem::Version
303
- version: '0'
308
+ version: '2.3'
304
309
  required_rubygems_version: !ruby/object:Gem::Requirement
305
310
  requirements:
306
311
  - - ">="
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Aws
4
- module SSO
5
- module Plugins
6
- class ContentType < Seahorse::Client::Plugin
7
-
8
- def add_handlers(handlers, config)
9
- handlers.add(Handler)
10
- end
11
-
12
- class Handler < Seahorse::Client::Handler
13
- def call(context)
14
- # Some operations break when given an empty content-type header.
15
- # The SDK adds this blank content-type header
16
- # since Net::HTTP provides a default that can break services.
17
- # We're setting one here even though it's not used or necessary.
18
- context.http_request.headers['content-type'] = 'application/json'
19
- @handler.call(context)
20
- end
21
- end
22
- end
23
- end
24
- end
25
- end