aws-sdk-core 3.100.0 → 3.130.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 (207) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1294 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -1
  5. data/lib/aws-defaults/default_configuration.rb +153 -0
  6. data/lib/aws-defaults/defaults_mode_config_resolver.rb +107 -0
  7. data/lib/aws-defaults.rb +3 -0
  8. data/lib/aws-sdk-core/arn.rb +15 -0
  9. data/lib/aws-sdk-core/arn_parser.rb +2 -0
  10. data/lib/aws-sdk-core/assume_role_credentials.rb +21 -0
  11. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +9 -1
  12. data/lib/aws-sdk-core/async_client_stubs.rb +2 -0
  13. data/lib/aws-sdk-core/binary/decode_handler.rb +2 -0
  14. data/lib/aws-sdk-core/binary/encode_handler.rb +2 -0
  15. data/lib/aws-sdk-core/binary/event_builder.rb +2 -0
  16. data/lib/aws-sdk-core/binary/event_parser.rb +2 -0
  17. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +2 -0
  18. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +2 -0
  19. data/lib/aws-sdk-core/binary.rb +2 -0
  20. data/lib/aws-sdk-core/client_side_monitoring/publisher.rb +2 -0
  21. data/lib/aws-sdk-core/client_side_monitoring/request_metrics.rb +2 -0
  22. data/lib/aws-sdk-core/client_stubs.rb +7 -1
  23. data/lib/aws-sdk-core/credential_provider.rb +2 -0
  24. data/lib/aws-sdk-core/credential_provider_chain.rb +23 -1
  25. data/lib/aws-sdk-core/credentials.rb +2 -0
  26. data/lib/aws-sdk-core/deprecations.rb +2 -0
  27. data/lib/aws-sdk-core/eager_loader.rb +2 -0
  28. data/lib/aws-sdk-core/ec2_metadata.rb +238 -0
  29. data/lib/aws-sdk-core/ecs_credentials.rb +10 -4
  30. data/lib/aws-sdk-core/endpoint_cache.rb +2 -0
  31. data/lib/aws-sdk-core/errors.rb +11 -2
  32. data/lib/aws-sdk-core/event_emitter.rb +2 -0
  33. data/lib/aws-sdk-core/ini_parser.rb +2 -0
  34. data/lib/aws-sdk-core/instance_profile_credentials.rb +124 -22
  35. data/lib/aws-sdk-core/json/builder.rb +2 -0
  36. data/lib/aws-sdk-core/json/error_handler.rb +2 -0
  37. data/lib/aws-sdk-core/json/handler.rb +2 -0
  38. data/lib/aws-sdk-core/json/json_engine.rb +12 -8
  39. data/lib/aws-sdk-core/json/oj_engine.rb +35 -6
  40. data/lib/aws-sdk-core/json/parser.rb +10 -0
  41. data/lib/aws-sdk-core/json.rb +10 -26
  42. data/lib/aws-sdk-core/log/formatter.rb +9 -3
  43. data/lib/aws-sdk-core/log/handler.rb +2 -0
  44. data/lib/aws-sdk-core/log/param_filter.rb +37 -12
  45. data/lib/aws-sdk-core/log/param_formatter.rb +2 -0
  46. data/lib/aws-sdk-core/pageable_response.rb +82 -32
  47. data/lib/aws-sdk-core/pager.rb +5 -0
  48. data/lib/aws-sdk-core/param_converter.rb +2 -0
  49. data/lib/aws-sdk-core/param_validator.rb +54 -4
  50. data/lib/aws-sdk-core/plugins/api_key.rb +5 -1
  51. data/lib/aws-sdk-core/plugins/apig_authorizer_token.rb +2 -0
  52. data/lib/aws-sdk-core/plugins/apig_credentials_configuration.rb +2 -0
  53. data/lib/aws-sdk-core/plugins/apig_user_agent.rb +2 -0
  54. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +340 -0
  55. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +2 -0
  56. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +2 -0
  57. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +26 -7
  58. data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
  59. data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +2 -0
  60. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +8 -6
  61. data/lib/aws-sdk-core/plugins/event_stream_configuration.rb +2 -0
  62. data/lib/aws-sdk-core/plugins/global_configuration.rb +2 -0
  63. data/lib/aws-sdk-core/plugins/helpful_socket_errors.rb +2 -0
  64. data/lib/aws-sdk-core/plugins/http_checksum.rb +10 -1
  65. data/lib/aws-sdk-core/plugins/idempotency_token.rb +2 -0
  66. data/lib/aws-sdk-core/plugins/invocation_id.rb +2 -0
  67. data/lib/aws-sdk-core/plugins/jsonvalue_converter.rb +2 -0
  68. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  69. data/lib/aws-sdk-core/plugins/param_converter.rb +2 -0
  70. data/lib/aws-sdk-core/plugins/param_validator.rb +2 -0
  71. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +19 -0
  72. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -0
  73. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +2 -0
  74. data/lib/aws-sdk-core/plugins/protocols/query.rb +2 -0
  75. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +18 -1
  76. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +2 -0
  77. data/lib/aws-sdk-core/plugins/recursion_detection.rb +27 -0
  78. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +50 -2
  79. data/lib/aws-sdk-core/plugins/response_paging.rb +3 -1
  80. data/lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb +2 -0
  81. data/lib/aws-sdk-core/plugins/retries/clock_skew.rb +2 -0
  82. data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +7 -3
  83. data/lib/aws-sdk-core/plugins/retries/retry_quota.rb +2 -0
  84. data/lib/aws-sdk-core/plugins/retry_errors.rb +15 -6
  85. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -0
  86. data/lib/aws-sdk-core/plugins/signature_v4.rb +17 -24
  87. data/lib/aws-sdk-core/plugins/stub_responses.rb +9 -1
  88. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +2 -0
  89. data/lib/aws-sdk-core/plugins/user_agent.rb +2 -0
  90. data/lib/aws-sdk-core/process_credentials.rb +8 -6
  91. data/lib/aws-sdk-core/query/ec2_param_builder.rb +2 -0
  92. data/lib/aws-sdk-core/query/handler.rb +2 -0
  93. data/lib/aws-sdk-core/query/param.rb +2 -0
  94. data/lib/aws-sdk-core/query/param_builder.rb +2 -0
  95. data/lib/aws-sdk-core/query/param_list.rb +2 -0
  96. data/lib/aws-sdk-core/query.rb +2 -0
  97. data/lib/aws-sdk-core/refreshing_credentials.rb +42 -11
  98. data/lib/aws-sdk-core/resources/collection.rb +2 -0
  99. data/lib/aws-sdk-core/rest/handler.rb +2 -0
  100. data/lib/aws-sdk-core/rest/request/body.rb +21 -1
  101. data/lib/aws-sdk-core/rest/request/builder.rb +2 -0
  102. data/lib/aws-sdk-core/rest/request/endpoint.rb +2 -0
  103. data/lib/aws-sdk-core/rest/request/headers.rb +20 -6
  104. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +2 -0
  105. data/lib/aws-sdk-core/rest/response/body.rb +2 -0
  106. data/lib/aws-sdk-core/rest/response/headers.rb +6 -3
  107. data/lib/aws-sdk-core/rest/response/parser.rb +2 -0
  108. data/lib/aws-sdk-core/rest/response/status_code.rb +2 -0
  109. data/lib/aws-sdk-core/rest.rb +2 -0
  110. data/lib/aws-sdk-core/shared_config.rb +62 -8
  111. data/lib/aws-sdk-core/shared_credentials.rb +9 -1
  112. data/lib/aws-sdk-core/sso_credentials.rb +137 -0
  113. data/lib/aws-sdk-core/structure.rb +13 -2
  114. data/lib/aws-sdk-core/stubbing/data_applicator.rb +2 -0
  115. data/lib/aws-sdk-core/stubbing/empty_stub.rb +2 -0
  116. data/lib/aws-sdk-core/stubbing/protocols/api_gateway.rb +2 -0
  117. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +2 -0
  118. data/lib/aws-sdk-core/stubbing/protocols/json.rb +3 -1
  119. data/lib/aws-sdk-core/stubbing/protocols/query.rb +2 -0
  120. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +3 -1
  121. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +3 -1
  122. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +2 -2
  123. data/lib/aws-sdk-core/stubbing/stub_data.rb +2 -0
  124. data/lib/aws-sdk-core/stubbing/xml_error.rb +2 -0
  125. data/lib/aws-sdk-core/type_builder.rb +2 -0
  126. data/lib/aws-sdk-core/util.rb +2 -0
  127. data/lib/aws-sdk-core/waiters/errors.rb +2 -0
  128. data/lib/aws-sdk-core/waiters/poller.rb +2 -0
  129. data/lib/aws-sdk-core/waiters/waiter.rb +2 -0
  130. data/lib/aws-sdk-core/waiters.rb +2 -0
  131. data/lib/aws-sdk-core/xml/builder.rb +4 -2
  132. data/lib/aws-sdk-core/xml/default_list.rb +2 -0
  133. data/lib/aws-sdk-core/xml/default_map.rb +2 -0
  134. data/lib/aws-sdk-core/xml/doc_builder.rb +8 -1
  135. data/lib/aws-sdk-core/xml/error_handler.rb +2 -0
  136. data/lib/aws-sdk-core/xml/parser/engines/libxml.rb +2 -0
  137. data/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb +2 -0
  138. data/lib/aws-sdk-core/xml/parser/engines/oga.rb +2 -0
  139. data/lib/aws-sdk-core/xml/parser/engines/ox.rb +3 -1
  140. data/lib/aws-sdk-core/xml/parser/engines/rexml.rb +2 -0
  141. data/lib/aws-sdk-core/xml/parser/frame.rb +25 -0
  142. data/lib/aws-sdk-core/xml/parser/parsing_error.rb +2 -0
  143. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  144. data/lib/aws-sdk-core/xml/parser.rb +7 -0
  145. data/lib/aws-sdk-core/xml.rb +2 -0
  146. data/lib/aws-sdk-core.rb +15 -3
  147. data/lib/aws-sdk-sso/client.rb +570 -0
  148. data/lib/aws-sdk-sso/client_api.rb +190 -0
  149. data/lib/aws-sdk-sso/customizations.rb +1 -0
  150. data/lib/aws-sdk-sso/errors.rb +102 -0
  151. data/lib/aws-sdk-sso/resource.rb +26 -0
  152. data/lib/aws-sdk-sso/types.rb +352 -0
  153. data/lib/aws-sdk-sso.rb +55 -0
  154. data/lib/aws-sdk-sts/client.rb +538 -435
  155. data/lib/aws-sdk-sts/client_api.rb +9 -1
  156. data/lib/aws-sdk-sts/customizations.rb +2 -0
  157. data/lib/aws-sdk-sts/errors.rb +3 -1
  158. data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +7 -1
  159. data/lib/aws-sdk-sts/presigner.rb +9 -1
  160. data/lib/aws-sdk-sts/resource.rb +3 -1
  161. data/lib/aws-sdk-sts/types.rb +360 -191
  162. data/lib/aws-sdk-sts.rb +10 -3
  163. data/lib/seahorse/client/async_base.rb +2 -0
  164. data/lib/seahorse/client/async_response.rb +2 -0
  165. data/lib/seahorse/client/base.rb +3 -0
  166. data/lib/seahorse/client/block_io.rb +5 -2
  167. data/lib/seahorse/client/configuration.rb +6 -0
  168. data/lib/seahorse/client/events.rb +2 -0
  169. data/lib/seahorse/client/h2/connection.rb +17 -13
  170. data/lib/seahorse/client/h2/handler.rb +6 -5
  171. data/lib/seahorse/client/handler.rb +2 -0
  172. data/lib/seahorse/client/handler_builder.rb +2 -0
  173. data/lib/seahorse/client/handler_list.rb +2 -0
  174. data/lib/seahorse/client/handler_list_entry.rb +2 -0
  175. data/lib/seahorse/client/http/async_response.rb +2 -0
  176. data/lib/seahorse/client/http/headers.rb +2 -0
  177. data/lib/seahorse/client/http/request.rb +2 -0
  178. data/lib/seahorse/client/http/response.rb +3 -1
  179. data/lib/seahorse/client/logging/formatter.rb +2 -0
  180. data/lib/seahorse/client/logging/handler.rb +2 -0
  181. data/lib/seahorse/client/managed_file.rb +2 -0
  182. data/lib/seahorse/client/net_http/connection_pool.rb +12 -4
  183. data/lib/seahorse/client/net_http/handler.rb +19 -8
  184. data/lib/seahorse/client/net_http/patches.rb +15 -84
  185. data/lib/seahorse/client/networking_error.rb +2 -0
  186. data/lib/seahorse/client/plugin.rb +2 -0
  187. data/lib/seahorse/client/plugin_list.rb +2 -0
  188. data/lib/seahorse/client/plugins/content_length.rb +13 -5
  189. data/lib/seahorse/client/plugins/endpoint.rb +2 -0
  190. data/lib/seahorse/client/plugins/h2.rb +6 -1
  191. data/lib/seahorse/client/plugins/logging.rb +2 -0
  192. data/lib/seahorse/client/plugins/net_http.rb +39 -3
  193. data/lib/seahorse/client/plugins/operation_methods.rb +2 -0
  194. data/lib/seahorse/client/plugins/raise_response_errors.rb +2 -0
  195. data/lib/seahorse/client/plugins/request_callback.rb +110 -0
  196. data/lib/seahorse/client/plugins/response_target.rb +8 -8
  197. data/lib/seahorse/client/request.rb +2 -0
  198. data/lib/seahorse/client/request_context.rb +2 -0
  199. data/lib/seahorse/client/response.rb +2 -0
  200. data/lib/seahorse/model/api.rb +2 -0
  201. data/lib/seahorse/model/authorizer.rb +2 -0
  202. data/lib/seahorse/model/operation.rb +5 -0
  203. data/lib/seahorse/model/shapes.rb +27 -0
  204. data/lib/seahorse/util.rb +8 -1
  205. data/lib/seahorse/version.rb +2 -0
  206. data/lib/seahorse.rb +3 -0
  207. metadata +26 -9
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Seahorse
2
4
  module Client
