aws-sdk-core 3.220.1 → 3.232.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +140 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/assume_role_credentials.rb +1 -0
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +1 -0
- data/lib/aws-sdk-core/credential_provider.rb +4 -0
- data/lib/aws-sdk-core/credential_provider_chain.rb +28 -8
- data/lib/aws-sdk-core/credentials.rb +6 -0
- data/lib/aws-sdk-core/ecs_credentials.rb +1 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +2 -1
- data/lib/aws-sdk-core/endpoints.rb +37 -13
- data/lib/aws-sdk-core/error_handler.rb +5 -0
- data/lib/aws-sdk-core/errors.rb +2 -2
- data/lib/aws-sdk-core/event_emitter.rb +1 -1
- data/lib/aws-sdk-core/instance_profile_credentials.rb +147 -157
- data/lib/aws-sdk-core/json/error_handler.rb +14 -4
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +75 -59
- data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
- data/lib/aws-sdk-core/plugins/sign.rb +29 -20
- data/lib/aws-sdk-core/plugins/stub_responses.rb +6 -0
- data/lib/aws-sdk-core/plugins/user_agent.rb +24 -2
- data/lib/aws-sdk-core/process_credentials.rb +1 -1
- data/lib/aws-sdk-core/rest/request/headers.rb +1 -1
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +26 -16
- data/lib/aws-sdk-core/rpc_v2/parser.rb +8 -0
- data/lib/aws-sdk-core/shared_config.rb +82 -21
- data/lib/aws-sdk-core/shared_credentials.rb +1 -0
- data/lib/aws-sdk-core/sso_credentials.rb +2 -0
- data/lib/aws-sdk-core/static_token_provider.rb +1 -2
- data/lib/aws-sdk-core/token.rb +3 -3
- data/lib/aws-sdk-core/token_provider.rb +4 -0
- data/lib/aws-sdk-core/token_provider_chain.rb +2 -6
- data/lib/aws-sdk-core/util.rb +2 -1
- data/lib/aws-sdk-core/xml/error_handler.rb +3 -1
- data/lib/aws-sdk-sso/client.rb +25 -19
- data/lib/aws-sdk-sso/endpoint_provider.rb +2 -2
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +38 -21
- data/lib/aws-sdk-ssooidc/client_api.rb +6 -0
- data/lib/aws-sdk-ssooidc/types.rb +28 -1
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +25 -19
- data/lib/aws-sdk-sts/client_api.rb +10 -8
- data/lib/aws-sdk-sts/endpoint_provider.rb +18 -18
- data/lib/aws-sdk-sts/errors.rb +0 -1
- data/lib/aws-sdk-sts/presigner.rb +2 -6
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/async_base.rb +4 -5
- data/lib/seahorse/client/base.rb +0 -14
- data/lib/seahorse/client/h2/connection.rb +18 -28
- data/lib/seahorse/client/http/response.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +2 -1
- data/lib/seahorse/client/networking_error.rb +1 -1
- data/lib/seahorse/client/plugins/h2.rb +4 -4
- data/lib/seahorse/client/request_context.rb +2 -2
- data/lib/seahorse/util.rb +2 -1
- data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
- data/sig/seahorse/client/async_base.rbs +18 -0
- metadata +34 -8
data/lib/aws-sdk-sts/errors.rb
CHANGED
@@ -43,7 +43,6 @@ module Aws::STS
|
|
43
43
|
#
|
44
44
|
# Additionally, error classes are dynamically generated for service errors based on the error code
|
45
45
|
# if they are not defined above.
|
46
|
-
# Some existing error classes may use a different class name than the one documented.
|
47
46
|
module Errors
|
48
47
|
|
49
48
|
extend Aws::Errors::DynamicErrors
|
@@ -53,13 +53,9 @@ module Aws
|
|
53
53
|
use_fips: context.config.use_fips_endpoint,
|
54
54
|
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy'
|
55
55
|
)
|
56
|
-
endpoint = context.config.endpoint_provider
|
57
|
-
.resolve_endpoint(endpoint_params)
|
56
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(endpoint_params)
|
58
57
|
auth_scheme = Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
59
|
-
|
60
|
-
signer = Aws::Plugins::Sign.signer_for(
|
61
|
-
auth_scheme, context.config
|
62
|
-
)
|
58
|
+
signer = Aws::Plugins::Sign.signer_for(auth_scheme, context.config)
|
63
59
|
|
64
60
|
signer.presign_url(
|
65
61
|
http_method: 'GET',
|
data/lib/aws-sdk-sts.rb
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
module Seahorse
|
4
4
|
module Client
|
5
5
|
class AsyncBase < Seahorse::Client::Base
|
6
|
-
|
7
6
|
# default H2 plugins
|
8
7
|
# @api private
|
9
8
|
@plugins = PluginList.new([
|
@@ -11,10 +10,10 @@ module Seahorse
|
|
11
10
|
Plugins::H2,
|
12
11
|
Plugins::ResponseTarget
|
13
12
|
])
|
13
|
+
|
14
14
|
def initialize(plugins, options)
|
15
|
-
super
|
16
|
-
@connection = H2::Connection.new(
|
17
|
-
@options = options
|
15
|
+
super(plugins, options)
|
16
|
+
@connection = H2::Connection.new(@config)
|
18
17
|
end
|
19
18
|
|
20
19
|
# @return [H2::Connection]
|
@@ -36,7 +35,7 @@ module Seahorse
|
|
36
35
|
# @return [Seahorse::Client::H2::Connection]
|
37
36
|
def new_connection
|
38
37
|
if @connection.closed?
|
39
|
-
@connection = H2::Connection.new(@
|
38
|
+
@connection = H2::Connection.new(@config)
|
40
39
|
else
|
41
40
|
@connection
|
42
41
|
end
|
data/lib/seahorse/client/base.rb
CHANGED
@@ -176,8 +176,6 @@ module Seahorse
|
|
176
176
|
# @return [Model::Api]
|
177
177
|
def set_api(api)
|
178
178
|
@api = api
|
179
|
-
define_operation_methods
|
180
|
-
@api
|
181
179
|
end
|
182
180
|
|
183
181
|
# @option options [Model::Api, Hash] :api ({})
|
@@ -196,18 +194,6 @@ module Seahorse
|
|
196
194
|
|
197
195
|
private
|
198
196
|
|
199
|
-
def define_operation_methods
|
200
|
-
operations_module = Module.new
|
201
|
-
@api.operation_names.each do |method_name|
|
202
|
-
operations_module.send(:define_method, method_name) do |*args, &block|
|
203
|
-
params = args[0] || {}
|
204
|
-
options = args[1] || {}
|
205
|
-
build_request(method_name, params).send_request(options, &block)
|
206
|
-
end
|
207
|
-
end
|
208
|
-
include(operations_module)
|
209
|
-
end
|
210
|
-
|
211
197
|
def build_plugins(plugins)
|
212
198
|
plugins.map { |plugin| plugin.is_a?(Class) ? plugin.new : plugin }
|
213
199
|
end
|
@@ -10,13 +10,8 @@ module Seahorse
|
|
10
10
|
module Client
|
11
11
|
# @api private
|
12
12
|
module H2
|
13
|
-
|
14
13
|
# H2 Connection build on top of `http/2` gem
|
15
|
-
# (requires Ruby >= 2.1)
|
16
|
-
# with TLS layer plus ALPN, requires:
|
17
|
-
# Ruby >= 2.3 and OpenSSL >= 1.0.2
|
18
14
|
class Connection
|
19
|
-
|
20
15
|
OPTIONS = {
|
21
16
|
max_concurrent_streams: 100,
|
22
17
|
connection_timeout: 60,
|
@@ -27,7 +22,7 @@ module Seahorse
|
|
27
22
|
ssl_ca_bundle: nil,
|
28
23
|
ssl_ca_directory: nil,
|
29
24
|
ssl_ca_store: nil,
|
30
|
-
enable_alpn:
|
25
|
+
enable_alpn: true
|
31
26
|
}
|
32
27
|
|
33
28
|
# chunk read size at socket
|
@@ -41,25 +36,23 @@ module Seahorse
|
|
41
36
|
instance_variable_set("@#{opt_name}", value)
|
42
37
|
end
|
43
38
|
@h2_client = HTTP2::Client.new(
|
44
|
-
settings_max_concurrent_streams: max_concurrent_streams
|
39
|
+
settings_max_concurrent_streams: @max_concurrent_streams
|
45
40
|
)
|
46
|
-
@logger
|
47
|
-
options[:logger] || Logger.new($stdout)
|
48
|
-
end
|
41
|
+
@logger ||= Logger.new($stdout) if @http_wire_trace
|
49
42
|
@chunk_size = options[:read_chunk_size] || CHUNKSIZE
|
43
|
+
|
50
44
|
@errors = []
|
51
45
|
@status = :ready
|
46
|
+
|
52
47
|
@mutex = Mutex.new # connection can be shared across requests
|
53
48
|
@socket = nil
|
54
49
|
@socket_thread = nil
|
55
50
|
end
|
56
51
|
|
57
52
|
OPTIONS.keys.each do |attr_name|
|
58
|
-
attr_reader
|
53
|
+
attr_reader attr_name
|
59
54
|
end
|
60
55
|
|
61
|
-
alias ssl_verify_peer? ssl_verify_peer
|
62
|
-
|
63
56
|
attr_reader :errors
|
64
57
|
|
65
58
|
attr_accessor :input_signal_thread
|
@@ -112,7 +105,7 @@ module Seahorse
|
|
112
105
|
@h2_client << data
|
113
106
|
rescue IO::WaitReadable
|
114
107
|
begin
|
115
|
-
unless IO.select([@socket], nil, nil, connection_read_timeout)
|
108
|
+
unless IO.select([@socket], nil, nil, @connection_read_timeout)
|
116
109
|
self.debug_output('socket connection read time out')
|
117
110
|
self.close!
|
118
111
|
else
|
@@ -154,11 +147,11 @@ module Seahorse
|
|
154
147
|
end
|
155
148
|
|
156
149
|
def debug_output(msg, type = nil)
|
157
|
-
prefix =
|
150
|
+
prefix =
|
151
|
+
case type
|
158
152
|
when :send then '-> '
|
159
153
|
when :receive then '<- '
|
160
|
-
else
|
161
|
-
''
|
154
|
+
else ''
|
162
155
|
end
|
163
156
|
return unless @logger
|
164
157
|
_debug_entry(prefix + msg)
|
@@ -206,7 +199,7 @@ module Seahorse
|
|
206
199
|
begin
|
207
200
|
tcp.connect_nonblock(addr)
|
208
201
|
rescue IO::WaitWritable
|
209
|
-
unless IO.select(nil, [tcp], nil, connection_timeout)
|
202
|
+
unless IO.select(nil, [tcp], nil, @connection_timeout)
|
210
203
|
tcp.close
|
211
204
|
raise
|
212
205
|
end
|
@@ -220,15 +213,15 @@ module Seahorse
|
|
220
213
|
|
221
214
|
def _tls_context
|
222
215
|
ssl_ctx = OpenSSL::SSL::SSLContext.new(:TLSv1_2)
|
223
|
-
if ssl_verify_peer
|
216
|
+
if @ssl_verify_peer
|
224
217
|
ssl_ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
225
|
-
ssl_ctx.ca_file = ssl_ca_bundle
|
226
|
-
ssl_ctx.ca_path = ssl_ca_directory
|
227
|
-
ssl_ctx.cert_store = ssl_ca_store if ssl_ca_store
|
218
|
+
ssl_ctx.ca_file = @ssl_ca_bundle || _default_ca_bundle
|
219
|
+
ssl_ctx.ca_path = @ssl_ca_directory || _default_ca_directory
|
220
|
+
ssl_ctx.cert_store = @ssl_ca_store if @ssl_ca_store
|
228
221
|
else
|
229
222
|
ssl_ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
230
223
|
end
|
231
|
-
if enable_alpn
|
224
|
+
if @enable_alpn
|
232
225
|
debug_output('enabling ALPN for TLS ...')
|
233
226
|
ssl_ctx.alpn_protocols = ['h2']
|
234
227
|
end
|
@@ -236,15 +229,12 @@ module Seahorse
|
|
236
229
|
end
|
237
230
|
|
238
231
|
def _default_ca_bundle
|
239
|
-
File.exist?(OpenSSL::X509::DEFAULT_CERT_FILE)
|
240
|
-
OpenSSL::X509::DEFAULT_CERT_FILE : nil
|
232
|
+
OpenSSL::X509::DEFAULT_CERT_FILE if File.exist?(OpenSSL::X509::DEFAULT_CERT_FILE)
|
241
233
|
end
|
242
234
|
|
243
235
|
def _default_ca_directory
|
244
|
-
Dir.exist?(OpenSSL::X509::DEFAULT_CERT_DIR)
|
245
|
-
OpenSSL::X509::DEFAULT_CERT_DIR : nil
|
236
|
+
OpenSSL::X509::DEFAULT_CERT_DIR if Dir.exist?(OpenSSL::X509::DEFAULT_CERT_DIR)
|
246
237
|
end
|
247
|
-
|
248
238
|
end
|
249
239
|
end
|
250
240
|
end
|
@@ -53,10 +53,10 @@ When `true`, SSL peer certificates are verified when establishing a connection.
|
|
53
53
|
When `true`, HTTP2 debug output will be sent to the `:logger`.
|
54
54
|
DOCS
|
55
55
|
|
56
|
-
option(:enable_alpn, default:
|
57
|
-
Set to `
|
58
|
-
|
59
|
-
|
56
|
+
option(:enable_alpn, default: true, doc_type: 'Boolean', docstring: <<-DOCS)
|
57
|
+
Set to `false` to disable ALPN in HTTP2 over TLS. ALPN requires Openssl version >= 1.0.2.
|
58
|
+
Note: RFC7540 requires HTTP2 to use ALPN over TLS but some
|
59
|
+
services may not fully support ALPN and require setting this to `false`.
|
60
60
|
DOCS
|
61
61
|
|
62
62
|
option(:logger)
|
@@ -5,7 +5,7 @@ require 'stringio'
|
|
5
5
|
module Seahorse
|
6
6
|
module Client
|
7
7
|
class RequestContext
|
8
|
-
|
8
|
+
# @param [Hash] options
|
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)
|
@@ -16,7 +16,7 @@ module Seahorse
|
|
16
16
|
# @option options [Http::Response] :http_response (Http::Response.new)
|
17
17
|
# @option options [Integer] :retries (0)
|
18
18
|
# @option options [Aws::Telemetry::TracerBase] :tracer (Aws::Telemetry::NoOpTracer.new)
|
19
|
-
# @
|
19
|
+
# @option options [Hash] :metadata ({})
|
20
20
|
def initialize(options = {})
|
21
21
|
@operation_name = options[:operation_name]
|
22
22
|
@operation = options[:operation]
|
data/lib/seahorse/util.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
module Aws
|
2
|
+
module AsyncClientStubs
|
3
|
+
include ClientStubs
|
4
|
+
|
5
|
+
def send_events: () -> untyped
|
6
|
+
|
7
|
+
class StubsStream
|
8
|
+
def initialize: () -> void
|
9
|
+
|
10
|
+
attr_accessor send_events: untyped
|
11
|
+
|
12
|
+
attr_reader state: Symbol
|
13
|
+
|
14
|
+
def data: (untyped bytes, ?::Hash[untyped, untyped] options) -> untyped
|
15
|
+
|
16
|
+
def closed?: () -> bool
|
17
|
+
|
18
|
+
def close: () -> void
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Seahorse
|
2
|
+
module Client
|
3
|
+
class AsyncBase < Base
|
4
|
+
|
5
|
+
def self.new: (?untyped options) -> instance
|
6
|
+
|
7
|
+
attr_reader connection: untyped
|
8
|
+
|
9
|
+
def operation_names: () -> Array[Symbol]
|
10
|
+
|
11
|
+
def close_connection: () -> Symbol
|
12
|
+
|
13
|
+
def new_connection: () -> untyped
|
14
|
+
|
15
|
+
def connection_errors: () -> Array[untyped]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.232.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: aws-eventstream
|
@@ -78,6 +77,20 @@ dependencies:
|
|
78
77
|
- - ">="
|
79
78
|
- !ruby/object:Gem::Version
|
80
79
|
version: '0'
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: bigdecimal
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
type: :runtime
|
88
|
+
prerelease: false
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
81
94
|
- !ruby/object:Gem::Dependency
|
82
95
|
name: jmespath
|
83
96
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,9 +111,22 @@ dependencies:
|
|
98
111
|
- - ">="
|
99
112
|
- !ruby/object:Gem::Version
|
100
113
|
version: 1.6.1
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: logger
|
116
|
+
requirement: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
type: :runtime
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
101
128
|
description: Provides API clients for AWS. This gem is part of the official AWS SDK
|
102
129
|
for Ruby.
|
103
|
-
email:
|
104
130
|
executables: []
|
105
131
|
extensions: []
|
106
132
|
extra_rdoc_files: []
|
@@ -383,6 +409,7 @@ files:
|
|
383
409
|
- lib/seahorse/util.rb
|
384
410
|
- lib/seahorse/version.rb
|
385
411
|
- sig/aws-sdk-core.rbs
|
412
|
+
- sig/aws-sdk-core/async_client_stubs.rbs
|
386
413
|
- sig/aws-sdk-core/client_stubs.rbs
|
387
414
|
- sig/aws-sdk-core/errors.rbs
|
388
415
|
- sig/aws-sdk-core/resources/collection.rbs
|
@@ -392,6 +419,7 @@ files:
|
|
392
419
|
- sig/aws-sdk-core/telemetry/span_kind.rbs
|
393
420
|
- sig/aws-sdk-core/telemetry/span_status.rbs
|
394
421
|
- sig/aws-sdk-core/waiters/errors.rbs
|
422
|
+
- sig/seahorse/client/async_base.rbs
|
395
423
|
- sig/seahorse/client/base.rbs
|
396
424
|
- sig/seahorse/client/handler_builder.rbs
|
397
425
|
- sig/seahorse/client/response.rbs
|
@@ -401,7 +429,6 @@ licenses:
|
|
401
429
|
metadata:
|
402
430
|
source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-core
|
403
431
|
changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-core/CHANGELOG.md
|
404
|
-
post_install_message:
|
405
432
|
rdoc_options: []
|
406
433
|
require_paths:
|
407
434
|
- lib
|
@@ -409,15 +436,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
409
436
|
requirements:
|
410
437
|
- - ">="
|
411
438
|
- !ruby/object:Gem::Version
|
412
|
-
version: '2.
|
439
|
+
version: '2.7'
|
413
440
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
414
441
|
requirements:
|
415
442
|
- - ">="
|
416
443
|
- !ruby/object:Gem::Version
|
417
444
|
version: '0'
|
418
445
|
requirements: []
|
419
|
-
rubygems_version: 3.
|
420
|
-
signing_key:
|
446
|
+
rubygems_version: 3.6.7
|
421
447
|
specification_version: 4
|
422
448
|
summary: AWS SDK for Ruby - Core
|
423
449
|
test_files: []
|