aws-sdk-core 3.201.3 → 3.209.1

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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +113 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults.rb +4 -1
  5. data/lib/aws-sdk-core/assume_role_credentials.rb +12 -5
  6. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +13 -7
  7. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  8. data/lib/aws-sdk-core/credential_provider_chain.rb +9 -2
  9. data/lib/aws-sdk-core/credentials.rb +13 -6
  10. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  11. data/lib/aws-sdk-core/endpoints.rb +6 -3
  12. data/lib/aws-sdk-core/log.rb +10 -0
  13. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +7 -3
  14. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +1 -0
  15. data/lib/aws-sdk-core/plugins/sign.rb +2 -3
  16. data/lib/aws-sdk-core/plugins/stub_responses.rb +29 -2
  17. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  18. data/lib/aws-sdk-core/plugins/user_agent.rb +17 -8
  19. data/lib/aws-sdk-core/plugins.rb +39 -0
  20. data/lib/aws-sdk-core/process_credentials.rb +2 -1
  21. data/lib/aws-sdk-core/resources.rb +8 -0
  22. data/lib/aws-sdk-core/rpc_v2/handler.rb +5 -1
  23. data/lib/aws-sdk-core/shared_config.rb +3 -1
  24. data/lib/aws-sdk-core/shared_credentials.rb +0 -7
  25. data/lib/aws-sdk-core/sso_credentials.rb +2 -1
  26. data/lib/aws-sdk-core/stubbing.rb +22 -0
  27. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  28. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  29. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  30. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  31. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  32. data/lib/aws-sdk-core/telemetry.rb +78 -0
  33. data/lib/aws-sdk-core/waiters/poller.rb +9 -4
  34. data/lib/aws-sdk-core.rb +82 -112
  35. data/lib/aws-sdk-sso/client.rb +35 -8
  36. data/lib/aws-sdk-sso/client_api.rb +1 -0
  37. data/lib/aws-sdk-sso/endpoints.rb +4 -16
  38. data/lib/aws-sdk-sso/plugins/endpoints.rb +18 -6
  39. data/lib/aws-sdk-sso/types.rb +1 -0
  40. data/lib/aws-sdk-sso.rb +15 -11
  41. data/lib/aws-sdk-ssooidc/client.rb +35 -8
  42. data/lib/aws-sdk-ssooidc/client_api.rb +1 -0
  43. data/lib/aws-sdk-ssooidc/endpoints.rb +4 -16
  44. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +18 -6
  45. data/lib/aws-sdk-ssooidc/types.rb +1 -0
  46. data/lib/aws-sdk-ssooidc.rb +15 -11
  47. data/lib/aws-sdk-sts/client.rb +35 -8
  48. data/lib/aws-sdk-sts/client_api.rb +1 -0
  49. data/lib/aws-sdk-sts/customizations.rb +5 -1
  50. data/lib/aws-sdk-sts/endpoints.rb +8 -32
  51. data/lib/aws-sdk-sts/plugins/endpoints.rb +18 -6
  52. data/lib/aws-sdk-sts/types.rb +1 -0
  53. data/lib/aws-sdk-sts.rb +15 -11
  54. data/lib/seahorse/client/h2/handler.rb +13 -3
  55. data/lib/seahorse/client/net_http/connection_pool.rb +8 -2
  56. data/lib/seahorse/client/net_http/handler.rb +21 -9
  57. data/lib/seahorse/client/plugins/net_http.rb +9 -0
  58. data/lib/seahorse/client/request_context.rb +8 -1
  59. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  60. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  61. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  62. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  63. metadata +20 -4
@@ -34,7 +34,9 @@ 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
+ ssl_timeout: nil,
38
+ ssl_cert: nil,
39
+ ssl_key: nil
38
40
  }
39
41
 
40
42
  # @api private
@@ -246,7 +248,9 @@ module Seahorse
246
248
  :ssl_ca_bundle => options[:ssl_ca_bundle],
247
249
  :ssl_ca_directory => options[:ssl_ca_directory],
248
250
  :ssl_ca_store => options[:ssl_ca_store],
249
- :ssl_timeout => options[:ssl_timeout]
251
+ :ssl_timeout => options[:ssl_timeout],
252
+ :ssl_cert => options[:ssl_cert],
253
+ :ssl_key => options[:ssl_key]
250
254
  }
251
255
  end
252
256
 
@@ -291,6 +295,8 @@ module Seahorse
291
295
  http.ca_file = ssl_ca_bundle if ssl_ca_bundle
292
296
  http.ca_path = ssl_ca_directory if ssl_ca_directory