3
5
  module Plugins
@@ -0,0 +1,110 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pathname'
4
+ require 'forwardable'
5
+
6
+ module Seahorse
7
+ module Client
8
+ module Plugins
9
+
10
+ # @api private
11
+ class ReadCallbackIO
12
+ extend Forwardable
13
+ def_delegators :@io, :size
14
+
15
+ def initialize(io, on_read = nil)
16
+ @io = io
17
+ @on_read = on_read if on_read.is_a? Proc
18
+ @bytes_read = 0
19
+
20
+ # Some IO objects support readpartial - IO.copy_stream used by the
21
+ # request will call readpartial if available, so define a wrapper
22
+ # for it if the underlying IO supports it.
23
+ if @io.respond_to?(:readpartial)
24
+ def self.readpartial(*args)
25
+ @io.readpartial(*args).tap do |chunk|
26
+ handle_chunk(chunk)
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+ attr_reader :io
33
+
34
+ def read(*args)
35
+ @io.read(*args).tap do |chunk|
36
+ handle_chunk(chunk)
37
+ end
38
+ end
39
+
40
+ private
41
+
42
+ def handle_chunk(chunk)
43
+ @bytes_read += chunk.bytesize if chunk && chunk.respond_to?(:bytesize)
44
+ total_size = @io.respond_to?(:size) ? @io.size : nil
45
+ @on_read.call(chunk, @bytes_read, total_size) if @on_read
46
+ end
47
+ end
48
+
49
+ # @api private
50
+ class RequestCallback < Plugin
51
+
52
+ option(
53
+ :on_chunk_sent,
54
+ default: nil,
55
+ doc_type: 'Proc',
56
+ docstring: <<-DOCS)
57
+ When a Proc object is provided, it will be used as callback when each chunk
58
+ of the request body is sent. It provides three arguments: the chunk,
59
+ the number of bytes read from the body, and the total number of
60
+ bytes in the body.
61
+ DOCS
62
+
63
+ # @api private
64
+ class OptionHandler < Client::Handler
65
+ def call(context)
66
+ if context.params.is_a?(Hash) && context.params[:on_chunk_sent]
67
+ on_chunk_sent = context.params.delete(:on_chunk_sent)
68
+ end
69
+ on_chunk_sent = context.config.on_chunk_sent if on_chunk_sent.nil?
70
+ context[:on_chunk_sent] = on_chunk_sent if on_chunk_sent
71
+ @handler.call(context)
72
+ end
73
+ end
74
+
75
+ # @api private
76
+ class ReadCallbackHandler < Client::Handler
77
+ def call(context)
78
+ if (callback = context[:on_chunk_sent])
79
+ context.http_request.body = ReadCallbackIO.new(
80
+ context.http_request.body,
81
+ callback
82
+ )
83
+ add_event_listeners(context)
84
+ end
85
+ @handler.call(context)
86
+ end
87
+
88
+ def add_event_listeners(context)
89
+ # unwrap the request body as soon as we start receiving a response
90
+ context.http_response.on_headers do
91
+ body = context.http_request.body
92
+ if body.is_a? ReadCallbackIO
93
+ context.http_request.body = body.io
94
+ end
95
+ end
96
+ end
97
+ end
98
+
99
+ # OptionHandler is needed to remove :on_chunk_sent
100
+ # from the params before build
101
+ handler(OptionHandler, step: :initialize)
102
+
103
+ # ReadCallbackHandlerneeds to go late in the call stack
104
+ # other plugins including Sigv4 and content_md5 read the request body
105
+ # and rewind it
106
+ handler(ReadCallbackHandler, step: :sign, priority: 0)
107
+ end
108
+ end
109
+ end
110
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pathname'
2
4
 
