aws-sdk-core 3.46.0 → 3.94.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 (86) hide show
  1. checksums.yaml +5 -5
  2. data/VERSION +1 -1
  3. data/lib/aws-sdk-core.rb +7 -0
  4. data/lib/aws-sdk-core/arn.rb +77 -0
  5. data/lib/aws-sdk-core/arn_parser.rb +38 -0
  6. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +102 -0
  7. data/lib/aws-sdk-core/async_client_stubs.rb +80 -0
  8. data/lib/aws-sdk-core/binary.rb +3 -0
  9. data/lib/aws-sdk-core/binary/decode_handler.rb +9 -1
  10. data/lib/aws-sdk-core/binary/encode_handler.rb +32 -0
  11. data/lib/aws-sdk-core/binary/event_builder.rb +122 -0
  12. data/lib/aws-sdk-core/binary/event_parser.rb +48 -18
  13. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +5 -2
  14. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +53 -0
  15. data/lib/aws-sdk-core/client_side_monitoring/publisher.rb +9 -1
  16. data/lib/aws-sdk-core/client_stubs.rb +10 -9
  17. data/lib/aws-sdk-core/credential_provider.rb +0 -31
  18. data/lib/aws-sdk-core/credential_provider_chain.rb +79 -39
  19. data/lib/aws-sdk-core/deprecations.rb +16 -10
  20. data/lib/aws-sdk-core/ecs_credentials.rb +12 -8
  21. data/lib/aws-sdk-core/endpoint_cache.rb +14 -11
  22. data/lib/aws-sdk-core/errors.rb +94 -6
  23. data/lib/aws-sdk-core/event_emitter.rb +42 -0
  24. data/lib/aws-sdk-core/instance_profile_credentials.rb +120 -38
  25. data/lib/aws-sdk-core/json.rb +13 -14
  26. data/lib/aws-sdk-core/json/error_handler.rb +19 -2
  27. data/lib/aws-sdk-core/json/handler.rb +19 -1
  28. data/lib/aws-sdk-core/log/formatter.rb +7 -1
  29. data/lib/aws-sdk-core/log/param_filter.rb +3 -3
  30. data/lib/aws-sdk-core/pageable_response.rb +34 -20
  31. data/lib/aws-sdk-core/param_validator.rb +11 -5
  32. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +26 -1
  33. data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +1 -1
  34. data/lib/aws-sdk-core/plugins/event_stream_configuration.rb +14 -0
  35. data/lib/aws-sdk-core/plugins/invocation_id.rb +33 -0
  36. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +8 -1
  37. data/lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb +137 -0
  38. data/lib/aws-sdk-core/plugins/retries/clock_skew.rb +98 -0
  39. data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +142 -0
  40. data/lib/aws-sdk-core/plugins/retries/retry_quota.rb +57 -0
  41. data/lib/aws-sdk-core/plugins/retry_errors.rb +290 -106
  42. data/lib/aws-sdk-core/plugins/signature_v4.rb +13 -2
  43. data/lib/aws-sdk-core/plugins/stub_responses.rb +20 -7
  44. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +51 -0
  45. data/lib/aws-sdk-core/plugins/user_agent.rb +4 -8
  46. data/lib/aws-sdk-core/process_credentials.rb +9 -3
  47. data/lib/aws-sdk-core/shared_config.rb +95 -125
  48. data/lib/aws-sdk-core/structure.rb +1 -2
  49. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +19 -0
  50. data/lib/aws-sdk-core/stubbing/stub_data.rb +13 -4
  51. data/lib/aws-sdk-core/util.rb +4 -0
  52. data/lib/aws-sdk-core/waiters/waiter.rb +2 -2
  53. data/lib/aws-sdk-core/xml/error_handler.rb +26 -3
  54. data/lib/aws-sdk-sts.rb +7 -4
  55. data/lib/aws-sdk-sts/client.rb +1109 -459
  56. data/lib/aws-sdk-sts/client_api.rb +67 -0
  57. data/lib/aws-sdk-sts/customizations.rb +2 -0
  58. data/lib/aws-sdk-sts/errors.rb +150 -0
  59. data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +32 -0
  60. data/lib/aws-sdk-sts/presigner.rb +67 -0
  61. data/lib/aws-sdk-sts/resource.rb +1 -0
  62. data/lib/aws-sdk-sts/types.rb +736 -176
  63. data/lib/seahorse.rb +9 -0
  64. data/lib/seahorse/client/async_base.rb +50 -0
  65. data/lib/seahorse/client/async_response.rb +62 -0
  66. data/lib/seahorse/client/base.rb +4 -2
  67. data/lib/seahorse/client/configuration.rb +4 -2
  68. data/lib/seahorse/client/events.rb +1 -1
  69. data/lib/seahorse/client/h2/connection.rb +246 -0
  70. data/lib/seahorse/client/h2/handler.rb +151 -0
  71. data/lib/seahorse/client/handler_list_entry.rb +2 -2
  72. data/lib/seahorse/client/http/async_response.rb +42 -0
  73. data/lib/seahorse/client/http/response.rb +13 -8
  74. data/lib/seahorse/client/logging/formatter.rb +4 -2
  75. data/lib/seahorse/client/net_http/connection_pool.rb +19 -20
  76. data/lib/seahorse/client/net_http/handler.rb +7 -1
  77. data/lib/seahorse/client/net_http/patches.rb +7 -1
  78. data/lib/seahorse/client/networking_error.rb +28 -0
  79. data/lib/seahorse/client/plugin.rb +5 -4
  80. data/lib/seahorse/client/plugins/content_length.rb +5 -2
  81. data/lib/seahorse/client/plugins/h2.rb +64 -0
  82. data/lib/seahorse/client/response.rb +3 -5
  83. data/lib/seahorse/model/api.rb +4 -0
  84. data/lib/seahorse/model/operation.rb +4 -0
  85. data/lib/seahorse/model/shapes.rb +2 -2
  86. metadata +43 -10