293
297
  http.cert_store = ssl_ca_store if ssl_ca_store
298
+ http.cert = ssl_cert if ssl_cert
299
+ http.key = ssl_key if ssl_key
294
300
  else
295
301
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
296
302
  end
@@ -23,17 +23,12 @@ module Seahorse
23
23
 
24
24
  NETWORK_ERRORS = [
25
25
  SocketError, EOFError, IOError, Timeout::Error,
26
- Errno::ECONNABORTED, Errno::ECONNRESET, Errno::EPIPE,
27
- Errno::EINVAL, Errno::ETIMEDOUT, OpenSSL::SSL::SSLError,
28
- Errno::EHOSTUNREACH, Errno::ECONNREFUSED,
26
+ Errno::ECONNABORTED, Errno::ECONNRESET, Errno::EPIPE, Errno::EINVAL,
27
+ Errno::ETIMEDOUT, Errno::EHOSTUNREACH, Errno::ECONNREFUSED,
28
+ OpenSSL::SSL::SSLError, OpenSSL::SSL::SSLErrorWaitReadable,
29
29
  Net::HTTPFatalError # for proxy connection failures
30
30
  ]
31
31
 
32
- # does not exist in Ruby 1.9.3
33
- if OpenSSL::SSL.const_defined?(:SSLErrorWaitReadable)
34
- NETWORK_ERRORS << OpenSSL::SSL::SSLErrorWaitReadable
35
- end
36
-
37
32
  # @api private