3
5
  module Seahorse
@@ -15,10 +17,9 @@ module Seahorse
15
17
 
16
18
  def call(context)
17
19
  if context.params.is_a?(Hash) && context.params[:response_target]
18
- target = context.params.delete(:response_target)
19
- else
20
- target = context[:response_target]
20
+ context[:response_target] = context.params.delete(:response_target)
21
21
  end
22
+ target = context[:response_target]
22
23
  add_event_listeners(context, target) if target
23
24
  @handler.call(context)
24
25
  end
@@ -26,20 +27,19 @@ module Seahorse
26
27
  private
27
28
 
28
29
  def add_event_listeners(context, target)
29
- handler = self
30
30
  context.http_response.on_headers(200..299) do
31
31
  # In a fresh response body will be a StringIO
32
32
  # However, when a request is retried we may have
33
33
  # an existing ManagedFile or BlockIO and those
34
34
  # should be reused.
35
35
  if context.http_response.body.is_a? StringIO
36
- context.http_response.body = handler.send(:io, target)
36
+ context.http_response.body = io(target, context.http_response.headers)
37
37
  end
38
38
  end
39
39
 
40
40
  context.http_response.on_success(200..299) do
41
41
  body = context.http_response.body
42
- if ManagedFile === body && body.open?
42
+ if body.is_a?(ManagedFile) && body.open?
43
43
  body.close
