aws-sdk-core 3.191.0 → 3.199.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 +153 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
- data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
- data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
- data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
- data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
- data/lib/aws-sdk-core/cbor/cbor_engine.rb +19 -0
- data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
- data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
- data/lib/aws-sdk-core/cbor.rb +106 -0
- data/lib/aws-sdk-core/client_stubs.rb +3 -2
- data/lib/aws-sdk-core/credential_provider.rb +1 -1
- data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
- data/lib/aws-sdk-core/ecs_credentials.rb +2 -1
- data/lib/aws-sdk-core/endpoints/matchers.rb +5 -1
- data/lib/aws-sdk-core/error_handler.rb +41 -0
- data/lib/aws-sdk-core/event_emitter.rb +0 -16
- data/lib/aws-sdk-core/instance_profile_credentials.rb +3 -2
- data/lib/aws-sdk-core/json/builder.rb +8 -1
- data/lib/aws-sdk-core/json/error_handler.rb +15 -10
- data/lib/aws-sdk-core/json/handler.rb +5 -6
- data/lib/aws-sdk-core/json/json_engine.rb +3 -1
- data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
- data/lib/aws-sdk-core/json/parser.rb +6 -1
- data/lib/aws-sdk-core/json.rb +43 -14
- data/lib/aws-sdk-core/lru_cache.rb +75 -0
- data/lib/aws-sdk-core/pageable_response.rb +1 -1
- data/lib/aws-sdk-core/param_validator.rb +7 -2
- data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
- data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
- data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
- data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
- data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
- data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
- data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
- data/lib/aws-sdk-core/plugins/request_compression.rb +11 -2
- data/lib/aws-sdk-core/plugins/retry_errors.rb +10 -3
- data/lib/aws-sdk-core/plugins/sign.rb +8 -3
- data/lib/aws-sdk-core/plugins/user_agent.rb +61 -26
- data/lib/aws-sdk-core/process_credentials.rb +45 -27
- data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
- data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
- data/lib/aws-sdk-core/query/handler.rb +4 -4
- data/lib/aws-sdk-core/query/param_builder.rb +2 -2
- data/lib/aws-sdk-core/query.rb +2 -1
- data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
- data/lib/aws-sdk-core/rest/handler.rb +3 -4
- data/lib/aws-sdk-core/rest/request/body.rb +32 -5
- data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
- data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +23 -11
- data/lib/aws-sdk-core/rest/response/body.rb +15 -1
- data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
- data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
- data/lib/aws-sdk-core/rest.rb +1 -0
- data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
- data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +45 -0
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +84 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +74 -0
- data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
- data/lib/aws-sdk-core/rpc_v2.rb +6 -0
- data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +41 -0
- data/lib/aws-sdk-core/util.rb +39 -0
- data/lib/aws-sdk-core/waiters/poller.rb +1 -1
- data/lib/aws-sdk-core/xml/builder.rb +17 -9
- data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
- data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
- data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
- data/lib/aws-sdk-core/xml/parser.rb +2 -6
- data/lib/aws-sdk-core.rb +7 -2
- data/lib/aws-sdk-sso/client.rb +77 -49
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +127 -51
- data/lib/aws-sdk-ssooidc/client_api.rb +22 -0
- data/lib/aws-sdk-ssooidc/errors.rb +21 -0
- data/lib/aws-sdk-ssooidc/types.rb +77 -9
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +77 -49
- data/lib/aws-sdk-sts/client_api.rb +8 -8
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/async_base.rb +1 -1
- data/lib/seahorse/client/async_response.rb +19 -0
- data/lib/seahorse/client/base.rb +18 -7
- data/lib/seahorse/client/h2/handler.rb +1 -0
- data/lib/seahorse/client/handler.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +3 -9
- data/lib/seahorse/client/plugin.rb +8 -0
- data/lib/seahorse/client/plugins/endpoint.rb +0 -1
- data/lib/seahorse/client/plugins/net_http.rb +48 -16
- data/lib/seahorse/model/shapes.rb +2 -2
- metadata +24 -7
- /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
data/lib/aws-sdk-sts/client.rb
CHANGED
|
@@ -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'
|
|
@@ -73,6 +74,7 @@ module Aws::STS
|
|
|
73
74
|
add_plugin(Aws::Plugins::ResponsePaging)
|
|
74
75
|
add_plugin(Aws::Plugins::StubResponses)
|
|
75
76
|
add_plugin(Aws::Plugins::IdempotencyToken)
|
|
77
|
+
add_plugin(Aws::Plugins::InvocationId)
|
|
76
78
|
add_plugin(Aws::Plugins::JsonvalueConverter)
|
|
77
79
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
|
78
80
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
|
@@ -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:
|
|
@@ -198,10 +205,16 @@ module Aws::STS
|
|
|
198
205
|
# When set to 'true' the request body will not be compressed
|
|
199
206
|
# for supported operations.
|
|
200
207
|
#
|
|
201
|
-
# @option options [String] :endpoint
|
|
202
|
-
#
|
|
203
|
-
#
|
|
204
|
-
#
|
|
208
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
|
209
|
+
# Normally you should not configure the `:endpoint` option
|
|
210
|
+
# directly. This is normally constructed from the `:region`
|
|
211
|
+
# option. Configuring `:endpoint` is normally reserved for
|
|
212
|
+
# connecting to test or custom endpoints. The endpoint should
|
|
213
|
+
# be a URI formatted like:
|
|
214
|
+
#
|
|
215
|
+
# 'http://example.com'
|
|
216
|
+
# 'https://example.com'
|
|
217
|
+
# 'http://example.com:123'
|
|
205
218
|
#
|
|
206
219
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
|
207
220
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
|
@@ -291,11 +304,11 @@ module Aws::STS
|
|
|
291
304
|
# throttling. This is a provisional mode that may change behavior
|
|
292
305
|
# in the future.
|
|
293
306
|
#
|
|
294
|
-
#
|
|
295
307
|
# @option options [String] :sdk_ua_app_id
|
|
296
308
|
# A unique and opaque application ID that is appended to the
|
|
297
|
-
# User-Agent header as app
|
|
298
|
-
# maximum length of 50.
|
|
309
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
|
310
|
+
# maximum length of 50. This variable is sourced from environment
|
|
311
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
|
299
312
|
#
|
|
300
313
|
# @option options [String] :secret_access_key
|
|
301
314
|
#
|
|
@@ -344,50 +357,65 @@ module Aws::STS
|
|
|
344
357
|
# @option options [Aws::STS::EndpointProvider] :endpoint_provider
|
|
345
358
|
# 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
359
|
#
|
|
347
|
-
# @option options [
|
|
348
|
-
#
|
|
349
|
-
#
|
|
350
|
-
#
|
|
351
|
-
#
|
|
352
|
-
#
|
|
353
|
-
#
|
|
354
|
-
#
|
|
355
|
-
#
|
|
356
|
-
#
|
|
357
|
-
#
|
|
358
|
-
# @option options [Float] :
|
|
359
|
-
#
|
|
360
|
-
#
|
|
361
|
-
#
|
|
362
|
-
#
|
|
363
|
-
#
|
|
364
|
-
#
|
|
365
|
-
#
|
|
366
|
-
#
|
|
367
|
-
#
|
|
368
|
-
#
|
|
369
|
-
#
|
|
370
|
-
#
|
|
371
|
-
#
|
|
372
|
-
#
|
|
373
|
-
#
|
|
374
|
-
#
|
|
360
|
+
# @option options [Float] :http_continue_timeout (1)
|
|
361
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
|
362
|
+
# request body. This option has no effect unless the request has "Expect"
|
|
363
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
|
364
|
+
# behaviour. This value can safely be set per request on the session.
|
|
365
|
+
#
|
|
366
|
+
# @option options [Float] :http_idle_timeout (5)
|
|
367
|
+
# The number of seconds a connection is allowed to sit idle before it
|
|
368
|
+
# is considered stale. Stale connections are closed and removed from the
|
|
369
|
+
# pool before making a request.
|
|
370
|
+
#
|
|
371
|
+
# @option options [Float] :http_open_timeout (15)
|
|
372
|
+
# The default number of seconds to wait for response data.
|
|
373
|
+
# This value can safely be set per-request on the session.
|
|
374
|
+
#
|
|
375
|
+
# @option options [URI::HTTP,String] :http_proxy
|
|
376
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
|
377
|
+
#
|
|
378
|
+
# @option options [Float] :http_read_timeout (60)
|
|
379
|
+
# The default number of seconds to wait for response data.
|
|
380
|
+
# This value can safely be set per-request on the session.
|
|
381
|
+
#
|
|
382
|
+
# @option options [Boolean] :http_wire_trace (false)
|
|
383
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
|
384
|
+
#
|
|
385
|
+
# @option options [Proc] :on_chunk_received
|
|
386
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
387
|
+
# of the response body is received. It provides three arguments: the chunk,
|
|
388
|
+
# the number of bytes received, and the total number of
|
|
389
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
|
390
|
+
#
|
|
391
|
+
# @option options [Proc] :on_chunk_sent
|
|
392
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
|
393
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
|
394
|
+
# the number of bytes read from the body, and the total number of
|
|
395
|
+
# bytes in the body.
|
|
396
|
+
#
|
|
397
|
+
# @option options [Boolean] :raise_response_errors (true)
|
|
398
|
+
# When `true`, response errors are raised.
|
|
399
|
+
#
|
|
400
|
+
# @option options [String] :ssl_ca_bundle
|
|
401
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
|
402
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
|
403
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
|
404
|
+
#
|
|
405
|
+
# @option options [String] :ssl_ca_directory
|
|
406
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
|
407
|
+
# authority files for verifying peer certificates. If you do
|
|
408
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
|
409
|
+
# default will be used if available.
|
|
375
410
|
#
|
|
376
|
-
# @option options [
|
|
377
|
-
#
|
|
378
|
-
# connection.
|
|
411
|
+
# @option options [String] :ssl_ca_store
|
|
412
|
+
# Sets the X509::Store to verify peer certificate.
|
|
379
413
|
#
|
|
380
|
-
# @option options [
|
|
381
|
-
#
|
|
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.
|
|
414
|
+
# @option options [Float] :ssl_timeout
|
|
415
|
+
# Sets the SSL timeout in seconds
|
|
385
416
|
#
|
|
386
|
-
# @option options [
|
|
387
|
-
#
|
|
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.
|
|
417
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
|
418
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
|
391
419
|
#
|
|
392
420
|
def initialize(*args)
|
|
393
421
|
super
|
|
@@ -2352,7 +2380,7 @@ module Aws::STS
|
|
|
2352
2380
|
params: params,
|
|
2353
2381
|
config: config)
|
|
2354
2382
|
context[:gem_name] = 'aws-sdk-core'
|
|
2355
|
-
context[:gem_version] = '3.
|
|
2383
|
+
context[:gem_version] = '3.199.0'
|
|
2356
2384
|
Seahorse::Client::Request.new(handlers, context)
|
|
2357
2385
|
end
|
|
2358
2386
|
|
|
@@ -24,7 +24,7 @@ module Aws::STS
|
|
|
24
24
|
Credentials = Shapes::StructureShape.new(name: 'Credentials')
|
|
25
25
|
DecodeAuthorizationMessageRequest = Shapes::StructureShape.new(name: 'DecodeAuthorizationMessageRequest')
|
|
26
26
|
DecodeAuthorizationMessageResponse = Shapes::StructureShape.new(name: 'DecodeAuthorizationMessageResponse')
|
|
27
|
-
ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
|
|
27
|
+
ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException', error: {"code"=>"ExpiredTokenException", "httpStatusCode"=>400, "senderFault"=>true})
|
|
28
28
|
FederatedUser = Shapes::StructureShape.new(name: 'FederatedUser')
|
|
29
29
|
GetAccessKeyInfoRequest = Shapes::StructureShape.new(name: 'GetAccessKeyInfoRequest')
|
|
30
30
|
GetAccessKeyInfoResponse = Shapes::StructureShape.new(name: 'GetAccessKeyInfoResponse')
|
|
@@ -34,18 +34,18 @@ module Aws::STS
|
|
|
34
34
|
GetFederationTokenResponse = Shapes::StructureShape.new(name: 'GetFederationTokenResponse')
|
|
35
35
|
GetSessionTokenRequest = Shapes::StructureShape.new(name: 'GetSessionTokenRequest')
|
|
36
36
|
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')
|
|
37
|
+
IDPCommunicationErrorException = Shapes::StructureShape.new(name: 'IDPCommunicationErrorException', error: {"code"=>"IDPCommunicationError", "httpStatusCode"=>400, "senderFault"=>true})
|
|
38
|
+
IDPRejectedClaimException = Shapes::StructureShape.new(name: 'IDPRejectedClaimException', error: {"code"=>"IDPRejectedClaim", "httpStatusCode"=>403, "senderFault"=>true})
|
|
39
|
+
InvalidAuthorizationMessageException = Shapes::StructureShape.new(name: 'InvalidAuthorizationMessageException', error: {"code"=>"InvalidAuthorizationMessageException", "httpStatusCode"=>400, "senderFault"=>true})
|
|
40
|
+
InvalidIdentityTokenException = Shapes::StructureShape.new(name: 'InvalidIdentityTokenException', error: {"code"=>"InvalidIdentityToken", "httpStatusCode"=>400, "senderFault"=>true})
|
|
41
41
|
Issuer = Shapes::StringShape.new(name: 'Issuer')
|
|
42
|
-
MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException')
|
|
42
|
+
MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException', error: {"code"=>"MalformedPolicyDocument", "httpStatusCode"=>400, "senderFault"=>true})
|
|
43
43
|
NameQualifier = Shapes::StringShape.new(name: 'NameQualifier')
|
|
44
|
-
PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException')
|
|
44
|
+
PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException', error: {"code"=>"PackedPolicyTooLarge", "httpStatusCode"=>400, "senderFault"=>true})
|
|
45
45
|
PolicyDescriptorType = Shapes::StructureShape.new(name: 'PolicyDescriptorType')
|
|
46
46
|
ProvidedContext = Shapes::StructureShape.new(name: 'ProvidedContext')
|
|
47
47
|
ProvidedContextsListType = Shapes::ListShape.new(name: 'ProvidedContextsListType')
|
|
48
|
-
RegionDisabledException = Shapes::StructureShape.new(name: 'RegionDisabledException')
|
|
48
|
+
RegionDisabledException = Shapes::StructureShape.new(name: 'RegionDisabledException', error: {"code"=>"RegionDisabledException", "httpStatusCode"=>403, "senderFault"=>true})
|
|
49
49
|
SAMLAssertionType = Shapes::StringShape.new(name: 'SAMLAssertionType')
|
|
50
50
|
Subject = Shapes::StringShape.new(name: 'Subject')
|
|
51
51
|
SubjectType = Shapes::StringShape.new(name: 'SubjectType')
|
data/lib/aws-sdk-sts.rb
CHANGED
|
@@ -5,12 +5,12 @@ module Seahorse
|
|
|
5
5
|
class AsyncBase < Seahorse::Client::Base
|
|
6
6
|
|
|
7
7
|
# default H2 plugins
|
|
8
|
+
# @api private
|
|
8
9
|
@plugins = PluginList.new([
|
|
9
10
|
Plugins::Endpoint,
|
|
10
11
|
Plugins::H2,
|
|
11
12
|
Plugins::ResponseTarget
|
|
12
13
|
])
|
|
13
|
-
|
|
14
14
|
def initialize(plugins, options)
|
|
15
15
|
super
|
|
16
16
|
@connection = H2::Connection.new(options)
|
|
@@ -12,24 +12,43 @@ module Seahorse
|
|
|
12
12
|
@sync_queue = options[:sync_queue]
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
# @return [RequestContext]
|
|
15
16
|
def context
|
|
16
17
|
@response.context
|
|
17
18
|
end
|
|
18
19
|
|
|
20
|
+
# @return [StandardError, nil]
|
|
19
21
|
def error
|
|
20
22
|
@response.error
|
|
21
23
|
end
|
|
22
24
|
|
|
25
|
+
# @overload on(status_code, &block)
|
|
26
|
+
# @param [Integer] status_code The block will be
|
|
27
|
+
# triggered only for responses with the given status code.
|
|
28
|
+
#
|
|
29
|
+
# @overload on(status_code_range, &block)
|
|
30
|
+
# @param [Range<Integer>] status_code_range The block will be
|
|
31
|
+
# triggered only for responses with a status code that falls
|
|
32
|
+
# witin the given range.
|
|
33
|
+
#
|
|
34
|
+
# @return [self]
|
|
23
35
|
def on(range, &block)
|
|
24
36
|
@response.on(range, &block)
|
|
25
37
|
self
|
|
26
38
|
end
|
|
27
39
|
|
|
40
|
+
# @api private
|
|
28
41
|
def on_complete(&block)
|
|
29
42
|
@response.on_complete(&block)
|
|
30
43
|
self
|
|
31
44
|
end
|
|
32
45
|
|
|
46
|
+
# @return [Boolean] Returns `true` if the response is complete with
|
|
47
|
+
# no error.
|
|
48
|
+
def successful?
|
|
49
|
+
@response.error.nil?
|
|
50
|
+
end
|
|
51
|
+
|
|
33
52
|
def wait
|
|
34
53
|
if error && context.config.raise_response_errors
|
|
35
54
|
raise error
|
data/lib/seahorse/client/base.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'thread'
|
|
4
|
-
|
|
5
3
|
module Seahorse
|
|
6
4
|
module Client
|
|
7
5
|
class Base
|
|
@@ -9,6 +7,7 @@ module Seahorse
|
|
|
9
7
|
include HandlerBuilder
|
|
10
8
|
|
|
11
9
|
# default plugins
|
|
10
|
+
# @api private
|
|
12
11
|
@plugins = PluginList.new([
|
|
13
12
|
Plugins::Endpoint,
|
|
14
13
|
Plugins::NetHttp,
|
|
@@ -59,6 +58,7 @@ module Seahorse
|
|
|
59
58
|
def build_config(plugins, options)
|
|
60
59
|
config = Configuration.new
|
|
61
60
|
config.add_option(:api)
|
|
61
|
+
config.add_option(:plugins)
|
|
62
62
|
plugins.each do |plugin|
|
|
63
63
|
plugin.add_options(config) if plugin.respond_to?(:add_options)
|
|
64
64
|
end
|
|
@@ -95,9 +95,9 @@ module Seahorse
|
|
|
95
95
|
class << self
|
|
96
96
|
|
|
97
97
|
def new(options = {})
|
|
98
|
-
plugins = build_plugins
|
|
99
98
|
options = options.dup
|
|
100
|
-
|
|
99
|
+
plugins = build_plugins(self.plugins + options.fetch(:plugins, []))
|
|
100
|
+
plugins = before_initialize(plugins, options)
|
|
101
101
|
client = allocate
|
|
102
102
|
client.send(:initialize, plugins, options)
|
|
103
103
|
client
|
|
@@ -208,17 +208,28 @@ module Seahorse
|
|
|
208
208
|
include(operations_module)
|
|
209
209
|
end
|
|
210
210
|
|
|
211
|
-
def build_plugins
|
|
211
|
+
def build_plugins(plugins)
|
|
212
212
|
plugins.map { |plugin| plugin.is_a?(Class) ? plugin.new : plugin }
|
|
213
213
|
end
|
|
214
214
|
|
|
215
215
|
def before_initialize(plugins, options)
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
queue = Queue.new
|
|
217
|
+
plugins.each { |plugin| queue.push(plugin) }
|
|
218
|
+
until queue.empty?
|
|
219
|
+
plugin = queue.pop
|
|
220
|
+
next unless plugin.respond_to?(:before_initialize)
|
|
221
|
+
|
|
222
|
+
plugins_before = options.fetch(:plugins, [])
|
|
223
|
+
plugin.before_initialize(self, options)
|
|
224
|
+
plugins_after = build_plugins(options.fetch(:plugins, []) - plugins_before)
|
|
225
|
+
# Plugins with before_initialize can add other plugins
|
|
226
|
+
plugins_after.each { |p| queue.push(p); plugins << p }
|
|
218
227
|
end
|
|
228
|
+
plugins
|
|
219
229
|
end
|
|
220
230
|
|
|
221
231
|
def inherited(subclass)
|
|
232
|
+
super
|
|
222
233
|
subclass.instance_variable_set('@plugins', PluginList.new(@plugins))
|
|
223
234
|
end
|
|
224
235
|
|
|
@@ -126,6 +126,7 @@ module Seahorse
|
|
|
126
126
|
# https://http2.github.io/http2-spec/#rfc.section.8.1.2.3
|
|
127
127
|
def _h2_headers(req)
|
|
128
128
|
headers = {}
|
|
129
|
+
headers[':authority'] = req.endpoint.host
|
|
129
130
|
headers[':method'] = req.http_method.upcase
|
|
130
131
|
headers[':scheme'] = req.endpoint.scheme
|
|
131
132
|
headers[':path'] = req.endpoint.path.empty? ? '/' : req.endpoint.path
|
|
@@ -119,11 +119,7 @@ module Seahorse
|
|
|
119
119
|
# pool, not counting those currently in use.
|
|
120
120
|
def size
|
|
121
121
|
@pool_mutex.synchronize do
|
|
122
|
-
size
|
|
123
|
-
@pool.each_pair do |endpoint,sessions|
|
|
124
|
-
size += sessions.size
|
|
125
|
-
end
|
|
126
|
-
size
|
|
122
|
+
@pool.values.flatten.size
|
|
127
123
|
end
|
|
128
124
|
end
|
|
129
125
|
|
|
@@ -142,9 +138,7 @@ module Seahorse
|
|
|
142
138
|
# @return [nil]
|
|
143
139
|
def empty!
|
|
144
140
|
@pool_mutex.synchronize do
|
|
145
|
-
@pool.
|
|
146
|
-
sessions.each(&:finish)
|
|
147
|
-
end
|
|
141
|
+
@pool.values.flatten.map(&:finish)
|
|
148
142
|
@pool.clear
|
|
149
143
|
end
|
|
150
144
|
nil
|
|
@@ -312,7 +306,7 @@ module Seahorse
|
|
|
312
306
|
# @note **Must** be called behind a `@pool_mutex` synchronize block.
|
|
313
307
|
def _clean
|
|
314
308
|
now = Aws::Util.monotonic_milliseconds
|
|
315
|
-
@pool.
|
|
309
|
+
@pool.values.each do |sessions|
|
|
316
310
|
sessions.delete_if do |session|
|
|
317
311
|
if session.last_used.nil? or now - session.last_used > http_idle_timeout * 1000
|
|
318
312
|
session.finish
|
|
@@ -111,7 +111,15 @@ module Seahorse
|
|
|
111
111
|
|
|
112
112
|
def initialize(name, options = {})
|
|
113
113
|
@name = name
|
|
114
|
+
# prevent unstable object shapes by ensuring
|
|
115
|
+
# order and presence of instance variables
|
|
116
|
+
@default = nil
|
|
117
|
+
@default_block = nil
|
|
118
|
+
@required = nil
|
|
119
|
+
@doc_type = nil
|
|
114
120
|
@doc_default = nil
|
|
121
|
+
@docstring = nil
|
|
122
|
+
@rbs_type = nil
|
|
115
123
|
options.each_pair do |opt_name, opt_value|
|
|
116
124
|
self.send("#{opt_name}=", opt_value)
|
|
117
125
|
end
|
|
@@ -7,34 +7,66 @@ module Seahorse
|
|
|
7
7
|
module Plugins
|
|
8
8
|
class NetHttp < Plugin
|
|
9
9
|
|
|
10
|
-
option(:http_proxy, default: nil, doc_type: String, docstring:
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
option(:http_proxy, default: nil, doc_type: "URI::HTTP,String", docstring: <<-DOCS)
|
|
11
|
+
A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
|
12
|
+
DOCS
|
|
13
|
+
|
|
14
|
+
option(:http_open_timeout, default: 15, doc_type: Float, docstring: <<-DOCS) do |cfg|
|
|
15
|
+
The default number of seconds to wait for response data.
|
|
16
|
+
This value can safely be set per-request on the session.
|
|
17
|
+
DOCS
|
|
13
18
|
resolve_http_open_timeout(cfg)
|
|
14
19
|
end
|
|
15
20
|
|
|
16
|
-
option(:http_read_timeout, default: 60, doc_type:
|
|
21
|
+
option(:http_read_timeout, default: 60, doc_type: Float, docstring: <<-DOCS) do |cfg|
|
|
22
|
+
The default number of seconds to wait for response data.
|
|
23
|
+
This value can safely be set per-request on the session.
|
|
24
|
+
DOCS
|
|
17
25
|
resolve_http_read_timeout(cfg)
|
|
18
26
|
end
|
|
19
27
|
|
|
20
|
-
option(:http_idle_timeout, default: 5, doc_type:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
option(:
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
option(:http_idle_timeout, default: 5, doc_type: Float, docstring: <<-DOCS)
|
|
29
|
+
The number of seconds a connection is allowed to sit idle before it
|
|
30
|
+
is considered stale. Stale connections are closed and removed from the
|
|
31
|
+
pool before making a request.
|
|
32
|
+
DOCS
|
|
33
|
+
|
|
34
|
+
option(:http_continue_timeout, default: 1, doc_type: Float, docstring: <<-DOCS)
|
|
35
|
+
The number of seconds to wait for a 100-continue response before sending the
|
|
36
|
+
request body. This option has no effect unless the request has "Expect"
|
|
37
|
+
header set to "100-continue". Defaults to `nil` which disables this
|
|
38
|
+
behaviour. This value can safely be set per request on the session.
|
|
39
|
+
DOCS
|
|
40
|
+
|
|
41
|
+
option(:http_wire_trace, default: false, doc_type: 'Boolean', docstring: <<-DOCS)
|
|
42
|
+
When `true`, HTTP debug output will be sent to the `:logger`.
|
|
43
|
+
DOCS
|
|
44
|
+
|
|
45
|
+
option(:ssl_verify_peer, default: true, doc_type: 'Boolean', docstring: <<-DOCS)
|
|
46
|
+
When `true`, SSL peer certificates are verified when establishing a connection.
|
|
47
|
+
DOCS
|
|
48
|
+
|
|
49
|
+
option(:ssl_ca_bundle, doc_type: String, docstring: <<-DOCS) do |cfg|
|
|
50
|
+
Full path to the SSL certificate authority bundle file that should be used when
|
|
51
|
+
verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
|
52
|
+
`:ssl_ca_directory` the the system default will be used if available.
|
|
53
|
+
DOCS
|
|
29
54
|
ENV['AWS_CA_BUNDLE'] ||
|
|
30
55
|
Aws.shared_config.ca_bundle(profile: cfg.profile) if cfg.respond_to?(:profile)
|
|
31
56
|
end
|
|
32
57
|
|
|
33
|
-
option(:ssl_ca_directory, default: nil, doc_type: String, docstring:
|
|
58
|
+
option(:ssl_ca_directory, default: nil, doc_type: String, docstring: <<-DOCS)
|
|
59
|
+
Full path of the directory that contains the unbundled SSL certificate
|
|
60
|
+
authority files for verifying peer certificates. If you do
|
|
61
|
+
not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
|
62
|
+
default will be used if available.
|
|
63
|
+
DOCS
|
|
34
64
|
|
|
35
|
-
option(:ssl_ca_store, default: nil, doc_type: String, docstring:
|
|
65
|
+
option(:ssl_ca_store, default: nil, doc_type: String, docstring: <<-DOCS)
|
|
66
|
+
Sets the X509::Store to verify peer certificate.
|
|
67
|
+
DOCS
|
|
36
68
|
|
|
37
|
-
option(:ssl_timeout, default: nil, doc_type: Float, docstring: '') do |cfg|
|
|
69
|
+
option(:ssl_timeout, default: nil, doc_type: Float, docstring: 'Sets the SSL timeout in seconds') do |cfg|
|
|
38
70
|
resolve_ssl_timeout(cfg)
|
|
39
71
|
end
|
|
40
72
|
|
|
@@ -75,7 +75,7 @@ module Seahorse
|
|
|
75
75
|
|
|
76
76
|
# @return [String, nil]
|
|
77
77
|
def location_name
|
|
78
|
-
@location_name || (shape && shape[
|
|
78
|
+
@location_name || (shape && shape['locationName'])
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
def location_name= location_name
|
|
@@ -86,7 +86,7 @@ module Seahorse
|
|
|
86
86
|
def [](key)
|
|
87
87
|
if @metadata.key?(key.to_s)
|
|
88
88
|
@metadata[key.to_s]
|
|
89
|
-
|
|
89
|
+
elsif @shape
|
|
90
90
|
@shape[key.to_s]
|
|
91
91
|
end
|
|
92
92
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aws-sdk-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.199.0
|
|
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-
|
|
11
|
+
date: 2024-06-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jmespath
|
|
@@ -111,6 +111,10 @@ files:
|
|
|
111
111
|
- lib/aws-sdk-core/binary/event_parser.rb
|
|
112
112
|
- lib/aws-sdk-core/binary/event_stream_decoder.rb
|
|
113
113
|
- lib/aws-sdk-core/binary/event_stream_encoder.rb
|
|
114
|
+
- lib/aws-sdk-core/cbor.rb
|
|
115
|
+
- lib/aws-sdk-core/cbor/cbor_engine.rb
|
|
116
|
+
- lib/aws-sdk-core/cbor/decoder.rb
|
|
117
|
+
- lib/aws-sdk-core/cbor/encoder.rb
|
|
114
118
|
- lib/aws-sdk-core/client_side_monitoring/publisher.rb
|
|
115
119
|
- lib/aws-sdk-core/client_side_monitoring/request_metrics.rb
|
|
116
120
|
- lib/aws-sdk-core/client_stubs.rb
|
|
@@ -136,6 +140,7 @@ files:
|
|
|
136
140
|
- lib/aws-sdk-core/endpoints/templater.rb
|
|
137
141
|
- lib/aws-sdk-core/endpoints/tree_rule.rb
|
|
138
142
|
- lib/aws-sdk-core/endpoints/url.rb
|
|
143
|
+
- lib/aws-sdk-core/error_handler.rb
|
|
139
144
|
- lib/aws-sdk-core/errors.rb
|
|
140
145
|
- lib/aws-sdk-core/event_emitter.rb
|
|
141
146
|
- lib/aws-sdk-core/ini_parser.rb
|
|
@@ -151,6 +156,7 @@ files:
|
|
|
151
156
|
- lib/aws-sdk-core/log/handler.rb
|
|
152
157
|
- lib/aws-sdk-core/log/param_filter.rb
|
|
153
158
|
- lib/aws-sdk-core/log/param_formatter.rb
|
|
159
|
+
- lib/aws-sdk-core/lru_cache.rb
|
|
154
160
|
- lib/aws-sdk-core/pageable_response.rb
|
|
155
161
|
- lib/aws-sdk-core/pager.rb
|
|
156
162
|
- lib/aws-sdk-core/param_converter.rb
|
|
@@ -183,6 +189,7 @@ files:
|
|
|
183
189
|
- lib/aws-sdk-core/plugins/protocols/query.rb
|
|
184
190
|
- lib/aws-sdk-core/plugins/protocols/rest_json.rb
|
|
185
191
|
- lib/aws-sdk-core/plugins/protocols/rest_xml.rb
|
|
192
|
+
- lib/aws-sdk-core/plugins/protocols/rpc_v2.rb
|
|
186
193
|
- lib/aws-sdk-core/plugins/recursion_detection.rb
|
|
187
194
|
- lib/aws-sdk-core/plugins/regional_endpoint.rb
|
|
188
195
|
- lib/aws-sdk-core/plugins/request_compression.rb
|
|
@@ -200,6 +207,7 @@ files:
|
|
|
200
207
|
- lib/aws-sdk-core/plugins/user_agent.rb
|
|
201
208
|
- lib/aws-sdk-core/process_credentials.rb
|
|
202
209
|
- lib/aws-sdk-core/query.rb
|
|
210
|
+
- lib/aws-sdk-core/query/ec2_handler.rb
|
|
203
211
|
- lib/aws-sdk-core/query/ec2_param_builder.rb
|
|
204
212
|
- lib/aws-sdk-core/query/handler.rb
|
|
205
213
|
- lib/aws-sdk-core/query/param.rb
|
|
@@ -209,6 +217,7 @@ files:
|
|
|
209
217
|
- lib/aws-sdk-core/refreshing_token.rb
|
|
210
218
|
- lib/aws-sdk-core/resources/collection.rb
|
|
211
219
|
- lib/aws-sdk-core/rest.rb
|
|
220
|
+
- lib/aws-sdk-core/rest/content_type_handler.rb
|
|
212
221
|
- lib/aws-sdk-core/rest/handler.rb
|
|
213
222
|
- lib/aws-sdk-core/rest/request/body.rb
|
|
214
223
|
- lib/aws-sdk-core/rest/request/builder.rb
|
|
@@ -216,9 +225,16 @@ files:
|
|
|
216
225
|
- lib/aws-sdk-core/rest/request/headers.rb
|
|
217
226
|
- lib/aws-sdk-core/rest/request/querystring_builder.rb
|
|
218
227
|
- lib/aws-sdk-core/rest/response/body.rb
|
|
228
|
+
- lib/aws-sdk-core/rest/response/header_list_parser.rb
|
|
219
229
|
- lib/aws-sdk-core/rest/response/headers.rb
|
|
220
230
|
- lib/aws-sdk-core/rest/response/parser.rb
|
|
221
231
|
- lib/aws-sdk-core/rest/response/status_code.rb
|
|
232
|
+
- lib/aws-sdk-core/rpc_v2.rb
|
|
233
|
+
- lib/aws-sdk-core/rpc_v2/builder.rb
|
|
234
|
+
- lib/aws-sdk-core/rpc_v2/content_type_handler.rb
|
|
235
|
+
- lib/aws-sdk-core/rpc_v2/error_handler.rb
|
|
236
|
+
- lib/aws-sdk-core/rpc_v2/handler.rb
|
|
237
|
+
- lib/aws-sdk-core/rpc_v2/parser.rb
|
|
222
238
|
- lib/aws-sdk-core/shared_config.rb
|
|
223
239
|
- lib/aws-sdk-core/shared_credentials.rb
|
|
224
240
|
- lib/aws-sdk-core/sso_credentials.rb
|
|
@@ -234,6 +250,7 @@ files:
|
|
|
234
250
|
- lib/aws-sdk-core/stubbing/protocols/rest.rb
|
|
235
251
|
- lib/aws-sdk-core/stubbing/protocols/rest_json.rb
|
|
236
252
|
- lib/aws-sdk-core/stubbing/protocols/rest_xml.rb
|
|
253
|
+
- lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb
|
|
237
254
|
- lib/aws-sdk-core/stubbing/stub_data.rb
|
|
238
255
|
- lib/aws-sdk-core/stubbing/xml_error.rb
|
|
239
256
|
- lib/aws-sdk-core/token.rb
|
|
@@ -252,13 +269,13 @@ files:
|
|
|
252
269
|
- lib/aws-sdk-core/xml/doc_builder.rb
|
|
253
270
|
- lib/aws-sdk-core/xml/error_handler.rb
|
|
254
271
|
- lib/aws-sdk-core/xml/parser.rb
|
|
255
|
-
- lib/aws-sdk-core/xml/parser/engines/libxml.rb
|
|
256
|
-
- lib/aws-sdk-core/xml/parser/engines/nokogiri.rb
|
|
257
|
-
- lib/aws-sdk-core/xml/parser/engines/oga.rb
|
|
258
|
-
- lib/aws-sdk-core/xml/parser/engines/ox.rb
|
|
259
|
-
- lib/aws-sdk-core/xml/parser/engines/rexml.rb
|
|
260
272
|
- lib/aws-sdk-core/xml/parser/frame.rb
|
|
273
|
+
- lib/aws-sdk-core/xml/parser/libxml_engine.rb
|
|
274
|
+
- lib/aws-sdk-core/xml/parser/nokogiri_engine.rb
|
|
275
|
+
- lib/aws-sdk-core/xml/parser/oga_engine.rb
|
|
276
|
+
- lib/aws-sdk-core/xml/parser/ox_engine.rb
|
|
261
277
|
- lib/aws-sdk-core/xml/parser/parsing_error.rb
|
|
278
|
+
- lib/aws-sdk-core/xml/parser/rexml_engine.rb
|
|
262
279
|
- lib/aws-sdk-core/xml/parser/stack.rb
|
|
263
280
|
- lib/aws-sdk-sso.rb
|
|
264
281
|
- lib/aws-sdk-sso/client.rb
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|