aws-sdk-core 3.39.0 → 3.54.2

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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/aws-sdk-core/async_client_stubs.rb +80 -0
  4. data/lib/aws-sdk-core/binary/decode_handler.rb +9 -1
  5. data/lib/aws-sdk-core/binary/encode_handler.rb +32 -0
  6. data/lib/aws-sdk-core/binary/event_builder.rb +122 -0
  7. data/lib/aws-sdk-core/binary/event_parser.rb +48 -18
  8. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +5 -2
  9. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +53 -0
  10. data/lib/aws-sdk-core/binary.rb +3 -0
  11. data/lib/aws-sdk-core/client_side_monitoring/request_metrics.rb +63 -9
  12. data/lib/aws-sdk-core/client_stubs.rb +1 -1
  13. data/lib/aws-sdk-core/ecs_credentials.rb +12 -8
  14. data/lib/aws-sdk-core/errors.rb +38 -2
  15. data/lib/aws-sdk-core/event_emitter.rb +42 -0
  16. data/lib/aws-sdk-core/instance_profile_credentials.rb +12 -8
  17. data/lib/aws-sdk-core/json/error_handler.rb +19 -2
  18. data/lib/aws-sdk-core/json/handler.rb +19 -1
  19. data/lib/aws-sdk-core/log/param_filter.rb +1 -1
  20. data/lib/aws-sdk-core/param_validator.rb +9 -1
  21. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +22 -3
  22. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +5 -1
  23. data/lib/aws-sdk-core/plugins/event_stream_configuration.rb +14 -0
  24. data/lib/aws-sdk-core/plugins/invocation_id.rb +33 -0
  25. data/lib/aws-sdk-core/plugins/retry_errors.rb +2 -0
  26. data/lib/aws-sdk-core/plugins/stub_responses.rb +19 -7
  27. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +53 -0
  28. data/lib/aws-sdk-core/plugins/user_agent.rb +6 -0
  29. data/lib/aws-sdk-core/process_credentials.rb +7 -1
  30. data/lib/aws-sdk-core/query/handler.rb +6 -1
  31. data/lib/aws-sdk-core/refreshing_credentials.rb +1 -1
  32. data/lib/aws-sdk-core/resources/collection.rb +1 -1
  33. data/lib/aws-sdk-core/structure.rb +6 -2
  34. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +19 -0
  35. data/lib/aws-sdk-core/stubbing/stub_data.rb +13 -4
  36. data/lib/aws-sdk-core/waiters/waiter.rb +2 -2
  37. data/lib/aws-sdk-core/xml/error_handler.rb +26 -3
  38. data/lib/aws-sdk-core.rb +1 -0
  39. data/lib/aws-sdk-sts/client.rb +622 -427
  40. data/lib/aws-sdk-sts/client_api.rb +35 -0
  41. data/lib/aws-sdk-sts/errors.rb +128 -0
  42. data/lib/aws-sdk-sts/types.rb +498 -165
  43. data/lib/aws-sdk-sts.rb +1 -1
  44. data/lib/seahorse/client/async_base.rb +50 -0
  45. data/lib/seahorse/client/async_response.rb +62 -0
  46. data/lib/seahorse/client/base.rb +1 -1
  47. data/lib/seahorse/client/configuration.rb +4 -2
  48. data/lib/seahorse/client/events.rb +1 -1
  49. data/lib/seahorse/client/h2/connection.rb +244 -0
  50. data/lib/seahorse/client/h2/handler.rb +151 -0
  51. data/lib/seahorse/client/http/async_response.rb +42 -0
  52. data/lib/seahorse/client/http/response.rb +13 -8
  53. data/lib/seahorse/client/net_http/patches.rb +7 -1
  54. data/lib/seahorse/client/networking_error.rb +28 -0
  55. data/lib/seahorse/client/plugin.rb +1 -1
  56. data/lib/seahorse/client/plugins/content_length.rb +7 -2
  57. data/lib/seahorse/client/plugins/h2.rb +64 -0
  58. data/lib/seahorse/model/api.rb +4 -0
  59. data/lib/seahorse/model/operation.rb +4 -0
  60. data/lib/seahorse/model/shapes.rb +2 -2
  61. data/lib/seahorse.rb +9 -0
  62. metadata +23 -5