44
44
  end
45
45
  end
@@ -61,9 +61,9 @@ module Seahorse
61
61
  end
62
62
  end
63
63
 
64
- def io(target)
64
+ def io(target, headers)
65
65
  case target
66
- when Proc then BlockIO.new(&target)
66
+ when Proc then BlockIO.new(headers, &target)
67
67
  when String, Pathname then ManagedFile.new(target, 'w+b')
68
68
  else target
69
69
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Seahorse
2
4
  module Client
3
5
  class Request
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'stringio'
2
4
 
3
5
  module Seahorse
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'delegate'
2
4
 
3
5
  module Seahorse
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Seahorse
2
4
  module Model
3
5
  class Api
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Seahorse
2
4
  module Model
3
5
  class Authorizer
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Seahorse
2
4
  module Model
3
5
  class Operation
@@ -23,6 +25,9 @@ module Seahorse
23
25
  # @return [Boolean]
24
26
  attr_accessor :http_checksum_required
25
27
 
28
+ # @return [Hash]
29
+ attr_accessor :http_checksum
30
+
26
31
  # @return [Boolean]
27
32
  attr_accessor :deprecated
28
33
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'set'
2
4
 
3
5
  module Seahorse
@@ -59,6 +61,9 @@ module Seahorse
59
61
  # @return [Boolean]
