aws-sdk-core 3.181.0 → 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 (168) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +413 -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/binary/decode_handler.rb +3 -9
  8. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  9. data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
  10. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  11. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  12. data/lib/aws-sdk-core/cbor/cbor_engine.rb +19 -0
  13. data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
  14. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  15. data/lib/aws-sdk-core/cbor.rb +106 -0
  16. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  17. data/lib/aws-sdk-core/client_stubs.rb +18 -14
  18. data/lib/aws-sdk-core/credential_provider.rb +1 -1
  19. data/lib/aws-sdk-core/credential_provider_chain.rb +13 -6
  20. data/lib/aws-sdk-core/credentials.rb +13 -6
  21. data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
  22. data/lib/aws-sdk-core/ecs_credentials.rb +78 -11
  23. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  24. data/lib/aws-sdk-core/endpoints/matchers.rb +18 -10
  25. data/lib/aws-sdk-core/endpoints.rb +74 -18
  26. data/lib/aws-sdk-core/error_handler.rb +41 -0
  27. data/lib/aws-sdk-core/errors.rb +12 -3
  28. data/lib/aws-sdk-core/event_emitter.rb +0 -16
  29. data/lib/aws-sdk-core/instance_profile_credentials.rb +55 -32
  30. data/lib/aws-sdk-core/json/builder.rb +8 -1
  31. data/lib/aws-sdk-core/json/error_handler.rb +15 -10
  32. data/lib/aws-sdk-core/json/handler.rb +12 -6
  33. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  34. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  35. data/lib/aws-sdk-core/json/parser.rb +33 -3
  36. data/lib/aws-sdk-core/json.rb +43 -14
  37. data/lib/aws-sdk-core/log/param_filter.rb +2 -2
  38. data/lib/aws-sdk-core/log.rb +10 -0
  39. data/lib/aws-sdk-core/lru_cache.rb +75 -0
  40. data/lib/aws-sdk-core/pageable_response.rb +1 -1
  41. data/lib/aws-sdk-core/param_validator.rb +9 -4
  42. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  43. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +6 -3
  44. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -0
  45. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
  46. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +9 -3
  47. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  48. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -1
  49. data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
  50. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  51. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  52. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  53. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  54. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  55. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
  56. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
  57. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  58. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +33 -3
  59. data/lib/aws-sdk-core/plugins/request_compression.rb +11 -2
  60. data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
  61. data/lib/aws-sdk-core/plugins/sign.rb +27 -15
  62. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  63. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  64. data/lib/aws-sdk-core/plugins/stub_responses.rb +30 -2
  65. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  66. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  67. data/lib/aws-sdk-core/plugins/user_agent.rb +70 -26
  68. data/lib/aws-sdk-core/plugins.rb +39 -0
  69. data/lib/aws-sdk-core/process_credentials.rb +47 -28
  70. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  71. data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
  72. data/lib/aws-sdk-core/query/handler.rb +4 -4
  73. data/lib/aws-sdk-core/query/param_builder.rb +2 -2
  74. data/lib/aws-sdk-core/query.rb +2 -1
  75. data/lib/aws-sdk-core/refreshing_credentials.rb +12 -6
  76. data/lib/aws-sdk-core/resources.rb +8 -0
  77. data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
  78. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  79. data/lib/aws-sdk-core/rest/request/body.rb +32 -5
  80. data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
  81. data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
  82. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
  83. data/lib/aws-sdk-core/rest/response/body.rb +15 -1
  84. data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
  85. data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
  86. data/lib/aws-sdk-core/rest.rb +1 -0
  87. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  88. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +45 -0
  89. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +84 -0
  90. data/lib/aws-sdk-core/rpc_v2/handler.rb +78 -0
  91. data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
  92. data/lib/aws-sdk-core/rpc_v2.rb +6 -0
  93. data/lib/aws-sdk-core/shared_config.rb +7 -2
  94. data/lib/aws-sdk-core/shared_credentials.rb +0 -7
  95. data/lib/aws-sdk-core/sso_credentials.rb +2 -1
  96. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +41 -0
  97. data/lib/aws-sdk-core/stubbing.rb +22 -0
  98. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  99. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  100. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  101. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  102. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  103. data/lib/aws-sdk-core/telemetry.rb +78 -0
  104. data/lib/aws-sdk-core/util.rb +39 -0
  105. data/lib/aws-sdk-core/waiters/poller.rb +10 -5
  106. data/lib/aws-sdk-core/xml/builder.rb +17 -9
  107. data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
  108. data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
  109. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  110. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  111. data/lib/aws-sdk-core.rb +82 -107
  112. data/lib/aws-sdk-sso/client.rb +119 -55
  113. data/lib/aws-sdk-sso/client_api.rb +7 -0
  114. data/lib/aws-sdk-sso/endpoint_provider.rb +30 -24
  115. data/lib/aws-sdk-sso/endpoints.rb +4 -16
  116. data/lib/aws-sdk-sso/plugins/endpoints.rb +22 -8
  117. data/lib/aws-sdk-sso/types.rb +1 -0
  118. data/lib/aws-sdk-sso.rb +15 -11
  119. data/lib/aws-sdk-ssooidc/client.rb +504 -83
  120. data/lib/aws-sdk-ssooidc/client_api.rb +83 -1
  121. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +30 -24
  122. data/lib/aws-sdk-ssooidc/endpoints.rb +14 -12
  123. data/lib/aws-sdk-ssooidc/errors.rb +52 -0
  124. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +24 -8
  125. data/lib/aws-sdk-ssooidc/types.rb +373 -51
  126. data/lib/aws-sdk-ssooidc.rb +15 -11
  127. data/lib/aws-sdk-sts/client.rb +129 -57
  128. data/lib/aws-sdk-sts/client_api.rb +15 -11
  129. data/lib/aws-sdk-sts/customizations.rb +5 -1
  130. data/lib/aws-sdk-sts/endpoint_provider.rb +2 -2
  131. data/lib/aws-sdk-sts/endpoints.rb +8 -32
  132. data/lib/aws-sdk-sts/plugins/endpoints.rb +22 -8
  133. data/lib/aws-sdk-sts/presigner.rb +1 -1
  134. data/lib/aws-sdk-sts/types.rb +19 -4
  135. data/lib/aws-sdk-sts.rb +15 -11
  136. data/lib/seahorse/client/async_base.rb +1 -1
  137. data/lib/seahorse/client/async_response.rb +19 -0
  138. data/lib/seahorse/client/base.rb +18 -7
  139. data/lib/seahorse/client/h2/handler.rb +14 -3
  140. data/lib/seahorse/client/handler.rb +1 -1
  141. data/lib/seahorse/client/net_http/connection_pool.rb +11 -11
  142. data/lib/seahorse/client/net_http/handler.rb +21 -9
  143. data/lib/seahorse/client/net_http/patches.rb +1 -4
  144. data/lib/seahorse/client/plugin.rb +9 -0
  145. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  146. data/lib/seahorse/client/plugins/h2.rb +3 -3
  147. data/lib/seahorse/client/plugins/net_http.rb +57 -16
  148. data/lib/seahorse/client/request_context.rb +8 -1
  149. data/lib/seahorse/model/shapes.rb +2 -2
  150. data/sig/aws-sdk-core/client_stubs.rbs +10 -0
  151. data/sig/aws-sdk-core/errors.rbs +22 -0
  152. data/sig/aws-sdk-core/resources/collection.rbs +21 -0
  153. data/sig/aws-sdk-core/structure.rbs +4 -0
  154. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  155. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  156. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  157. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  158. data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
  159. data/sig/aws-sdk-core.rbs +7 -0
  160. data/sig/seahorse/client/base.rbs +25 -0
  161. data/sig/seahorse/client/handler_builder.rbs +16 -0
  162. data/sig/seahorse/client/response.rbs +61 -0
  163. metadata +59 -17
  164. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  165. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  166. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  167. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  168. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -13,16 +13,7 @@ unless Module.const_defined?(:Aws)
