aws-sdk-core 3.203.0 → 3.209.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +70 -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/user_agent.rb +17 -8
  16. data/lib/aws-sdk-core/plugins.rb +39 -0
  17. data/lib/aws-sdk-core/process_credentials.rb +2 -1
  18. data/lib/aws-sdk-core/resources.rb +8 -0
  19. data/lib/aws-sdk-core/rpc_v2/handler.rb +5 -1
  20. data/lib/aws-sdk-core/shared_config.rb +3 -1
  21. data/lib/aws-sdk-core/shared_credentials.rb +0 -7
  22. data/lib/aws-sdk-core/sso_credentials.rb +2 -1
  23. data/lib/aws-sdk-core/stubbing.rb +22 -0
  24. data/lib/aws-sdk-core.rb +82 -102
  25. data/lib/aws-sdk-sso/client.rb +17 -7
  26. data/lib/aws-sdk-sso/client_api.rb +1 -0
  27. data/lib/aws-sdk-sso/endpoints.rb +4 -16
  28. data/lib/aws-sdk-sso/plugins/endpoints.rb +18 -6
  29. data/lib/aws-sdk-sso/types.rb +1 -0
  30. data/lib/aws-sdk-sso.rb +15 -11
  31. data/lib/aws-sdk-ssooidc/client.rb +17 -7
  32. data/lib/aws-sdk-ssooidc/client_api.rb +1 -0
  33. data/lib/aws-sdk-ssooidc/endpoints.rb +4 -16
  34. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +18 -6
  35. data/lib/aws-sdk-ssooidc/types.rb +1 -0
  36. data/lib/aws-sdk-ssooidc.rb +15 -11
  37. data/lib/aws-sdk-sts/client.rb +17 -7
  38. data/lib/aws-sdk-sts/client_api.rb +1 -0
  39. data/lib/aws-sdk-sts/customizations.rb +5 -1
  40. data/lib/aws-sdk-sts/endpoints.rb +8 -32
  41. data/lib/aws-sdk-sts/plugins/endpoints.rb +18 -6
  42. data/lib/aws-sdk-sts/types.rb +1 -0
  43. data/lib/aws-sdk-sts.rb +15 -11
  44. data/lib/seahorse/client/net_http/connection_pool.rb +8 -2
  45. data/lib/seahorse/client/plugins/net_http.rb +9 -0
  46. metadata +7 -2
@@ -37,8 +37,6 @@ require 'aws-sdk-core/plugins/sign.rb'
37
37
  require 'aws-sdk-core/plugins/protocols/query.rb'
38
38
  require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
39
39
 
40
- Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
41
-
42
40
  module Aws::STS
43
41
  # An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
44
42
  #
@@ -132,13 +130,15 @@ module Aws::STS
132
130
  # locations will be searched for credentials:
133
131
  #
134
132
  # * `Aws.config[:credentials]`
135
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
136
- # * 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']
137
137
  # * `~/.aws/credentials`
138
138
  # * `~/.aws/config`
139
139
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
140
140
  # are very aggressive. Construct and pass an instance of
141
- # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
141
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
142
142
  # enable retries and extended timeouts. Instance profile credential
143
143
  # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
144
144
  # to true.
@@ -157,6 +157,8 @@ module Aws::STS
157
157
  #
158
158
  # @option options [String] :access_key_id
159
159
  #
160
+ # @option options [String] :account_id
161
+ #
160
162
  # @option options [Boolean] :active_endpoint_cache (false)
161
163
  # When set to `true`, a thread polling for endpoints will be running in
162
164
  # the background every 60 secs (default). Defaults to `false`.
@@ -376,7 +378,9 @@ module Aws::STS
376
378
  # sending the request.
377
379
  #
378
380
  # @option options [Aws::STS::EndpointProvider] :endpoint_provider
379
- # 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`
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`.
380
384
  #
381
385
  # @option options [Float] :http_continue_timeout (1)
382
386
  # The number of seconds to wait for a 100-continue response before sending the
@@ -432,6 +436,12 @@ module Aws::STS
432
436
  # @option options [String] :ssl_ca_store
433
437
  # Sets the X509::Store to verify peer certificate.
434
438
  #
439
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
440
+ # Sets a client certificate when creating http connections.
441
+ #
442
+ # @option options [OpenSSL::PKey] :ssl_key
443
+ # Sets a client key when creating http connections.
444
+ #
435
445
  # @option options [Float] :ssl_timeout
436
446
  # Sets the SSL timeout in seconds
437
447
  #
@@ -2406,7 +2416,7 @@ module Aws::STS
2406
2416
  tracer: tracer
2407
2417
  )
2408
2418
  context[:gem_name] = 'aws-sdk-core'
2409
- context[:gem_version] = '3.203.0'
2419
+ context[:gem_version] = '3.209.1'
2410
2420
  Seahorse::Client::Request.new(handlers, context)
2411
2421
  end
2412
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
@@ -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
@@ -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
@@ -15,11 +15,11 @@ module Aws::STS
15
15
  :endpoint_provider,
16
16
  doc_type: 'Aws::STS::EndpointProvider',
17
17
  rbs_type: 'untyped',
18
- docstring: 'The endpoint provider used to resolve endpoints. Any '\
19
- 'object that responds to `#resolve_endpoint(parameters)` '\
20
- 'where `parameters` is a Struct similar to '\
21
- '`Aws::STS::EndpointParameters`'
22
- ) do |cfg|
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
23
23
  Aws::STS::EndpointProvider.new