@@ -58,7 +58,7 @@ module Seahorse
58
58
  else
59
59
  options[:default] = default
60
60
  end
61
- options[:default_block] = Proc.new if block_given?
61
+ options[:default_block] = block if block_given?
62
62
  self.options << PluginOption.new(name, options)
63
63
  end
64
64
 
@@ -109,6 +109,7 @@ module Seahorse
109
109
 
110
110
  def initialize(name, options = {})
111
111
  @name = name
112
+ @doc_default = nil
112
113
  options.each_pair do |opt_name, opt_value|
113
114
  self.send("#{opt_name}=", opt_value)
114
115
  end
@@ -119,12 +120,12 @@ module Seahorse
119
120
  attr_accessor :default_block
120
121
  attr_accessor :required
121
122
  attr_accessor :doc_type
122
- attr_accessor :doc_default
123
+ attr_writer :doc_default
123
124
  attr_accessor :docstring
124
125
 
125
126
  def doc_default
126
- if @doc_default.nil?
127
- Proc === default ? nil : default
127
+ if @doc_default.nil? && !default.is_a?(Proc)
128
+ default
128
129
  else
129
130
  @doc_default
130
131
  end
@@ -7,8 +7,11 @@ module Seahorse
7
7
  class Handler < Client::Handler
8
8
 
9
9
  def call(context)
10
- length = context.http_request.body.size
11
- context.http_request.headers['Content-Length'] = length
10
+ # If it's an IO object and not a File / String / String IO
11
+ if context.http_request.body.respond_to?(:size)
12
+ length = context.http_request.body.size
13
+ context.http_request.headers['Content-Length'] = length
14
+ end
12
15
  @handler.call(context)
13
16
  end
14
17
 