13
13
  require 'aws-sigv4'
14
14
  end
15
15
 
16
- require_relative 'aws-sdk-ssooidc/types'
17
- require_relative 'aws-sdk-ssooidc/client_api'
18
- require_relative 'aws-sdk-ssooidc/plugins/endpoints.rb'
19
- require_relative 'aws-sdk-ssooidc/client'
20
- require_relative 'aws-sdk-ssooidc/errors'
21
- require_relative 'aws-sdk-ssooidc/resource'
22
- require_relative 'aws-sdk-ssooidc/endpoint_parameters'
23
- require_relative 'aws-sdk-ssooidc/endpoint_provider'
24
- require_relative 'aws-sdk-ssooidc/endpoints'
25
- require_relative 'aws-sdk-ssooidc/customizations'
16
+ Aws::Plugins::GlobalConfiguration.add_identifier(:ssooidc)
26
17
 
27
18
  # This module provides support for AWS SSO OIDC. This module is available in the
28
19
  # `aws-sdk-core` gem.
@@ -53,7 +44,20 @@ require_relative 'aws-sdk-ssooidc/customizations'
53
44
  #
54
45
  # @!group service
55
46
  module Aws::SSOOIDC
47
+ autoload :Types, 'aws-sdk-ssooidc/types'
48
+ autoload :ClientApi, 'aws-sdk-ssooidc/client_api'
49
+ module Plugins
50
+ autoload :Endpoints, 'aws-sdk-ssooidc/plugins/endpoints.rb'
51
+ end
52
+ autoload :Client, 'aws-sdk-ssooidc/client'
53
+ autoload :Errors, 'aws-sdk-ssooidc/errors'
54
+ autoload :Resource, 'aws-sdk-ssooidc/resource'
55
+ autoload :EndpointParameters, 'aws-sdk-ssooidc/endpoint_parameters'
56
+ autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
+ autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
56
58
 
57
- GEM_VERSION = '3.181.0'
59
+ GEM_VERSION = '3.209.1'
58
60
 