60
62
  attr_accessor :eventheader_type
61
63
 
64
+ # @return [Boolean]
65
+ attr_accessor :document
66
+
62
67
  # @return [String, nil]
63
68
  def location
64
69
  @location || (shape && shape[:location])
@@ -112,6 +117,9 @@ module Seahorse
112
117
  # @return [String, nil]
113
118
  attr_accessor :documentation
114
119
 
120
+ # @return [Boolean]
121
+ attr_accessor :union
122
+
115
123
  # Gets metadata for the given `key`.
116
124
  def [](key)
117
125
  @metadata[key.to_s]
@@ -262,8 +270,27 @@ module Seahorse
262
270
 
263
271
  end
264
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
+
265
290
  class TimestampShape < Shape; end
266
291
 
292
+ class DocumentShape < Shape; end
293
+
267
294
  end
268
295
  end
269
296
  end
data/lib/seahorse/util.rb CHANGED
@@ -1,10 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cgi'
2
4
 
3
5
  module Seahorse
4
6
  # @api private
5
7
  module Util
6
8
  class << self
7
-
8
9
  def uri_escape(string)
9
10
  CGI.escape(string.to_s.encode('UTF-8')).gsub('+', '%20').gsub('%7E', '~')
10
11
  end
@@ -13,6 +14,12 @@ module Seahorse
13
14
  path.gsub(/[^\/]+/) { |part| uri_escape(part) }