@@ -0,0 +1,64 @@
1
+ require 'seahorse/client/h2/handler'
2
+
3
+ module Seahorse
4
+ module Client
5
+ module Plugins
6
+ class H2 < Plugin
7
+
8
+ # H2 Client
9
+ option(:max_concurrent_streams, default: 100, doc_type: Integer, docstring: <<-DOCS)
10
+ Maximum concurrent streams used in HTTP2 connection, defaults to 100. Note that server may send back
11
+ :settings_max_concurrent_streams value which will take priority when initializing new streams.
12
+ DOCS
13
+
14
+ option(:connection_timeout, default: 60, doc_type: Integer, docstring: <<-DOCS)
15
+ Connection timeout in seconds, defaults to 60 sec.
16
+ DOCS
17
+
18
+ option(:connection_read_timeout, default: 60, doc_type: Integer, docstring: <<-DOCS)
19
+ Connection read timeout in seconds, defaults to 60 sec.
20
+ DOCS
21
+
22
+ option(:read_chunk_size, default: 1024, doc_type: Integer, docstring: '')
23
+
24
+ option(:raise_response_errors, default: true, doc_type: 'Boolean', docstring: <<-DOCS)
25
+ Defaults to `true`, raises errors if exist when #wait or #join! is called upon async response.
26
+ DOCS
27
+
28
+ # SSL Context
29
+ option(:ssl_ca_bundle, default: nil, doc_type: String, docstring: <<-DOCS)
30
+ Full path to the SSL certificate authority bundle file that should be used when
31
+ verifying peer certificates. If you do not pass `:ssl_ca_directory` or `:ssl_ca_bundle`
32
+ the system default will be used if available.
33
+ DOCS
34
+
35
+ option(:ssl_ca_directory, default: nil, doc_type: String, docstring: <<-DOCS)
36
+ Full path of the directory that contains the unbundled SSL certificate authority
37
+ files for verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
38
+ `:ssl_ca_directory` the system default will be used if available.
39
+ DOCS
40
+
41
+ option(:ssl_ca_store, default: nil, doc_type: String, docstring: '')
42
+
43
+ option(:ssl_verify_peer, default: true, doc_type: 'Boolean', docstring: <<-DOCS)
44
+ When `true`, SSL peer certificates are verified when establishing a connection.
45
+ DOCS
46
+
47
+ option(:http_wire_trace, default: false, doc_type: 'Boolean', docstring: <<-DOCS)
48
+ When `true`, HTTP2 debug output will be sent to the `:logger`.
49
+ DOCS
50
+
51
+ option(:enable_alpn, default: false, doc_type: 'Boolean', docstring: <<-DOCS)
52
+ Setting to `true` to enable ALPN in HTTP2 over TLS, requires Ruby version >= 2.3 and
53
+ Openssl version >= 1.0.2. Defaults to false. Note: not all service HTTP2 operations
54
+ supports ALPN on server side, please refer to service documentation.
55
+ DOCS
56
+
57
+ option(:logger)
58
+
59
+ handler(Client::H2::Handler, step: :send)
60
+
61
+ end
62
+ end
63
+ end
64
+ end
@@ -3,7 +3,6 @@ require 'delegate'
3
3
  module Seahorse
4
4
  module Client
5
5
  class Response < Delegator
6
-
7
6
  # @option options [RequestContext] :context (nil)
8
7
  # @option options [Integer] :status_code (nil)
9
8
  # @option options [Http::Headers] :headers (Http::Headers.new)
@@ -39,10 +38,10 @@ module Seahorse
39
38
  # witin the given range.
40
39
  #
41
40
  # @return [self]
42
- def on(range, &block)
41
+ def on(range, &_block)
43
42
  response = self
44
43
  @context.http_response.on_success(range) do
45
- block.call(response)
44
+ yield response
46
45
  end
47
46
  self
48
47
  end
@@ -56,7 +55,7 @@ module Seahorse
56
55
  # @return [Boolean] Returns `true` if the response is complete with
57
56
  # a ~ 200 level http status code.
58
57
  def successful?
59
- (200..299).include?(@context.http_response.status_code) && @error.nil?
58
+ (200..299).cover?(@context.http_response.status_code) && @error.nil?
60
59
  end
61
60
 
62
61
  # @api private
@@ -76,7 +75,6 @@ module Seahorse
76
75
  def __setobj__(obj)
77
76
  @data = obj
78
77
  end