59
61
  end
62
+
63
+ require_relative 'aws-sdk-ssooidc/customizations'
@@ -22,6 +22,7 @@ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
22
  require 'aws-sdk-core/plugins/response_paging.rb'
23
23
  require 'aws-sdk-core/plugins/stub_responses.rb'
24
24
  require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/invocation_id.rb'
25
26
  require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
27
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
28
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
@@ -31,12 +32,11 @@ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
32
  require 'aws-sdk-core/plugins/request_compression.rb'
32
33
  require 'aws-sdk-core/plugins/defaults_mode.rb'
33
34
  require 'aws-sdk-core/plugins/recursion_detection.rb'
35
+ require 'aws-sdk-core/plugins/telemetry.rb'
34
36
  require 'aws-sdk-core/plugins/sign.rb'
35
37
  require 'aws-sdk-core/plugins/protocols/query.rb'
36
38
  require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
37
39
 
38
- Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
39
-
40
40
  module Aws::STS
41
41
  # An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
42
42
  #
@@ -73,6 +73,7 @@ module Aws::STS
73
73
  add_plugin(Aws::Plugins::ResponsePaging)
74
74
  add_plugin(Aws::Plugins::StubResponses)
75
75
  add_plugin(Aws::Plugins::IdempotencyToken)
76
+ add_plugin(Aws::Plugins::InvocationId)
76
77
  add_plugin(Aws::Plugins::JsonvalueConverter)
77
78
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
78
79
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
@@ -82,6 +83,7 @@ module Aws::STS
82
83
  add_plugin(Aws::Plugins::RequestCompression)
83
84
  add_plugin(Aws::Plugins::DefaultsMode)
84
85
  add_plugin(Aws::Plugins::RecursionDetection)
86
+ add_plugin(Aws::Plugins::Telemetry)
85
87
  add_plugin(Aws::Plugins::Sign)
86
88
  add_plugin(Aws::Plugins::Protocols::Query)
87
89
  add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
@@ -89,6 +91,11 @@ module Aws::STS
89
91
 
90
92
  # @overload initialize(options)
91
93
  # @param [Hash] options
94
+ #
95
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
96
+ # A list of plugins to apply to the client. Each plugin is either a
97
+ # class name or an instance of a plugin class.
98
+ #
92
99
  # @option options [required, Aws::CredentialProvider] :credentials
93
100
  # Your AWS credentials. This can be an instance of any one of the
94
101
  # following classes:
@@ -123,13 +130,15 @@ module Aws::STS
123
130
  # locations will be searched for credentials:
124
131
  #
125
132
  # * `Aws.config[:credentials]`
126
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
127
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
133
+ # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
134
+ # `:account_id` options.
135
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
136
+ # ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
128
137
  # * `~/.aws/credentials`
129
138
  # * `~/.aws/config`
130
139
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
131
140
  # are very aggressive. Construct and pass an instance of
132
- # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
141
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
133
142
  # enable retries and extended timeouts. Instance profile credential
134
143
  # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
135
144
  # to true.
@@ -148,6 +157,8 @@ module Aws::STS
148
157
  #
149
158
  # @option options [String] :access_key_id
150
159
  #
160
+ # @option options [String] :account_id
161
+ #
151
162
  # @option options [Boolean] :active_endpoint_cache (false)
152
163
  # When set to `true`, a thread polling for endpoints will be running in
153
164
  # the background every 60 secs (default). Defaults to `false`.
@@ -198,10 +209,16 @@ module Aws::STS
198
209
  # When set to 'true' the request body will not be compressed
199
210
  # for supported operations.
200
211
  #
201
- # @option options [String] :endpoint
202
- # The client endpoint is normally constructed from the `:region`
203
- # option. You should only configure an `:endpoint` when connecting
204
- # to test or custom endpoints. This should be a valid HTTP(S) URI.
212
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
213
+ # Normally you should not configure the `:endpoint` option
214
+ # directly. This is normally constructed from the `:region`
215
+ # option. Configuring `:endpoint` is normally reserved for
216
+ # connecting to test or custom endpoints. The endpoint should
217
+ # be a URI formatted like:
218
+ #
219
+ # 'http://example.com'
220
+ # 'https://example.com'
221
+ # 'http://example.com:123'
205
222
  #
206
223
  # @option options [Integer] :endpoint_cache_max_entries (1000)
207
224
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -291,16 +308,25 @@ module Aws::STS
291
308
  # throttling. This is a provisional mode that may change behavior
292
309
  # in the future.
293
310
  #
294
- #
295
311
  # @option options [String] :sdk_ua_app_id
296
312
  # A unique and opaque application ID that is appended to the
297
- # User-Agent header as app/<sdk_ua_app_id>. It should have a
298
- # maximum length of 50.
313
+ # User-Agent header as app/sdk_ua_app_id. It should have a
314
+ # maximum length of 50. This variable is sourced from environment
315
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
299
316
  #
300
317
  # @option options [String] :secret_access_key
301
318
  #
302
319
  # @option options [String] :session_token
303
320
  #
321
+ # @option options [Array] :sigv4a_signing_region_set
322
+ # A list of regions that should be signed with SigV4a signing. When
323
+ # not passed, a default `:sigv4a_signing_region_set` is searched for
324
+ # in the following locations:
325
+ #
326
+ # * `Aws.config[:sigv4a_signing_region_set]`
327
+ # * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
328
+ # * `~/.aws/config`
329
+ #
304
330
  # @option options [String] :sts_regional_endpoints ("regional")
305
331
  # Passing in 'regional' to enable regional endpoint for STS for all supported
306
332
  # regions (except 'aws-global'). Using 'legacy' mode will force all legacy
@@ -315,6 +341,16 @@ module Aws::STS
315
341
  # ** Please note ** When response stubbing is enabled, no HTTP
316
342
  # requests are made, and retries are disabled.
317
343
  #
344
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
345
+ # Allows you to provide a telemetry provider, which is used to
346
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
347
+ # will not record or emit any telemetry data. The SDK supports the
348
+ # following telemetry providers:
349
+ #
350
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
351
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
352
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
353
+ #
318
354
  # @option options [Aws::TokenProvider] :token_provider
319
355
  # A Bearer Token Provider. This can be an instance of any one of the
320
356
  # following classes:
@@ -342,52 +378,75 @@ module Aws::STS
342
378
  # sending the request.
343
379
  #
344
380
  # @option options [Aws::STS::EndpointProvider] :endpoint_provider
345
- # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::STS::EndpointParameters`
346
- #
347
- # @option options [URI::HTTP,String] :http_proxy A proxy to send
348
- # requests through. Formatted like 'http://proxy.com:123'.
349
- #
350
- # @option options [Float] :http_open_timeout (15) The number of
351
- # seconds to wait when opening a HTTP session before raising a
352
- # `Timeout::Error`.
353
- #
354
- # @option options [Float] :http_read_timeout (60) The default
355
- # number of seconds to wait for response data. This value can
356
- # safely be set per-request on the session.
357
- #
358
- # @option options [Float] :http_idle_timeout (5) The number of
359
- # seconds a connection is allowed to sit idle before it is
360
- # considered stale. Stale connections are closed and removed
361
- # from the pool before making a request.
381
+ # The endpoint provider used to resolve endpoints. Any object that responds to
382
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
383
+ # `Aws::STS::EndpointParameters`.
384
+ #
385
+ # @option options [Float] :http_continue_timeout (1)
386
+ # The number of seconds to wait for a 100-continue response before sending the
387
+ # request body. This option has no effect unless the request has "Expect"
388
+ # header set to "100-continue". Defaults to `nil` which disables this
389
+ # behaviour. This value can safely be set per request on the session.
390
+ #
391
+ # @option options [Float] :http_idle_timeout (5)
392
+ # The number of seconds a connection is allowed to sit idle before it
393
+ # is considered stale. Stale connections are closed and removed from the
394
+ # pool before making a request.
395
+ #
396
+ # @option options [Float] :http_open_timeout (15)
397
+ # The default number of seconds to wait for response data.
398
+ # This value can safely be set per-request on the session.
399
+ #
400
+ # @option options [URI::HTTP,String] :http_proxy
401
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
402
+ #
403
+ # @option options [Float] :http_read_timeout (60)
404
+ # The default number of seconds to wait for response data.
405
+ # This value can safely be set per-request on the session.
406
+ #
407
+ # @option options [Boolean] :http_wire_trace (false)
408
+ # When `true`, HTTP debug output will be sent to the `:logger`.
409
+ #
410
+ # @option options [Proc] :on_chunk_received
411
+ # When a Proc object is provided, it will be used as callback when each chunk
412
+ # of the response body is received. It provides three arguments: the chunk,
413
+ # the number of bytes received, and the total number of
414
+ # bytes in the response (or nil if the server did not send a `content-length`).
415
+ #
416
+ # @option options [Proc] :on_chunk_sent
417
+ # When a Proc object is provided, it will be used as callback when each chunk
418
+ # of the request body is sent. It provides three arguments: the chunk,
419
+ # the number of bytes read from the body, and the total number of
420
+ # bytes in the body.
421
+ #
422
+ # @option options [Boolean] :raise_response_errors (true)
423
+ # When `true`, response errors are raised.
424
+ #
425
+ # @option options [String] :ssl_ca_bundle
426
+ # Full path to the SSL certificate authority bundle file that should be used when
427
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
428
+ # `:ssl_ca_directory` the the system default will be used if available.
429
+ #
430
+ # @option options [String] :ssl_ca_directory
431
+ # Full path of the directory that contains the unbundled SSL certificate
432
+ # authority files for verifying peer certificates. If you do
433
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
434
+ # default will be used if available.
362
435
  #
363
- # @option options [Float] :http_continue_timeout (1) The number of
364
- # seconds to wait for a 100-continue response before sending the
365
- # request body. This option has no effect unless the request has
366
- # "Expect" header set to "100-continue". Defaults to `nil` which
367
- # disables this behaviour. This value can safely be set per
368
- # request on the session.
436
+ # @option options [String] :ssl_ca_store
437
+ # Sets the X509::Store to verify peer certificate.
369
438
  #
370
- # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
371
- # in seconds.
439
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
440
+ # Sets a client certificate when creating http connections.
372
441
  #
373
- # @option options [Boolean] :http_wire_trace (false) When `true`,
374
- # HTTP debug output will be sent to the `:logger`.
442
+ # @option options [OpenSSL::PKey] :ssl_key
443
+ # Sets a client key when creating http connections.
375
444
  #
376
- # @option options [Boolean] :ssl_verify_peer (true) When `true`,
377
- # SSL peer certificates are verified when establishing a
378
- # connection.
445
+ # @option options [Float] :ssl_timeout
446
+ # Sets the SSL timeout in seconds
379
447
  #
380
- # @option options [String] :ssl_ca_bundle Full path to the SSL
381
- # certificate authority bundle file that should be used when
382
- # verifying peer certificates. If you do not pass
383
- # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
384
- # will be used if available.
385
- #
386
- # @option options [String] :ssl_ca_directory Full path of the
387
- # directory that contains the unbundled SSL certificate
388
- # authority files for verifying peer certificates. If you do
389
- # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
390
- # system default will be used if available.
448
+ # @option options [Boolean] :ssl_verify_peer (true)
449
+ # When `true`, SSL peer certificates are verified when establishing a connection.
391
450
  #
392
451
  def initialize(*args)
393
452
  super
@@ -767,7 +826,15 @@ module Aws::STS
767
826
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
768
827
  #
769
828
  # @option params [Array<Types::ProvidedContext>] :provided_contexts
770
- # Reserved for future use.
829
+ # A list of previously acquired trusted context assertions in the format
830
+ # of a JSON array. The trusted context assertion is signed and encrypted
831
+ # by Amazon Web Services STS.
832
+ #
833
+ # The following is an example of a `ProvidedContext` value that includes
834
+ # a single trusted context assertion and the ARN of the context provider
835
+ # from which the trusted context assertion was generated.
836
+ #
837
+ # `[\{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"\}]`
771
838
  #
772
839
  # @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
773
840
  #
@@ -829,7 +896,7 @@ module Aws::STS
829
896
  # arn: "arnType",
830
897
  # },
831
898
  # ],
832
- # policy: "sessionPolicyDocumentType",
899
+ # policy: "unrestrictedSessionPolicyDocumentType",
833
900
  # duration_seconds: 1,
834
901
  # tags: [
835
902
  # {
@@ -2337,14 +2404,19 @@ module Aws::STS
2337
2404
  # @api private
2338
2405
  def build_request(operation_name, params = {})
2339
2406
  handlers = @handlers.for(operation_name)
2407
+ tracer = config.telemetry_provider.tracer_provider.tracer(
2408
+ Aws::Telemetry.module_to_tracer_name('Aws::STS')
2409
+ )
2340
2410
  context = Seahorse::Client::RequestContext.new(
2341
2411
  operation_name: operation_name,
2342
2412
  operation: config.api.operation(operation_name),
2343
2413
  client: self,
2344
2414
  params: params,
2345
- config: config)
2415
+ config: config,
2416
+ tracer: tracer
2417
+ )
2346
2418
  context[:gem_name] = 'aws-sdk-core'
2347
- context[:gem_version] = '3.181.0'
2419
+ context[:gem_version] = '3.209.1'
2348
2420
  Seahorse::Client::Request.new(handlers, context)
2349
2421
  end
2350
2422
 
@@ -7,6 +7,7 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
+
10
11
  module Aws::STS
11
12
  # @api private
12
13
  module ClientApi
@@ -24,7 +25,7 @@ module Aws::STS
24
25
  Credentials = Shapes::StructureShape.new(name: 'Credentials')
25
26
  DecodeAuthorizationMessageRequest = Shapes::StructureShape.new(name: 'DecodeAuthorizationMessageRequest')
26
27
  DecodeAuthorizationMessageResponse = Shapes::StructureShape.new(name: 'DecodeAuthorizationMessageResponse')
27
- ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
28
+ ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException', error: {"code"=>"ExpiredTokenException", "httpStatusCode"=>400, "senderFault"=>true})
28
29
  FederatedUser = Shapes::StructureShape.new(name: 'FederatedUser')
29
30
  GetAccessKeyInfoRequest = Shapes::StructureShape.new(name: 'GetAccessKeyInfoRequest')
30
31
  GetAccessKeyInfoResponse = Shapes::StructureShape.new(name: 'GetAccessKeyInfoResponse')
@@ -34,18 +35,18 @@ module Aws::STS
34
35
  GetFederationTokenResponse = Shapes::StructureShape.new(name: 'GetFederationTokenResponse')
35
36
  GetSessionTokenRequest = Shapes::StructureShape.new(name: 'GetSessionTokenRequest')
36
37
  GetSessionTokenResponse = Shapes::StructureShape.new(name: 'GetSessionTokenResponse')
37
- IDPCommunicationErrorException = Shapes::StructureShape.new(name: 'IDPCommunicationErrorException')
38
- IDPRejectedClaimException = Shapes::StructureShape.new(name: 'IDPRejectedClaimException')
39
- InvalidAuthorizationMessageException = Shapes::StructureShape.new(name: 'InvalidAuthorizationMessageException')
40
- InvalidIdentityTokenException = Shapes::StructureShape.new(name: 'InvalidIdentityTokenException')
38
+ IDPCommunicationErrorException = Shapes::StructureShape.new(name: 'IDPCommunicationErrorException', error: {"code"=>"IDPCommunicationError", "httpStatusCode"=>400, "senderFault"=>true})
39
+ IDPRejectedClaimException = Shapes::StructureShape.new(name: 'IDPRejectedClaimException', error: {"code"=>"IDPRejectedClaim", "httpStatusCode"=>403, "senderFault"=>true})
40
+ InvalidAuthorizationMessageException = Shapes::StructureShape.new(name: 'InvalidAuthorizationMessageException', error: {"code"=>"InvalidAuthorizationMessageException", "httpStatusCode"=>400, "senderFault"=>true})
41
+ InvalidIdentityTokenException = Shapes::StructureShape.new(name: 'InvalidIdentityTokenException', error: {"code"=>"InvalidIdentityToken", "httpStatusCode"=>400, "senderFault"=>true})
41
42
  Issuer = Shapes::StringShape.new(name: 'Issuer')
42
- MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException')
43
+ MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException', error: {"code"=>"MalformedPolicyDocument", "httpStatusCode"=>400, "senderFault"=>true})
43
44
  NameQualifier = Shapes::StringShape.new(name: 'NameQualifier')
44
- PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException')
45
+ PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException', error: {"code"=>"PackedPolicyTooLarge", "httpStatusCode"=>400, "senderFault"=>true})
45
46
  PolicyDescriptorType = Shapes::StructureShape.new(name: 'PolicyDescriptorType')
46
47
  ProvidedContext = Shapes::StructureShape.new(name: 'ProvidedContext')
47
48
  ProvidedContextsListType = Shapes::ListShape.new(name: 'ProvidedContextsListType')
48
- RegionDisabledException = Shapes::StructureShape.new(name: 'RegionDisabledException')
49
+ RegionDisabledException = Shapes::StructureShape.new(name: 'RegionDisabledException', error: {"code"=>"RegionDisabledException", "httpStatusCode"=>403, "senderFault"=>true})
49
50
  SAMLAssertionType = Shapes::StringShape.new(name: 'SAMLAssertionType')
50
51
  Subject = Shapes::StringShape.new(name: 'Subject')
51
52
  SubjectType = Shapes::StringShape.new(name: 'SubjectType')
@@ -84,6 +85,7 @@ module Aws::STS
84
85
  tagValueType = Shapes::StringShape.new(name: 'tagValueType')
85
86
  tokenCodeType = Shapes::StringShape.new(name: 'tokenCodeType')
86
87
  tokenType = Shapes::StringShape.new(name: 'tokenType')
88
+ unrestrictedSessionPolicyDocumentType = Shapes::StringShape.new(name: 'unrestrictedSessionPolicyDocumentType')
87
89
  urlType = Shapes::StringShape.new(name: 'urlType')
88
90
  userIdType = Shapes::StringShape.new(name: 'userIdType')
89
91
  userNameType = Shapes::StringShape.new(name: 'userNameType')
@@ -92,7 +94,7 @@ module Aws::STS
92
94
  AssumeRoleRequest.add_member(:role_arn, Shapes::ShapeRef.new(shape: arnType, required: true, location_name: "RoleArn"))
93
95
  AssumeRoleRequest.add_member(:role_session_name, Shapes::ShapeRef.new(shape: roleSessionNameType, required: true, location_name: "RoleSessionName"))
94
96
  AssumeRoleRequest.add_member(:policy_arns, Shapes::ShapeRef.new(shape: policyDescriptorListType, location_name: "PolicyArns"))
95
- AssumeRoleRequest.add_member(:policy, Shapes::ShapeRef.new(shape: sessionPolicyDocumentType, location_name: "Policy"))
97
+ AssumeRoleRequest.add_member(:policy, Shapes::ShapeRef.new(shape: unrestrictedSessionPolicyDocumentType, location_name: "Policy"))
96
98
  AssumeRoleRequest.add_member(:duration_seconds, Shapes::ShapeRef.new(shape: roleDurationSecondsType, location_name: "DurationSeconds"))
97
99
  AssumeRoleRequest.add_member(:tags, Shapes::ShapeRef.new(shape: tagListType, location_name: "Tags"))
98
100
  AssumeRoleRequest.add_member(:transitive_tag_keys, Shapes::ShapeRef.new(shape: tagKeyListType, location_name: "TransitiveTagKeys"))
@@ -250,9 +252,11 @@ module Aws::STS
250
252
 
251
253
  api.metadata = {
252
254
  "apiVersion" => "2011-06-15",
255
+ "auth" => ["aws.auth#sigv4"],
253
256
  "endpointPrefix" => "sts",
254
257
  "globalEndpoint" => "sts.amazonaws.com",
255
258
  "protocol" => "query",
259
+ "protocols" => ["query"],
256
260
  "serviceAbbreviation" => "AWS STS",
257
261
  "serviceFullName" => "AWS Security Token Service",
258
262
  "serviceId" => "STS",
@@ -277,7 +281,7 @@ module Aws::STS
277
281
  o.name = "AssumeRoleWithSAML"
278
282
  o.http_method = "POST"
279
283
  o.http_request_uri = "/"
280
- o['authtype'] = "none"
284
+ o['auth'] = ["smithy.api#noAuth"]
281
285
  o.input = Shapes::ShapeRef.new(shape: AssumeRoleWithSAMLRequest)
282
286
  o.output = Shapes::ShapeRef.new(shape: AssumeRoleWithSAMLResponse)
283
287
  o.errors << Shapes::ShapeRef.new(shape: MalformedPolicyDocumentException)
@@ -292,7 +296,7 @@ module Aws::STS
292
296
  o.name = "AssumeRoleWithWebIdentity"
293
297
  o.http_method = "POST"
294
298
  o.http_request_uri = "/"
295
- o['authtype'] = "none"
299
+ o['auth'] = ["smithy.api#noAuth"]
296
300
  o.input = Shapes::ShapeRef.new(shape: AssumeRoleWithWebIdentityRequest)
297
301
  o.output = Shapes::ShapeRef.new(shape: AssumeRoleWithWebIdentityResponse)
298
302
  o.errors << Shapes::ShapeRef.new(shape: MalformedPolicyDocumentException)
@@ -1,4 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # utility classes
4
- require 'aws-sdk-sts/presigner'
4
+ module Aws
5
+ module STS
6
+ autoload :Presigner, 'aws-sdk-sts/presigner'
7
+ end
8
+ end
@@ -84,8 +84,8 @@ module Aws::STS
84
84
  raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
85
85
  end
86
86
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
87
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
88
- if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
87
+ if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
88
+ if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
89
89
  return Aws::Endpoints::Endpoint.new(url: "https://sts.#{region}.amazonaws.com", headers: {}, properties: {})
90
90
  end
91
91
  return Aws::Endpoints::Endpoint.new(url: "https://sts-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
@@ -14,14 +14,11 @@ module Aws::STS
14
14
 
15
15
  class AssumeRole
16
16
  def self.build(context)
17
- unless context.config.regional_endpoint
18
- endpoint = context.config.endpoint.to_s
19
- end
20
17
  Aws::STS::EndpointParameters.new(
21
18
  region: context.config.region,
22
19
  use_dual_stack: context.config.use_dualstack_endpoint,
23
20
  use_fips: context.config.use_fips_endpoint,
24
- endpoint: endpoint,
21
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
25
22
  use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
26
23
  )
27
24
  end
@@ -29,14 +26,11 @@ module Aws::STS
29
26
 
30
27
  class AssumeRoleWithSAML
31
28
  def self.build(context)
32
- unless context.config.regional_endpoint
33
- endpoint = context.config.endpoint.to_s
34
- end
35
29
  Aws::STS::EndpointParameters.new(
36
30
  region: context.config.region,
37
31
  use_dual_stack: context.config.use_dualstack_endpoint,
38
32
  use_fips: context.config.use_fips_endpoint,
39
- endpoint: endpoint,
33
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
40
34
  use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
41
35
  )
42
36
  end
@@ -44,14 +38,11 @@ module Aws::STS
44
38
 
45
39
  class AssumeRoleWithWebIdentity
46
40
  def self.build(context)
47
- unless context.config.regional_endpoint
48
- endpoint = context.config.endpoint.to_s
49
- end
50
41
  Aws::STS::EndpointParameters.new(
51
42
  region: context.config.region,
52
43
  use_dual_stack: context.config.use_dualstack_endpoint,
53
44
  use_fips: context.config.use_fips_endpoint,
54
- endpoint: endpoint,
45
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
55
46
  use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
56
47
  )
57
48
  end
@@ -59,14 +50,11 @@ module Aws::STS
59
50
 
60
51
  class DecodeAuthorizationMessage
61
52
  def self.build(context)
62
- unless context.config.regional_endpoint
63
- endpoint = context.config.endpoint.to_s
64
- end
65
53
  Aws::STS::EndpointParameters.new(
66
54
  region: context.config.region,
67
55
  use_dual_stack: context.config.use_dualstack_endpoint,
68
56
  use_fips: context.config.use_fips_endpoint,
69
- endpoint: endpoint,
57
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
70
58
  use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
71
59
  )
72
60
  end
@@ -74,14 +62,11 @@ module Aws::STS
74
62
 
75
63
  class GetAccessKeyInfo
76
64
  def self.build(context)
77
- unless context.config.regional_endpoint
78
- endpoint = context.config.endpoint.to_s
79
- end
80
65
  Aws::STS::EndpointParameters.new(
81
66
  region: context.config.region,
82
67
  use_dual_stack: context.config.use_dualstack_endpoint,
83
68
  use_fips: context.config.use_fips_endpoint,
84
- endpoint: endpoint,
69
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
85
70
  use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
86
71
  )
87
72
  end
@@ -89,14 +74,11 @@ module Aws::STS
89
74
 
90
75
  class GetCallerIdentity
91
76
  def self.build(context)
92
- unless context.config.regional_endpoint
93
- endpoint = context.config.endpoint.to_s
94
- end
95
77
  Aws::STS::EndpointParameters.new(
96
78
  region: context.config.region,
97
79
  use_dual_stack: context.config.use_dualstack_endpoint,
98
80
  use_fips: context.config.use_fips_endpoint,
99
- endpoint: endpoint,
81
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
100
82
  use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
101
83
  )
102
84
  end
@@ -104,14 +86,11 @@ module Aws::STS
104
86
 
105
87
  class GetFederationToken
106
88
  def self.build(context)
107
- unless context.config.regional_endpoint
108
- endpoint = context.config.endpoint.to_s
109
- end
110
89
  Aws::STS::EndpointParameters.new(
111
90
  region: context.config.region,
112
91
  use_dual_stack: context.config.use_dualstack_endpoint,
113
92
  use_fips: context.config.use_fips_endpoint,
114
- endpoint: endpoint,
93
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
115
94
  use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
116
95
  )
117
96
  end
@@ -119,14 +98,11 @@ module Aws::STS
119
98
 
120
99
  class GetSessionToken
121
100
  def self.build(context)
122
- unless context.config.regional_endpoint
123
- endpoint = context.config.endpoint.to_s
124
- end
125
101
  Aws::STS::EndpointParameters.new(
126
102
  region: context.config.region,
127
103
  use_dual_stack: context.config.use_dualstack_endpoint,
128
104
  use_fips: context.config.use_fips_endpoint,
129
- endpoint: endpoint,
105
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
130
106
  use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
131
107
  )
132
108
  end
@@ -14,35 +14,49 @@ module Aws::STS
14
14
  option(
15
15
  :endpoint_provider,
16
16
  doc_type: 'Aws::STS::EndpointProvider',
17
- docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
- 'object that responds to `#resolve_endpoint(parameters)` '\
19
- 'where `parameters` is a Struct similar to '\
20
- '`Aws::STS::EndpointParameters`'
21
- ) do |cfg|
17
+ rbs_type: 'untyped',
18
+ docstring: <<~DOCS) do |_cfg|
19
+ The endpoint provider used to resolve endpoints. Any object that responds to
20
+ `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
21
+ `Aws::STS::EndpointParameters`.
22
+ DOCS
22
23
  Aws::STS::EndpointProvider.new
23
24
  end
24
25
 
25
26
  # @api private
26
27
  class Handler < Seahorse::Client::Handler
27
28
  def call(context)
28
- # If endpoint was discovered, do not resolve or apply the endpoint.
29
29
  unless context[:discovered_endpoint]
30
30
  params = parameters_for_operation(context)
31
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
32
 
33
33
  context.http_request.endpoint = endpoint.url
34
34
  apply_endpoint_headers(context, endpoint.headers)
35
+
36
+ context[:endpoint_params] = params
37
+ context[:endpoint_properties] = endpoint.properties
35
38
  end
36
39
 
37
- context[:endpoint_params] = params
38
40
  context[:auth_scheme] =
39
41
  Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
42
 
41
- @handler.call(context)
43
+ with_metrics(context) { @handler.call(context) }
42
44
  end
43
45
 
44
46
  private
45
47
 
48
+ def with_metrics(context, &block)
49
+ metrics = []
50
+ metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
51
+ if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
52
+ metrics << 'SIGV4A_SIGNING'
53
+ end
54
+ if context.config.credentials&.credentials&.account_id
55
+ metrics << 'RESOLVED_ACCOUNT_ID'
56
+ end
57
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
58
+ end
59
+
46
60
  def apply_endpoint_headers(context, headers)
47
61
  headers.each do |key, values|
48
62
  value = values
@@ -35,7 +35,7 @@ module Aws
35
35
  # )
36
36
  #
37
37
  # This can be easily converted to a token used by the EKS service:
38
- # {https://ruby-doc.org/stdlib-2.3.1/libdoc/base64/rdoc/Base64.html#method-i-encode64}
38
+ # {https://docs.ruby-lang.org/en/3.2/Base64.html#method-i-encode64}
39
39
  # "k8s-aws-v1." + Base64.urlsafe_encode64(url).chomp("==")
40
40
  def get_caller_identity_presigned_url(options = {})
41
41
  req = @client.build_request(:get_caller_identity, {})