14
15
  end
15
16
 
17
+ # Checks for a valid host label
18
+ # @see https://tools.ietf.org/html/rfc3986#section-3.2.2
19
+ # @see https://tools.ietf.org/html/rfc1123#page-13
20
+ def host_label?(str)
21
+ str =~ /^(?!-)[a-zA-Z0-9-]{1,63}(?<!-)$/
22
+ end
16
23
  end
17
24
  end
18
25
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Seahorse
2
4
  VERSION = '0.1.0'
3
5
  end
data/lib/seahorse.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'seahorse/util'
2
4
 
3
5
  # client
@@ -48,6 +50,7 @@ require_relative 'seahorse/client/plugins/net_http'
48
50
  require_relative 'seahorse/client/plugins/h2'
49
51
  require_relative 'seahorse/client/plugins/raise_response_errors'
50
52
  require_relative 'seahorse/client/plugins/response_target'
53
+ require_relative 'seahorse/client/plugins/request_callback'
51
54
 
52
55
  # model
53
56
 
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.100.0
4
+ version: 3.130.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-06-15 00:00:00.000000000 Z
11
+ date: 2022-03-11 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
@@ -85,8 +85,13 @@ executables: []
85
85
  extensions: []
86
86
  extra_rdoc_files: []
87
87
  files:
88
+ - CHANGELOG.md
89
+ - LICENSE.txt
88
90
  - VERSION
89
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
90
95
  - lib/aws-sdk-core.rb
91
96
  - lib/aws-sdk-core/arn.rb
92
97
  - lib/aws-sdk-core/arn_parser.rb
@@ -108,6 +113,7 @@ files:
108
113
  - lib/aws-sdk-core/credentials.rb
109
114
  - lib/aws-sdk-core/deprecations.rb
110
115
  - lib/aws-sdk-core/eager_loader.rb
116
+ - lib/aws-sdk-core/ec2_metadata.rb
111
117
  - lib/aws-sdk-core/ecs_credentials.rb
112
118
  - lib/aws-sdk-core/endpoint_cache.rb
113
119
  - lib/aws-sdk-core/errors.rb
@@ -133,9 +139,11 @@ files:
133
139
  - lib/aws-sdk-core/plugins/apig_authorizer_token.rb
134
140
  - lib/aws-sdk-core/plugins/apig_credentials_configuration.rb
135
141
  - lib/aws-sdk-core/plugins/apig_user_agent.rb