79
-
80
78
  end
81
79
  end
82
80
  end
@@ -38,6 +38,10 @@ module Seahorse
38
38
  @operations.keys
39
39
  end
40
40
 
41
+ def async_operation_names
42
+ @operations.select {|_, op| op.async }.keys
43
+ end
44
+
41
45
  def add_operation(name, operation)
42
46
  @operations[name.to_sym] = operation
43
47
  end
@@ -8,6 +8,7 @@ module Seahorse
8
8
  @deprecated = false
9
9
  @errors = []
10
10
  @metadata = {}
11
+ @async = false
11
12
  end
12
13
 
13
14
  # @return [String, nil]
@@ -50,6 +51,9 @@ module Seahorse
50
51
  # @return [Boolean]
51
52
  attr_accessor :require_apikey
52
53
 
54
+ # @return [Boolean]
55
+ attr_accessor :async
56
+
53
57
  def [](key)
54
58
  @metadata[key.to_s]
55
59
  end
@@ -15,9 +15,9 @@ module Seahorse
15
15
  @event = false
16
16
  @eventstream = false
17
17
  @eventpayload = false
18
- @eventpayload_type = ''
18
+ @eventpayload_type = ''.freeze
19
19
  @eventheader = false
20
- @eventheader_type = ''
20
+ @eventheader_type = ''.freeze
21
21
  options.each do |key, value|
22
22
  if key == :metadata
23
23
  value.each do |k,v|
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.46.0
4
+ version: 3.94.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: 2019-01-16 00:00:00.000000000 Z
11
+ date: 2020-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -30,42 +30,54 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.0'
33
+ version: '1'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 1.239.0
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
- version: '1.0'
43
+ version: '1'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.239.0
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: aws-sigv4
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '1.0'
53
+ version: '1.1'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '1.0'
60
+ version: '1.1'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: aws-eventstream
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '1.0'
67
+ version: '1'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 1.0.2
62
71
  type: :runtime
63
72
  prerelease: false
64
73
  version_requirements: !ruby/object:Gem::Requirement
65
74
  requirements:
66
75
  - - "~>"
67
76
  - !ruby/object:Gem::Version
68
- version: '1.0'
77
+ version: '1'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 1.0.2
69
81
  description: Provides API clients for AWS. This gem is part of the official AWS SDK
70
82
  for Ruby.
71
83
  email:
@@ -76,11 +88,18 @@ files:
76
88
  - VERSION
77
89
  - ca-bundle.crt
78
90
  - lib/aws-sdk-core.rb
91
+ - lib/aws-sdk-core/arn.rb
92
+ - lib/aws-sdk-core/arn_parser.rb
79
93
  - lib/aws-sdk-core/assume_role_credentials.rb
94
+ - lib/aws-sdk-core/assume_role_web_identity_credentials.rb
95
+ - lib/aws-sdk-core/async_client_stubs.rb
80
96
  - lib/aws-sdk-core/binary.rb
81
97
  - lib/aws-sdk-core/binary/decode_handler.rb
98
+ - lib/aws-sdk-core/binary/encode_handler.rb
99
+ - lib/aws-sdk-core/binary/event_builder.rb
82
100
  - lib/aws-sdk-core/binary/event_parser.rb
83
101
  - lib/aws-sdk-core/binary/event_stream_decoder.rb
102
+ - lib/aws-sdk-core/binary/event_stream_encoder.rb
84
103
  - lib/aws-sdk-core/client_side_monitoring/publisher.rb
85
104
  - lib/aws-sdk-core/client_side_monitoring/request_metrics.rb
86
105
  - lib/aws-sdk-core/client_stubs.rb
@@ -123,6 +142,7 @@ files:
123
142
  - lib/aws-sdk-core/plugins/global_configuration.rb
124
143
  - lib/aws-sdk-core/plugins/helpful_socket_errors.rb
125
144
  - lib/aws-sdk-core/plugins/idempotency_token.rb
145
+ - lib/aws-sdk-core/plugins/invocation_id.rb
126
146
  - lib/aws-sdk-core/plugins/jsonvalue_converter.rb