24
24
  end
25
25
 
@@ -40,11 +40,23 @@ module Aws::STS
40
40
  context[:auth_scheme] =
41
41
  Aws::Endpoints.resolve_auth_scheme(context, endpoint)
42
42
 
43
- @handler.call(context)
43
+ with_metrics(context) { @handler.call(context) }
44
44
  end
45
45
 
46
46
  private
47
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
+
48
60
  def apply_endpoint_headers(context, headers)
49
61
  headers.each do |key, values|
50
62
  value = values
@@ -1602,3 +1602,4 @@ module Aws::STS
1602
1602
 
1603
1603
  end
1604
1604
  end
1605
+
data/lib/aws-sdk-sts.rb CHANGED
@@ -13,16 +13,7 @@ unless Module.const_defined?(:Aws)
13
13
  require 'aws-sigv4'
14
14
  end
15
15
 
16
- require_relative 'aws-sdk-sts/types'
17
- require_relative 'aws-sdk-sts/client_api'
18
- require_relative 'aws-sdk-sts/plugins/endpoints.rb'
19
- require_relative 'aws-sdk-sts/client'
20
- require_relative 'aws-sdk-sts/errors'
21
- require_relative 'aws-sdk-sts/resource'
22
- require_relative 'aws-sdk-sts/endpoint_parameters'
23
- require_relative 'aws-sdk-sts/endpoint_provider'
24
- require_relative 'aws-sdk-sts/endpoints'
25
- require_relative 'aws-sdk-sts/customizations'
16
+ Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
26
17
 
27
18
  # This module provides support for AWS Security Token Service. This module is available in the
28
19
  # `aws-sdk-core` gem.
@@ -53,7 +44,20 @@ require_relative 'aws-sdk-sts/customizations'
53
44
  #
54
45
  # @!group service
55
46
  module Aws::STS
47
+ autoload :Types, 'aws-sdk-sts/types'
48
+ autoload :ClientApi, 'aws-sdk-sts/client_api'
49
+ module Plugins
50
+ autoload :Endpoints, 'aws-sdk-sts/plugins/endpoints.rb'
51
+ end
52
+ autoload :Client, 'aws-sdk-sts/client'
53
+ autoload :Errors, 'aws-sdk-sts/errors'
54
+ autoload :Resource, 'aws-sdk-sts/resource'
55
+ autoload :EndpointParameters, 'aws-sdk-sts/endpoint_parameters'
56
+ autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
57
+ autoload :Endpoints, 'aws-sdk-sts/endpoints'
56
58
 
57
- GEM_VERSION = '3.203.0'
59
+ GEM_VERSION = '3.209.1'
58
60
 
59
61
  end
62
+
63
+ require_relative 'aws-sdk-sts/customizations'
@@ -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
@@ -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)
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.203.0
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-09-03 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
@@ -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
@@ -216,6 +219,7 @@ files:
216
219
  - lib/aws-sdk-core/query/param_list.rb
217
220
  - lib/aws-sdk-core/refreshing_credentials.rb
218
221
  - lib/aws-sdk-core/refreshing_token.rb
222
+ - lib/aws-sdk-core/resources.rb
219
223
  - lib/aws-sdk-core/resources/collection.rb
220
224
  - lib/aws-sdk-core/rest.rb
221
225
  - lib/aws-sdk-core/rest/content_type_handler.rb
@@ -242,6 +246,7 @@ files:
242
246
  - lib/aws-sdk-core/sso_token_provider.rb
243
247
  - lib/aws-sdk-core/static_token_provider.rb
244
248
  - lib/aws-sdk-core/structure.rb
249
+ - lib/aws-sdk-core/stubbing.rb
245
250
  - lib/aws-sdk-core/stubbing/data_applicator.rb
246
251
  - lib/aws-sdk-core/stubbing/empty_stub.rb
247
252
  - lib/aws-sdk-core/stubbing/protocols/api_gateway.rb