@@ -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
 
@@ -7,8 +7,13 @@ 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
+ begin
11
+ length = context.http_request.body.size
12
+ context.http_request.headers['Content-Length'] = length
13
+ rescue
14
+ # allowing `Content-Length` failed to be set
15
+ # see Aws::Plugins::TransferEncoding
16
+ end
12
17
  @handler.call(context)
13
18
  end
14
19
 
@@ -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
@@ -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|
data/lib/seahorse.rb CHANGED
@@ -15,12 +15,14 @@ require_relative 'seahorse/client/plugin_list'
15
15
  require_relative 'seahorse/client/request'
16
16
  require_relative 'seahorse/client/request_context'
17
17
  require_relative 'seahorse/client/response'
18
+ require_relative 'seahorse/client/async_response'
18
19
 
19
20
  # client http
20
21
 
21
22
  require_relative 'seahorse/client/http/headers'
22
23
  require_relative 'seahorse/client/http/request'
23
24
  require_relative 'seahorse/client/http/response'
25
+ require_relative 'seahorse/client/http/async_response'
24
26
 
25
27
  # client logging
26
28
 
@@ -32,12 +34,18 @@ require_relative 'seahorse/client/logging/formatter'
32
34
  require_relative 'seahorse/client/net_http/connection_pool'
33
35
  require_relative 'seahorse/client/net_http/handler'
34
36
 
37
+ # http2 handler
38
+
39
+ require_relative 'seahorse/client/h2/connection'
40
+ require_relative 'seahorse/client/h2/handler'
41
+
35
42
  # plugins
36
43
 
37
44
  require_relative 'seahorse/client/plugins/content_length'
38
45
  require_relative 'seahorse/client/plugins/endpoint'
39
46
  require_relative 'seahorse/client/plugins/logging'
40
47
  require_relative 'seahorse/client/plugins/net_http'
48
+ require_relative 'seahorse/client/plugins/h2'
41
49
  require_relative 'seahorse/client/plugins/raise_response_errors'
42
50
  require_relative 'seahorse/client/plugins/response_target'
43
51
 
@@ -49,3 +57,4 @@ require_relative 'seahorse/model/authorizer'
49
57
  require_relative 'seahorse/model/shapes'
50
58
 
51
59
  require_relative 'seahorse/client/base'
60
+ require_relative 'seahorse/client/async_base'
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.39.0
4
+ version: 3.54.2
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: 2018-11-20 00:00:00.000000000 Z
11
+ date: 2019-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.0'
47
+ version: '1.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.0'
54
+ version: '1.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: aws-eventstream
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -59,6 +59,9 @@ dependencies:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 1.0.2
62
65
  type: :runtime
63
66
  prerelease: false
64
67
  version_requirements: !ruby/object:Gem::Requirement
@@ -66,6 +69,9 @@ dependencies:
66
69
  - - "~>"
67
70
  - !ruby/object:Gem::Version
68
71
  version: '1.0'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 1.0.2
69
75
  description: Provides API clients for AWS. This gem is part of the official AWS SDK
70
76
  for Ruby.
71
77
  email:
@@ -77,10 +83,14 @@ files:
77
83
  - ca-bundle.crt
78
84
  - lib/aws-sdk-core.rb
79
85
  - lib/aws-sdk-core/assume_role_credentials.rb
86
+ - lib/aws-sdk-core/async_client_stubs.rb
80
87
  - lib/aws-sdk-core/binary.rb
81
88
  - lib/aws-sdk-core/binary/decode_handler.rb