38
33
  DNS_ERROR_MESSAGES = [
39
34
  'getaddrinfo: nodename nor servname provided, or not known', # MacOS
@@ -47,7 +42,13 @@ module Seahorse
47
42
  # @param [RequestContext] context
48
43
  # @return [Response]
49
44
  def call(context)
50
- transmit(context.config, context.http_request, context.http_response)
45
+ span_wrapper(context) do
46
+ transmit(
47
+ context.config,
48
+ context.http_request,
49
+ context.http_response
50
+ )
51
+ end
51
52
  Response.new(context: context)
52
53
  end
53
54
 
@@ -197,6 +198,17 @@ module Seahorse
197
198
  end
198
199
  end
199
200
 
201
+ def span_wrapper(context, &block)
202
+ context.tracer.in_span(
203
+ 'Handler.NetHttp',
204
+ attributes: Aws::Telemetry.http_request_attrs(context)
205
+ ) do |span|
206
+ block.call
207
+ span.add_attributes(
208
+ Aws::Telemetry.http_response_attrs(context)
209
+ )
210
+ end
211
+ end
200
212
  end
201
213
  end
202
214
  end
@@ -70,6 +70,15 @@ Sets the X509::Store to verify peer certificate.
70
70
  resolve_ssl_timeout(cfg)
71
71
  end
72
72
 
73
+ option(:ssl_cert, default: nil, doc_type: OpenSSL::X509::Certificate, docstring: <<-DOCS)
74
+ Sets a client certificate when creating http connections.
75
+ DOCS
76
+
77
+
78
+ option(:ssl_key, default: nil, doc_type: OpenSSL::PKey, docstring: <<-DOCS)
79
+ Sets a client key when creating http connections.
80
+ DOCS
81
+
73
82
  option(:logger) # for backwards compat
74
83
 
75
84
  handler(Client::NetHttp::Handler, step: :send)
@@ -9,11 +9,14 @@ module Seahorse
9
9
  # @option options [required,Symbol] :operation_name (nil)
10
10
  # @option options [required,Model::Operation] :operation (nil)
11
11
  # @option options [Model::Authorizer] :authorizer (nil)
12
+ # @option options [Client] :client (nil)
12
13
  # @option options [Hash] :params ({})
13
14
  # @option options [Configuration] :config (nil)
14
15
  # @option options [Http::Request] :http_request (Http::Request.new)
15
16
  # @option options [Http::Response] :http_response (Http::Response.new)
16
- # and #rewind.
17
+ # @option options [Integer] :retries (0)
18
+ # @option options [Aws::Telemetry::TracerBase] :tracer (Aws::Telemetry::NoOpTracer.new)
19
+ # @options options [Hash] :metadata ({})
17
20
  def initialize(options = {})
18
21
  @operation_name = options[:operation_name]
19
22
  @operation = options[:operation]
@@ -24,6 +27,7 @@ module Seahorse
24
27
  @http_request = options[:http_request] || Http::Request.new
25
28
  @http_response = options[:http_response] || Http::Response.new
26
29
  @retries = 0
30
+ @tracer = options[:tracer] || Aws::Telemetry::NoOpTracer.new
27
31
  @metadata = {}
28
32
  end
29
33
 
@@ -54,6 +58,9 @@ module Seahorse
54
58
  # @return [Integer]
55
59
  attr_accessor :retries
56
60
 
61
+ # @return [Tracer]
62
+ attr_accessor :tracer
63
+
57
64
  # @return [Hash]
58
65
  attr_reader :metadata
59
66
 
@@ -0,0 +1,46 @@
1
+ module Aws
2
+ module Telemetry
3
+ class TelemetryProviderBase
4
+ def initialize: (?tracer_provider: TracerProviderBase, ?context_manager: ContextManagerBase) -> void
5
+ attr_reader tracer_provider: TracerProviderBase
6
+
7
+ attr_reader context_manager: ContextManagerBase
8
+ end
9
+
10
+ class TracerProviderBase
11
+ def tracer: (?String name) -> TracerBase
12
+ end
13
+
14
+ class TracerBase
15
+ def start_span: (String name, ?untyped with_parent, ?Hash[String, untyped] attributes, ?SpanKind kind) -> SpanBase
16
+
17
+ def in_span: (String name, ?Hash[String, untyped] attributes, ?SpanKind kind) -> SpanBase
18
+
19
+ def current_span: () -> SpanBase
20
+ end
21
+
22
+ class SpanBase
23
+ def set_attribute: (String key, untyped value) -> self
24
+ alias []= set_attribute
25
+
26
+ def add_attributes: (Hash[String, untyped] attributes) -> self
27
+
28
+ def add_event: (String name, ?Hash[String, untyped] attributes) -> self
29
+
30
+ def status=: (SpanStatus status) -> void
31
+
32
+ def finish: (?Time end_timestamp) -> self
33
+
34
+ def record_exception: (untyped exception, ?Hash[String, untyped] attributes) -> void
35
+ end
36
+
37
+ class ContextManagerBase
38
+ def current: () -> untyped
39
+
40
+ def attach: (untyped context) -> untyped
41
+
42
+ def detach: (untyped token) -> bool
43
+ end
44
+
45
+ end
46
+ end
@@ -0,0 +1,22 @@
1
+ module Aws
2
+ module Telemetry
3
+ class OTelProvider < TelemetryProviderBase
4
+ def initialize: () -> void
5
+ end
6
+
7
+ class OTelTracerProvider < TracerProviderBase
8
+ def initialize: () -> void
9
+ end
10
+
11
+ class OTelTracer < TracerBase
12
+ def initialize: (untyped tracer) -> void
13
+ end
14
+
15
+ class OTelSpan < SpanBase
16
+ def initialize: (untyped span) -> void
17
+ end
18
+
19
+ class OTelContextManager < ContextManagerBase
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,15 @@
1
+ module Aws
2
+ module Telemetry
3
+ module SpanKind
4
+ INTERNAL: :internal
5
+
6
+ SERVER: :server
7
+
8
+ CLIENT: :client
9
+
10
+ CONSUMER: :consumer
11
+
12
+ PRODUCER: :producer
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,24 @@
1
+ module Aws
2
+ module Telemetry
3
+ class SpanStatus
4
+
5
+ def self.unset: (?::String description) -> SpanStatus
6
+
7
+ def self.ok: (?::String description) -> SpanStatus
8
+
9
+ def self.error: (?::String description) -> SpanStatus
10
+
11
+ def initialize: (Integer code, ?description: ::String) -> void
12
+
13
+ attr_reader code: Integer
14
+
15
+ attr_reader description: String
16
+
17
+ OK: 0
18
+
19
+ UNSET: 1
20
+
21
+ ERROR: 2
22
+ end
23
+ end
24
+ 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.201.3
4
+ version: 3.209.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: 2024-07-23 00:00:00.000000000 Z
11
+ date: 2024-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -56,14 +56,14 @@ dependencies:
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '1.8'
59
+ version: '1.9'
60
60
  type: :runtime
61
61
  prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - "~>"
65
65
  - !ruby/object:Gem::Version
66
- version: '1.8'
66
+ version: '1.9'
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: aws-eventstream
69
69
  requirement: !ruby/object:Gem::Requirement
@@ -115,6 +115,7 @@ files:
115
115
  - lib/aws-sdk-core/cbor/cbor_engine.rb
116
116
  - lib/aws-sdk-core/cbor/decoder.rb
117
117
  - lib/aws-sdk-core/cbor/encoder.rb
118
+ - lib/aws-sdk-core/client_side_monitoring.rb
118
119
  - lib/aws-sdk-core/client_side_monitoring/publisher.rb
119
120
  - lib/aws-sdk-core/client_side_monitoring/request_metrics.rb
120
121
  - lib/aws-sdk-core/client_stubs.rb
@@ -152,6 +153,7 @@ files:
152
153
  - lib/aws-sdk-core/json/json_engine.rb
153
154
  - lib/aws-sdk-core/json/oj_engine.rb
154
155
  - lib/aws-sdk-core/json/parser.rb
156
+ - lib/aws-sdk-core/log.rb
155
157
  - lib/aws-sdk-core/log/formatter.rb
156
158
  - lib/aws-sdk-core/log/handler.rb
157
159
  - lib/aws-sdk-core/log/param_filter.rb
@@ -161,6 +163,7 @@ files:
161
163
  - lib/aws-sdk-core/pager.rb
162
164
  - lib/aws-sdk-core/param_converter.rb
163
165
  - lib/aws-sdk-core/param_validator.rb
166
+ - lib/aws-sdk-core/plugins.rb
164
167
  - lib/aws-sdk-core/plugins/api_key.rb
165
168
  - lib/aws-sdk-core/plugins/apig_authorizer_token.rb
166
169
  - lib/aws-sdk-core/plugins/apig_credentials_configuration.rb
@@ -203,6 +206,7 @@ files:
203
206
  - lib/aws-sdk-core/plugins/signature_v2.rb
204
207
  - lib/aws-sdk-core/plugins/signature_v4.rb
205
208
  - lib/aws-sdk-core/plugins/stub_responses.rb
209
+ - lib/aws-sdk-core/plugins/telemetry.rb
206
210
  - lib/aws-sdk-core/plugins/transfer_encoding.rb
207
211
  - lib/aws-sdk-core/plugins/user_agent.rb
208
212
  - lib/aws-sdk-core/process_credentials.rb
@@ -215,6 +219,7 @@ files:
215
219
  - lib/aws-sdk-core/query/param_list.rb
216
220
  - lib/aws-sdk-core/refreshing_credentials.rb
217
221
  - lib/aws-sdk-core/refreshing_token.rb
222
+ - lib/aws-sdk-core/resources.rb
218
223
  - lib/aws-sdk-core/resources/collection.rb
219
224
  - lib/aws-sdk-core/rest.rb
220
225
  - lib/aws-sdk-core/rest/content_type_handler.rb
@@ -241,6 +246,7 @@ files:
241
246
  - lib/aws-sdk-core/sso_token_provider.rb
242
247
  - lib/aws-sdk-core/static_token_provider.rb
243
248
  - lib/aws-sdk-core/structure.rb
249
+ - lib/aws-sdk-core/stubbing.rb
244
250
  - lib/aws-sdk-core/stubbing/data_applicator.rb
245
251
  - lib/aws-sdk-core/stubbing/empty_stub.rb
246
252
  - lib/aws-sdk-core/stubbing/protocols/api_gateway.rb
@@ -253,6 +259,12 @@ files:
253
259
  - lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb
254
260
  - lib/aws-sdk-core/stubbing/stub_data.rb
255
261
  - lib/aws-sdk-core/stubbing/xml_error.rb
262
+ - lib/aws-sdk-core/telemetry.rb
263
+ - lib/aws-sdk-core/telemetry/base.rb
264
+ - lib/aws-sdk-core/telemetry/no_op.rb
265
+ - lib/aws-sdk-core/telemetry/otel.rb
266
+ - lib/aws-sdk-core/telemetry/span_kind.rb
267
+ - lib/aws-sdk-core/telemetry/span_status.rb
256
268
  - lib/aws-sdk-core/token.rb
257
269
  - lib/aws-sdk-core/token_provider.rb
258
270
  - lib/aws-sdk-core/token_provider_chain.rb
@@ -361,6 +373,10 @@ files:
361
373
  - sig/aws-sdk-core/errors.rbs
362
374
  - sig/aws-sdk-core/resources/collection.rbs
363
375
  - sig/aws-sdk-core/structure.rbs
376
+ - sig/aws-sdk-core/telemetry/base.rbs
377
+ - sig/aws-sdk-core/telemetry/otel.rbs
378
+ - sig/aws-sdk-core/telemetry/span_kind.rbs
379
+ - sig/aws-sdk-core/telemetry/span_status.rbs
364
380
  - sig/aws-sdk-core/waiters/errors.rbs
365
381
  - sig/seahorse/client/base.rbs
366
382
  - sig/seahorse/client/handler_builder.rbs