127
147
  - lib/aws-sdk-core/plugins/logging.rb
128
148
  - lib/aws-sdk-core/plugins/param_converter.rb
@@ -135,10 +155,15 @@ files:
135
155
  - lib/aws-sdk-core/plugins/protocols/rest_xml.rb
136
156
  - lib/aws-sdk-core/plugins/regional_endpoint.rb
137
157
  - lib/aws-sdk-core/plugins/response_paging.rb
158
+ - lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb
159
+ - lib/aws-sdk-core/plugins/retries/clock_skew.rb
160
+ - lib/aws-sdk-core/plugins/retries/error_inspector.rb
161
+ - lib/aws-sdk-core/plugins/retries/retry_quota.rb
138
162
  - lib/aws-sdk-core/plugins/retry_errors.rb
139
163
  - lib/aws-sdk-core/plugins/signature_v2.rb
140
164
  - lib/aws-sdk-core/plugins/signature_v4.rb
141
165
  - lib/aws-sdk-core/plugins/stub_responses.rb
166
+ - lib/aws-sdk-core/plugins/transfer_encoding.rb
142
167
  - lib/aws-sdk-core/plugins/user_agent.rb
143
168
  - lib/aws-sdk-core/process_credentials.rb
144
169
  - lib/aws-sdk-core/query.rb
@@ -200,17 +225,24 @@ files:
200
225
  - lib/aws-sdk-sts/client_api.rb
201
226
  - lib/aws-sdk-sts/customizations.rb
202
227
  - lib/aws-sdk-sts/errors.rb
228
+ - lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
229
+ - lib/aws-sdk-sts/presigner.rb
203
230
  - lib/aws-sdk-sts/resource.rb
204
231
  - lib/aws-sdk-sts/types.rb
205
232
  - lib/seahorse.rb
233
+ - lib/seahorse/client/async_base.rb
234
+ - lib/seahorse/client/async_response.rb
206
235
  - lib/seahorse/client/base.rb
207
236
  - lib/seahorse/client/block_io.rb
208
237
  - lib/seahorse/client/configuration.rb
209
238
  - lib/seahorse/client/events.rb
239
+ - lib/seahorse/client/h2/connection.rb
240
+ - lib/seahorse/client/h2/handler.rb
210
241
  - lib/seahorse/client/handler.rb
211
242
  - lib/seahorse/client/handler_builder.rb
212
243
  - lib/seahorse/client/handler_list.rb
213
244
  - lib/seahorse/client/handler_list_entry.rb
245
+ - lib/seahorse/client/http/async_response.rb
214
246
  - lib/seahorse/client/http/headers.rb
215
247
  - lib/seahorse/client/http/request.rb
216
248
  - lib/seahorse/client/http/response.rb
@@ -225,6 +257,7 @@ files:
225
257
  - lib/seahorse/client/plugin_list.rb
226
258
  - lib/seahorse/client/plugins/content_length.rb
227
259
  - lib/seahorse/client/plugins/endpoint.rb
260
+ - lib/seahorse/client/plugins/h2.rb
228
261
  - lib/seahorse/client/plugins/logging.rb
229
262
  - lib/seahorse/client/plugins/net_http.rb
230
263
  - lib/seahorse/client/plugins/operation_methods.rb
@@ -239,7 +272,7 @@ files:
239
272
  - lib/seahorse/model/shapes.rb
240
273
  - lib/seahorse/util.rb
241
274
  - lib/seahorse/version.rb
242
- homepage: http://github.com/aws/aws-sdk-ruby
275
+ homepage: https://github.com/aws/aws-sdk-ruby
243
276
  licenses:
244
277
  - Apache-2.0
245
278
  metadata:
@@ -261,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
294
  version: '0'
262
295
  requirements: []
263
296
  rubyforge_project:
264
- rubygems_version: 2.5.2.3
297
+ rubygems_version: 2.7.6.2
265
298
  signing_key:
266
299
  specification_version: 4
267
300
  summary: AWS SDK for Ruby - Core