89
+ - lib/aws-sdk-core/binary/encode_handler.rb
90
+ - lib/aws-sdk-core/binary/event_builder.rb
82
91
  - lib/aws-sdk-core/binary/event_parser.rb
83
92
  - lib/aws-sdk-core/binary/event_stream_decoder.rb
93
+ - lib/aws-sdk-core/binary/event_stream_encoder.rb
84
94
  - lib/aws-sdk-core/client_side_monitoring/publisher.rb
85
95
  - lib/aws-sdk-core/client_side_monitoring/request_metrics.rb
86
96
  - lib/aws-sdk-core/client_stubs.rb
@@ -123,6 +133,7 @@ files:
123
133
  - lib/aws-sdk-core/plugins/global_configuration.rb
124
134
  - lib/aws-sdk-core/plugins/helpful_socket_errors.rb
125
135
  - lib/aws-sdk-core/plugins/idempotency_token.rb
136
+ - lib/aws-sdk-core/plugins/invocation_id.rb
126
137
  - lib/aws-sdk-core/plugins/jsonvalue_converter.rb
127
138
  - lib/aws-sdk-core/plugins/logging.rb
128
139
  - lib/aws-sdk-core/plugins/param_converter.rb
@@ -139,6 +150,7 @@ files:
139
150
  - lib/aws-sdk-core/plugins/signature_v2.rb
140
151
  - lib/aws-sdk-core/plugins/signature_v4.rb
141
152
  - lib/aws-sdk-core/plugins/stub_responses.rb
153
+ - lib/aws-sdk-core/plugins/transfer_encoding.rb
142
154
  - lib/aws-sdk-core/plugins/user_agent.rb
143
155
  - lib/aws-sdk-core/process_credentials.rb
144
156
  - lib/aws-sdk-core/query.rb
@@ -203,14 +215,19 @@ files:
203
215
  - lib/aws-sdk-sts/resource.rb
204
216
  - lib/aws-sdk-sts/types.rb
205
217
  - lib/seahorse.rb
218
+ - lib/seahorse/client/async_base.rb
219
+ - lib/seahorse/client/async_response.rb
206
220
  - lib/seahorse/client/base.rb
207
221
  - lib/seahorse/client/block_io.rb
208
222
  - lib/seahorse/client/configuration.rb
209
223
  - lib/seahorse/client/events.rb
224
+ - lib/seahorse/client/h2/connection.rb
225
+ - lib/seahorse/client/h2/handler.rb
210
226
  - lib/seahorse/client/handler.rb
211
227
  - lib/seahorse/client/handler_builder.rb
212
228
  - lib/seahorse/client/handler_list.rb
213
229
  - lib/seahorse/client/handler_list_entry.rb
230
+ - lib/seahorse/client/http/async_response.rb
214
231
  - lib/seahorse/client/http/headers.rb
215
232
  - lib/seahorse/client/http/request.rb
216
233
  - lib/seahorse/client/http/response.rb
@@ -225,6 +242,7 @@ files:
225
242
  - lib/seahorse/client/plugin_list.rb
226
243
  - lib/seahorse/client/plugins/content_length.rb
227
244
  - lib/seahorse/client/plugins/endpoint.rb
245
+ - lib/seahorse/client/plugins/h2.rb
228
246
  - lib/seahorse/client/plugins/logging.rb
229
247
  - lib/seahorse/client/plugins/net_http.rb
230
248
  - lib/seahorse/client/plugins/operation_methods.rb
@@ -239,7 +257,7 @@ files:
239
257
  - lib/seahorse/model/shapes.rb
240
258
  - lib/seahorse/util.rb
241
259
  - lib/seahorse/version.rb
242
- homepage: http://github.com/aws/aws-sdk-ruby
260
+ homepage: https://github.com/aws/aws-sdk-ruby
243
261
  licenses:
244
262
  - Apache-2.0
245
263
  metadata: