aws-sdk-core 3.201.2 → 3.226.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 (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +319 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +1 -2
  5. data/lib/aws-defaults.rb +4 -1
  6. data/lib/aws-sdk-core/arn.rb +1 -3
  7. data/lib/aws-sdk-core/assume_role_credentials.rb +13 -5
  8. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +14 -7
  9. data/lib/aws-sdk-core/cbor/decoder.rb +0 -2
  10. data/lib/aws-sdk-core/cbor/encoder.rb +2 -2
  11. data/lib/aws-sdk-core/cbor.rb +3 -56
  12. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  13. data/lib/aws-sdk-core/client_stubs.rb +29 -55
  14. data/lib/aws-sdk-core/credential_provider.rb +4 -0
  15. data/lib/aws-sdk-core/credential_provider_chain.rb +35 -8
  16. data/lib/aws-sdk-core/credentials.rb +19 -6
  17. data/lib/aws-sdk-core/ecs_credentials.rb +1 -0
  18. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  19. data/lib/aws-sdk-core/endpoints/matchers.rb +3 -9
  20. data/lib/aws-sdk-core/endpoints.rb +13 -3
  21. data/lib/aws-sdk-core/errors.rb +2 -2
  22. data/lib/aws-sdk-core/event_emitter.rb +1 -1
  23. data/lib/aws-sdk-core/instance_profile_credentials.rb +1 -0
  24. data/lib/aws-sdk-core/json/error_handler.rb +2 -1
  25. data/lib/aws-sdk-core/json/handler.rb +1 -0
  26. data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
  27. data/lib/aws-sdk-core/log.rb +10 -0
  28. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -170
  29. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
  30. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +7 -3
  31. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
  32. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
  33. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +44 -24
  34. data/lib/aws-sdk-core/plugins/sign.rb +18 -5
  35. data/lib/aws-sdk-core/plugins/stub_responses.rb +52 -9
  36. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  37. data/lib/aws-sdk-core/plugins/user_agent.rb +48 -9
  38. data/lib/aws-sdk-core/plugins.rb +39 -0
  39. data/lib/aws-sdk-core/process_credentials.rb +3 -2
  40. data/lib/aws-sdk-core/resources.rb +8 -0
  41. data/lib/aws-sdk-core/rest/request/headers.rb +3 -3
  42. data/lib/aws-sdk-core/rpc_v2/builder.rb +1 -1
  43. data/lib/aws-sdk-core/{cbor → rpc_v2}/cbor_engine.rb +4 -5
  44. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +3 -1
  45. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +3 -2
  46. data/lib/aws-sdk-core/rpc_v2/handler.rb +7 -2
  47. data/lib/aws-sdk-core/rpc_v2/parser.rb +9 -1
  48. data/lib/aws-sdk-core/rpc_v2.rb +65 -2
  49. data/lib/aws-sdk-core/shared_config.rb +77 -22
  50. data/lib/aws-sdk-core/shared_credentials.rb +1 -7
  51. data/lib/aws-sdk-core/sso_credentials.rb +4 -1
  52. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
  53. data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
  54. data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
  55. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
  56. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
  57. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
  58. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +13 -15
  59. data/lib/aws-sdk-core/stubbing.rb +22 -0
  60. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  61. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  62. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  63. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  64. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  65. data/lib/aws-sdk-core/telemetry.rb +78 -0
  66. data/lib/aws-sdk-core/util.rb +2 -1
  67. data/lib/aws-sdk-core/waiters/poller.rb +9 -4
  68. data/lib/aws-sdk-core/xml/error_handler.rb +2 -1
  69. data/lib/aws-sdk-core.rb +82 -112
  70. data/lib/aws-sdk-sso/client.rb +86 -37
  71. data/lib/aws-sdk-sso/client_api.rb +1 -0
  72. data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
  73. data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
  74. data/lib/aws-sdk-sso/endpoints.rb +2 -54
  75. data/lib/aws-sdk-sso/plugins/endpoints.rb +19 -20
  76. data/lib/aws-sdk-sso/types.rb +1 -0
  77. data/lib/aws-sdk-sso.rb +15 -11
  78. data/lib/aws-sdk-ssooidc/client.rb +123 -57
  79. data/lib/aws-sdk-ssooidc/client_api.rb +7 -0
  80. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
  81. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
  82. data/lib/aws-sdk-ssooidc/endpoints.rb +2 -54
  83. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +19 -20
  84. data/lib/aws-sdk-ssooidc/types.rb +49 -16
  85. data/lib/aws-sdk-ssooidc.rb +15 -11
  86. data/lib/aws-sdk-sts/client.rb +294 -89
  87. data/lib/aws-sdk-sts/client_api.rb +34 -8
  88. data/lib/aws-sdk-sts/customizations.rb +5 -1
  89. data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
  90. data/lib/aws-sdk-sts/endpoint_provider.rb +50 -55
  91. data/lib/aws-sdk-sts/endpoints.rb +2 -118
  92. data/lib/aws-sdk-sts/errors.rb +16 -0
  93. data/lib/aws-sdk-sts/plugins/endpoints.rb +19 -28
  94. data/lib/aws-sdk-sts/types.rb +171 -28
  95. data/lib/aws-sdk-sts.rb +15 -11
  96. data/lib/seahorse/client/async_base.rb +4 -5
  97. data/lib/seahorse/client/base.rb +0 -14
  98. data/lib/seahorse/client/h2/connection.rb +18 -28
  99. data/lib/seahorse/client/h2/handler.rb +13 -3
  100. data/lib/seahorse/client/http/response.rb +1 -1
  101. data/lib/seahorse/client/net_http/connection_pool.rb +12 -3
  102. data/lib/seahorse/client/net_http/handler.rb +21 -9
  103. data/lib/seahorse/client/networking_error.rb +1 -1
  104. data/lib/seahorse/client/plugins/h2.rb +4 -4
  105. data/lib/seahorse/client/plugins/net_http.rb +9 -0
  106. data/lib/seahorse/client/request_context.rb +8 -1
  107. data/lib/seahorse/client/response.rb +2 -0
  108. data/lib/seahorse/util.rb +2 -1
  109. data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
  110. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  111. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  112. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  113. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  114. data/sig/seahorse/client/async_base.rbs +18 -0
  115. metadata +61 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cced353e3a401bc05f3b8c5bc6175ecb5ea916a1d5c7bc4e172eec5c6021dd1
4
- data.tar.gz: eb40ea2b0a789f38ec9118a74416fdf0a13aec3c8fe1c6fbbce7c107893e2a5d
3
+ metadata.gz: e2ca0fbdedab1c093c716160e76303794d1546fb910732e7399158149393379d
4
+ data.tar.gz: 80287b842e9382353bb5c5093495299d8bfefaa4c1ca41227e34eeb2cb0ee592
5
5
  SHA512:
6
- metadata.gz: 7dba87fc96142f251dae476748deed876a944c935a7a925db33dd0400d8518823224e92ed5f785a6b098f06cb06a8fc45e41b2f608b82dacd687717787191f55
7
- data.tar.gz: 2e7da3ef2c1dc2c99f9fc002c673e909d6befe24c98061a76bbc0bec85c8274156b34da34e0832260c1b2d55e3db92f307206f80180162058f0896a91a2c7f8e
6
+ metadata.gz: 95520dcd178c17ffee6588d5c840dcab71184746d1b3b9262de70a43a9fb2fb43ba0e773c6d4dcf08cdc0fc7639b407a644050e002edf34dc288077577e2577a
7
+ data.tar.gz: 963666144b4c5f8f9826a667060e371b73772fa3fae57066cbcac775bc8a56a6e12350984bce5241a90e53d8e29f95e6be78b472c53a319af6b56b15a51f3bc3
data/CHANGELOG.md CHANGED
@@ -1,6 +1,325 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.226.1 (2025-06-24)
5
+ ------------------
6
+
7
+ * Issue - Fixed spelling in the `Aws::Errors::SignalEventError` error message.
8
+
9
+ 3.226.0 (2025-06-17)
10
+ ------------------
11
+
12
+ * Feature - Updated Aws::STS::Client with the latest API changes.
13
+
14
+ * Feature - The AWS Security Token Service APIs AssumeRoleWithSAML and AssumeRoleWithWebIdentity can now be invoked without pre-configured AWS credentials in the SDK configuration.
15
+
16
+ 3.225.2 (2025-06-10)
17
+ ------------------
18
+
19
+ * Issue - Only load required `cgi` modules for Ruby 3.5.
20
+
21
+ 3.225.1 (2025-06-05)
22
+ ------------------
23
+
24
+ * Issue - Fix RPCv2 parser to handle flattened list and flattened map members correctly for `AwsQueryCompatible` services.
25
+
26
+ 3.225.0 (2025-06-02)
27
+ ------------------
28
+
29
+ * Feature - AWS SDK for Ruby no longer supports Ruby runtime versions 2.5 and 2.6.
30
+
31
+ 3.224.1 (2025-05-28)
32
+ ------------------
33
+
34
+ * Issue - Signal data in http response listeners prior to writing, so that data can be inspected or verified before potential mutation.
35
+
36
+ 3.224.0 (2025-05-12)
37
+ ------------------
38
+
39
+ * Feature - Updated Aws::STS::Client with the latest API changes.
40
+
41
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
42
+
43
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
44
+
45
+ * Feature - Support `ENV['AWS_DISABLE_HOST_PREFIX_INJECTION']` and `disable_host_prefix_injection` shared config to disable host prefix injection for all services.
46
+
47
+ 3.223.0 (2025-05-01)
48
+ ------------------
49
+
50
+ * Feature - Updated Aws::STS::Client with the latest API changes.
51
+
52
+ 3.222.3 (2025-04-28)
53
+ ------------------
54
+
55
+ * Issue - Do not dynamically create operation methods from the API. (#3234)
56
+
57
+ 3.222.2 (2025-04-16)
58
+ ------------------
59
+
60
+ * Issue - Additional metrics collection for credentials in the User-Agent plugin.
61
+
62
+ 3.222.1 (2025-03-28)
63
+ ------------------
64
+
65
+ * Issue - Allow explicit modeled headers to override prefixed headers for `rest` protocols.
66
+
67
+ 3.222.0 (2025-03-27)
68
+ ------------------
69
+
70
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
71
+
72
+ * Feature - This release adds AwsAdditionalDetails in the CreateTokenWithIAM API response.
73
+
74
+ 3.221.0 (2025-03-24)
75
+ ------------------
76
+
77
+ * Feature - Add `logger` as an explicit dependency for Ruby 3.5.
78
+ * Issue - Enable ALPN over TLS for H2 Connection by default.
79
+ * Issue - Fix HTTP-2 connections to properly use config values configured on the client.
80
+
81
+ 3.220.2 (2025-03-20)
82
+ ------------------
83
+
84
+ * Issue - Enable ALPN over TLS for H2 by default.
85
+
86
+ 3.220.1 (2025-03-06)
87
+ ------------------
88
+
89
+ * Issue - Convert stubs at request time.
90
+
91
+ 3.220.0 (2025-03-04)
92
+ ------------------
93
+
94
+ * Feature - Updated Aws::STS::Client with the latest API changes.
95
+
96
+ 3.219.0 (2025-02-18)
97
+ ------------------
98
+
99
+ * Feature - Updated Aws::STS::Client with the latest API changes.
100
+
101
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
102
+
103
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
104
+
105
+ 3.218.1 (2025-02-07)
106
+ ------------------
107
+
108
+ * Issue - Add handling of block in ExtendedSession delegation (#3178).
109
+
110
+ 3.218.0 (2025-02-06)
111
+ ------------------
112
+
113
+ * Feature - Updated Aws::STS::Client with the latest API changes.
114
+
115
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
116
+
117
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
118
+
119
+ 3.217.1 (2025-01-30)
120
+ ------------------
121
+
122
+ * Issue - Add `transfer-encoding` and `connection` to list of unsigned sigv4 headers.
123
+
124
+ 3.217.0 (2025-01-24)
125
+ ------------------
126
+
127
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
128
+
129
+ * Feature - Fixed typos in the descriptions.
130
+
131
+ 3.216.1 (2025-01-22)
132
+ ------------------
133
+
134
+ * Issue - Use epoch seconds instead of milliseconds in cbor encode/decode.
135
+
136
+ * Issue - Add handling of block in response delegation (#3169).
137
+
138
+ 3.216.0 (2025-01-15)
139
+ ------------------
140
+
141
+ * Feature - Updated Aws::STS::Client with the latest API changes.
142
+
143
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
144
+
145
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
146
+
147
+ * Feature - Always calculate request checksums for operations that support or require it. Supported config options are `when_supported` and `when_required`. The default value is `when_supported`. This option is configured in code with `:request_checksum_calculation`, in the shared config file as `request_checksum_calculation`, and in the ENV as `ENV['AWS_REQUEST_CHECKSUM_CALCULATION']`.
148
+
149
+ * Feature - Always validate response checksums for operations that support or require it. Supported config options are `when_supported` and `when_required`. The default value is `when_supported`. This option is configured in code with `:response_checksum_validation`, in the shared config file as `response_checksum_validation`, and in the ENV as `ENV['AWS_RESPONSE_CHECKSUM_VALIDATION']`.
150
+
151
+ * Feature - Support CRC64NVME checksums through the `aws-crt` gem.
152
+
153
+ 3.215.1 (2025-01-14)
154
+ ------------------
155
+
156
+ * Issue - Fixed error when attempting to log an unlinked tempfile.
157
+
158
+ 3.215.0 (2025-01-10)
159
+ ------------------
160
+
161
+ * Feature - Updated Aws::STS::Client with the latest API changes.
162
+
163
+ * Feature - Fixed typos in the descriptions.
164
+
165
+ 3.214.1 (2024-12-28)
166
+ ------------------
167
+
168
+ * Issue - Fix documentation that references a non-existent method.
169
+
170
+ 3.214.0 (2024-11-25)
171
+ ------------------
172
+
173
+ * Feature - Updated configuration values for `defaults_mode`.
174
+
175
+ 3.213.0 (2024-11-14)
176
+ ------------------
177
+
178
+ * Feature - Updated Aws::STS::Client with the latest API changes.
179
+
180
+ * Feature - This release introduces the new API 'AssumeRoot', which returns short-term credentials that you can use to perform privileged tasks.
181
+
182
+ 3.212.0 (2024-11-06)
183
+ ------------------
184
+
185
+ * Feature - Updated Aws::STS::Client with the latest API changes.
186
+
187
+ 3.211.0 (2024-10-21)
188
+ ------------------
189
+
190
+ * Feature - Support functionality for services that migrate from AWS Query to AWS JSON or CBOR.
191
+
192
+ * Issue - Fix RPCv2 protocol to always send an Accept header for CBOR.
193
+
194
+ 3.210.0 (2024-10-18)
195
+ ------------------
196
+
197
+ * Feature - Updated Aws::STS::Client with the latest API changes.
198
+
199
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
200
+
201
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
202
+
203
+ * Feature - reduce memory usage by not using legacy endpoint data unless required.
204
+
205
+ 3.209.1 (2024-09-25)
206
+ ------------------
207
+
208
+ * Issue - Add all core plugins to autoloads.
209
+
210
+ 3.209.0 (2024-09-24)
211
+ ------------------
212
+
213
+ * Feature - Updated Aws::STS::Client with the latest API changes.
214
+
215
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
216
+
217
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
218
+
219
+ * Issue - Add service identifiers to GlobalConfig's list of identifiers outside of autoload (#3113).
220
+
221
+ * Issue - Ignore invalid ARNs when trying to parse accountId in assume role credentials.
222
+
223
+ 3.208.0 (2024-09-23)
224
+ ------------------
225
+
226
+ * Feature - Updated Aws::STS::Client with the latest API changes.
227
+
228
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
229
+
230
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
231
+
232
+ * Feature - Use autoloading at the service level to load service clients and resources.
233
+
234
+ 3.207.0 (2024-09-20)
235
+ ------------------
236
+
237
+ * Feature - Updated Aws::STS::Client with the latest API changes.
238
+
239
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
240
+
241
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
242
+
243
+ * Feature - Support Account ID credentials using `ENV['AWS_ACCOUNT_ID']`, `aws_account_id` shared config, or the `account_id` Client configuration option.
244
+
245
+ * Feature - Support Account ID endpoint mode using `ENV['AWS_ACCOUNT_ID_ENDPOINT_MODE']`, `aws_account_id_endpoint_mode` shared config, or the `account_id_endpoint_mode` Client configuration option. Defaults to `preferred`, which will use the account id endpoint if available. Set to `disabled` to disable account id endpoints. Set to `required` to require account id endpoint usage; an error is raised if credentials do not have an account id.
246
+
247
+ 3.206.0 (2024-09-17)
248
+ ------------------
249
+
250
+ * Feature - Support `sigv4a` endpoint auth without CRT.
251
+
252
+ 3.205.0 (2024-09-11)
253
+ ------------------
254
+
255
+ * Feature - Updated Aws::STS::Client with the latest API changes.
256
+
257
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
258
+
259
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
260
+
261
+ * Issue - Additional metrics collection in the User-Agent plugin.
262
+
263
+ 3.204.0 (2024-09-10)
264
+ ------------------
265
+
266
+ * Feature - Updated Aws::STS::Client with the latest API changes.
267
+
268
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
269
+
270
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
271
+
272
+ * Issue - Add support for `ssl_cert` and `ssl_key` configuration options to support mTLS.
273
+
274
+ 3.203.0 (2024-09-03)
275
+ ------------------
276
+
277
+ * Feature - Updated Aws::STS::Client with the latest API changes.
278
+
279
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
280
+
281
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
282
+
283
+ * Feature - Add support for Observability which includes a configuration, `telemetry_provider` and an OpenTelemetry-based telemetry provider.
284
+
285
+ 3.202.2 (2024-08-30)
286
+ ------------------
287
+
288
+ * Issue - revert auto-loading of bundled gems.
289
+
290
+ 3.202.1 (2024-08-29)
291
+ ------------------
292
+
293
+ * Issue - require default plugins when loading aws-sdk-core.
294
+
295
+ 3.202.0 (2024-08-27)
296
+ ------------------
297
+
298
+ * Feature - Updated Aws::STS::Client with the latest API changes.
299
+
300
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
301
+
302
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
303
+
304
+ * Issue - Reduce initial memory usage by auto-loading bundled gems (STS, SSO, SSOOIDC).
305
+
306
+ 3.201.5 (2024-08-15)
307
+ ------------------
308
+
309
+ * Issue - Allow legacy/undocumented `sigv4_signer` configuration to override resolved signer.
310
+
311
+ * Issue - Consider sigv4a supported without crt check.
312
+
313
+ 3.201.4 (2024-08-08)
314
+ ------------------
315
+
316
+ * Issue - Update waiters to handle expected boolean values when matching errors.
317
+
318
+ 3.201.3 (2024-07-23)
319
+ ------------------
320
+
321
+ * Issue - Add `disableNormalizePath` when resolving auth_scheme for S3.
322
+
4
323
  3.201.2 (2024-07-18)
5
324
  ------------------
6
325
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.201.2
1
+ 3.226.1
@@ -128,8 +128,7 @@ module Aws
128
128
  "override" => 3100
129
129
  }
130
130
  },
131
- "in-region" => {
132
- },
131
+ "in-region" => {},
133
132
  "cross-region" => {
134
133
  "connectTimeoutInMillis" => {
135
134
  "override" => 3100
data/lib/aws-defaults.rb CHANGED
@@ -1,3 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'aws-defaults/default_configuration'
3
+ module Aws
4
+ autoload :DefaultsModeConfiguration, 'aws-defaults/default_configuration'
5
+ autoload :DefaultsModeConfigResolver, 'aws-defaults/defaults_mode_config_resolver'
6
+ end
@@ -24,9 +24,7 @@ module Aws
24
24
  # arn.resource
25
25
  # # => foo/bar
26
26
  #
27
- # # Note: parser available for parsing resource details
28
- # @see Aws::ARNParser#parse_resource
29
- #
27
+ # @see ARNParser
30
28
  # @see https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-arns
31
29
  class ARN
32
30
 
@@ -50,6 +50,7 @@ module Aws
50
50
  end
51
51
  @client = client_opts[:client] || STS::Client.new(client_opts)
52
52
  @async_refresh = true
53
+ @metrics = ['CREDENTIALS_STS_ASSUME_ROLE']
53
54
  super
54
55
  end
55
56
 
@@ -62,13 +63,20 @@ module Aws
62
63
  private
63
64
 
64
65
  def refresh
65
- c = @client.assume_role(@assume_role_params).credentials
66
+ resp = @client.assume_role(@assume_role_params)
67
+ creds = resp.credentials
66
68
  @credentials = Credentials.new(
67
- c.access_key_id,
68
- c.secret_access_key,
69
- c.session_token
69
+ creds.access_key_id,
70
+ creds.secret_access_key,
71
+ creds.session_token,
72
+ account_id: parse_account_id(resp)
70
73
  )
71
- @expiration = c.expiration
74
+ @expiration = creds.expiration
75
+ end
76
+
77
+ def parse_account_id(resp)
78
+ arn = resp.assumed_role_user&.arn
79
+ ARNParser.parse(arn).account_id if ARNParser.arn?(arn)
72
80
  end
73
81
 
74
82
  class << self
@@ -60,7 +60,8 @@ module Aws
60
60
  # not provided, generate encoded UUID as session name
61
61
  @assume_role_web_identity_params[:role_session_name] = _session_name
62
62
  end
63
- @client = client_opts[:client] || STS::Client.new(client_opts.merge(credentials: false))
63
+ @client = client_opts[:client] || STS::Client.new(client_opts.merge(credentials: nil))
64
+ @metrics = ['CREDENTIALS_STS_ASSUME_ROLE_WEB_ID']
64
65
  super
65
66
  end
66
67
 
@@ -73,14 +74,15 @@ module Aws
73
74
  # read from token file everytime it refreshes
74
75
  @assume_role_web_identity_params[:web_identity_token] = _token_from_file(@token_file)
75
76
 
76
- c = @client.assume_role_with_web_identity(
77
- @assume_role_web_identity_params).credentials
77
+ resp = @client.assume_role_with_web_identity(@assume_role_web_identity_params)
78
+ creds = resp.credentials
78
79
  @credentials = Credentials.new(
79
- c.access_key_id,
80
- c.secret_access_key,
81
- c.session_token
80
+ creds.access_key_id,
81
+ creds.secret_access_key,
82
+ creds.session_token,
83
+ account_id: parse_account_id(resp)
82
84
  )
83
- @expiration = c.expiration
85
+ @expiration = creds.expiration
84
86
  end
85
87
 
86
88
  def _token_from_file(path)
@@ -94,6 +96,11 @@ module Aws
94
96
  Base64.strict_encode64(SecureRandom.uuid)
95
97
  end
96
98
 
99
+ def parse_account_id(resp)
100
+ arn = resp.assumed_role_user&.arn
101
+ ARNParser.parse(arn).account_id if ARNParser.arn?(arn)
102
+ end
103
+
97
104
  class << self
98
105
 
99
106
  # @api private
@@ -61,9 +61,7 @@ module Aws
61
61
  when :tag
62
62
  case (tag = read_tag)
63
63
  when TAG_TYPE_EPOCH
64
- type = peek_type
65
64
  item = decode_item
66
- item /= 1000.0 if type == :integer
67
65
  Time.at(item)
68
66
  when TAG_TYPE_BIGNUM, TAG_TYPE_NEG_BIGNUM
69
67
  read_bignum(tag)
@@ -226,8 +226,8 @@ module Aws
226
226
 
227
227
  def add_time(value)
228
228
  head(MAJOR_TYPE_TAG, TAG_TYPE_EPOCH)
229
- epoch_ms = (value.to_f * 1000).to_i
230
- add_integer(epoch_ms)
229
+ epoch = value.to_f
230
+ add_double(epoch)
231
231
  end
232
232
 
233
233
  def bignum_to_bytes(value)
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'cbor/encoder'
4
+ require_relative 'cbor/decoder'
5
+
3
6
  module Aws
4
7
  # @api private
5
8
  module Cbor
@@ -46,61 +49,5 @@ module Aws
46
49
  super("Unexpected additional information: #{add_info}")
47
50
  end
48
51
  end
49
-
50
- class << self
51
- # @param [Symbol,Class] engine
52
- # Must be one of the following values:
53
- #
54
- # * :cbor
55
- #
56
- def engine=(engine)
57
- @engine = Class === engine ? engine : load_engine(engine)
58
- end
59
-
60
- # @return [Class] Returns the default engine.
61
- # One of:
62
- #
63
- # * {CborEngine}
64
- #
65
- def engine
66
- set_default_engine unless @engine
67
- @engine
68
- end
69
-
70
- def encode(data)
71
- @engine.encode(data)
72
- end
73
-
74
- def decode(bytes)
75
- bytes.force_encoding(Encoding::BINARY)
76
- @engine.decode(bytes)
77
- end
78
-
79
- def set_default_engine
80
- [:cbor].each do |name|
81
- @engine ||= try_load_engine(name)
82
- end
83
-
84
- unless @engine
85
- raise 'Unable to find a compatible cbor library.'
86
- end
87
- end
88
-
89
- private
90
-
91
- def load_engine(name)
92
- require "aws-sdk-core/cbor/#{name}_engine"
93
- const_name = name[0].upcase + name[1..-1] + 'Engine'
94
- const_get(const_name)
95
- end
96
-
97
- def try_load_engine(name)
98
- load_engine(name)
99
- rescue LoadError
100
- false
101
- end
102
- end
103
-
104
- set_default_engine
105
52
  end
106
53
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ # setup autoloading for ClientSideMonitoring module
5
+ module ClientSideMonitoring
6
+ autoload :RequestMetrics, 'aws-sdk-core/client_side_monitoring/request_metrics'
7
+ autoload :Publisher, 'aws-sdk-core/client_side_monitoring/publisher'
8
+ end
9
+ end