142
+ - lib/aws-sdk-core/plugins/checksum_algorithm.rb
136
143
  - lib/aws-sdk-core/plugins/client_metrics_plugin.rb
137
144
  - lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb
138
145
  - lib/aws-sdk-core/plugins/credentials_configuration.rb
146
+ - lib/aws-sdk-core/plugins/defaults_mode.rb
139
147
  - lib/aws-sdk-core/plugins/endpoint_discovery.rb
140
148
  - lib/aws-sdk-core/plugins/endpoint_pattern.rb
141
149
  - lib/aws-sdk-core/plugins/event_stream_configuration.rb
@@ -154,6 +162,7 @@ files:
154
162
  - lib/aws-sdk-core/plugins/protocols/query.rb
155
163
  - lib/aws-sdk-core/plugins/protocols/rest_json.rb
156
164
  - lib/aws-sdk-core/plugins/protocols/rest_xml.rb
165
+ - lib/aws-sdk-core/plugins/recursion_detection.rb
157
166
  - lib/aws-sdk-core/plugins/regional_endpoint.rb
158
167
  - lib/aws-sdk-core/plugins/response_paging.rb
159
168
  - lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb
@@ -188,6 +197,7 @@ files:
188
197
  - lib/aws-sdk-core/rest/response/status_code.rb
189
198
  - lib/aws-sdk-core/shared_config.rb
190
199
  - lib/aws-sdk-core/shared_credentials.rb
200
+ - lib/aws-sdk-core/sso_credentials.rb
191
201
  - lib/aws-sdk-core/structure.rb
192
202
  - lib/aws-sdk-core/stubbing/data_applicator.rb
193
203
  - lib/aws-sdk-core/stubbing/empty_stub.rb
@@ -221,6 +231,13 @@ files:
221
231
  - lib/aws-sdk-core/xml/parser/frame.rb
222
232
  - lib/aws-sdk-core/xml/parser/parsing_error.rb
223
233
  - lib/aws-sdk-core/xml/parser/stack.rb
234
+ - lib/aws-sdk-sso.rb
235
+ - lib/aws-sdk-sso/client.rb
236
+ - lib/aws-sdk-sso/client_api.rb
237
+ - lib/aws-sdk-sso/customizations.rb
238
+ - lib/aws-sdk-sso/errors.rb
239
+ - lib/aws-sdk-sso/resource.rb
240
+ - lib/aws-sdk-sso/types.rb
224
241
  - lib/aws-sdk-sts.rb
225
242
  - lib/aws-sdk-sts/client.rb
226
243
  - lib/aws-sdk-sts/client_api.rb
@@ -263,6 +280,7 @@ files:
263
280
  - lib/seahorse/client/plugins/net_http.rb
264
281
  - lib/seahorse/client/plugins/operation_methods.rb
265
282
  - lib/seahorse/client/plugins/raise_response_errors.rb
283
+ - lib/seahorse/client/plugins/request_callback.rb
266
284
  - lib/seahorse/client/plugins/response_target.rb
267
285
  - lib/seahorse/client/request.rb
268
286
  - lib/seahorse/client/request_context.rb
@@ -277,8 +295,8 @@ homepage: https://github.com/aws/aws-sdk-ruby
277
295
  licenses:
278
296
  - Apache-2.0
279
297
  metadata:
280
- source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-core
281
- changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-core/CHANGELOG.md
298
+ source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-core
299
+ changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-core/CHANGELOG.md
282
300
  post_install_message:
283
301
  rdoc_options: []
284
302
  require_paths:
@@ -287,15 +305,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
287
305
  requirements:
288
306
  - - ">="
289
307
  - !ruby/object:Gem::Version
290
- version: '0'
308
+ version: '2.3'
291
309
  required_rubygems_version: !ruby/object:Gem::Requirement
292
310
  requirements:
293
311
  - - ">="
294
312
  - !ruby/object:Gem::Version
295
313
  version: '0'
296
314
  requirements: []
297
- rubyforge_project:
298
- rubygems_version: 2.7.6.2
315
+ rubygems_version: 3.1.6
299
316
  signing_key:
300
317
  specification_version: 4
301
318
  summary: AWS SDK for Ruby - Core