aws-sdk-core 3.124.0 → 3.125.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +153 -0
- data/lib/aws-defaults/defaults_mode_config_resolver.rb +107 -0
- data/lib/aws-defaults.rb +3 -0
- data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
- data/lib/aws-sdk-core/plugins/retry_errors.rb +9 -3
- data/lib/aws-sdk-core/shared_config.rb +2 -1
- data/lib/aws-sdk-core/xml/parser/engines/ox.rb +1 -1
- data/lib/aws-sdk-core.rb +3 -0
- data/lib/aws-sdk-sso/client.rb +11 -2
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +11 -2
- data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +5 -1
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +7 -0
- data/lib/seahorse/client/plugins/net_http.rb +33 -2
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e0d8c009bf3f995fc7c5e1d07ca35f159fb144e9f8a6e8ee69a6b6276f74c3a
|
4
|
+
data.tar.gz: a710b35aa3f6e1d9d8861daa5801ee9b901ec37ba9a8f64a84b1b4d148513012
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41adb70044beb5e732a049e9ea3ba0a4bdd2368749ae43e0cda71f71e2ff2e3725cb2647107096ecb561a098bc676ab31140294aa98b9543f5794224c73a2895
|
7
|
+
data.tar.gz: 3c83325c9da34ccf75aa6fb52cbd1b65bbd803b10b7b74554e6237d95b4e9d6674894be73c7e680d4f4f65f2ea1f8745c2dc05b1fe527b817a644287c393b511
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
3.125.1 (2022-01-04)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Issue - Parse a response with consecutive spaces correctly when ox is used as the XML parser.
|
8
|
+
|
9
|
+
3.125.0 (2021-12-21)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Updated Aws::SSO::Client with the latest API changes.
|
13
|
+
|
14
|
+
* Feature - Add `:defaults_mode` configuration - that determines how certain default configuration options are resolved in the SDK.
|
15
|
+
|
4
16
|
3.124.0 (2021-11-30)
|
5
17
|
------------------
|
6
18
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.125.1
|
@@ -0,0 +1,153 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'defaults_mode_config_resolver'
|
4
|
+
|
5
|
+
module Aws
|
6
|
+
|
7
|
+
# A defaults mode determines how certain default configuration options are resolved in the SDK.
|
8
|
+
#
|
9
|
+
# *Note*: For any mode other than `'legacy'` the vended default values might change as best practices may
|
10
|
+
# evolve. As a result, it is encouraged to perform testing when upgrading the SDK if you are using a mode other than
|
11
|
+
# `'legacy'`. While the `'legacy'` defaults mode is specific to Ruby,
|
12
|
+
# other modes are standardized across all of the AWS SDKs.
|
13
|
+
#
|
14
|
+
# The defaults mode can be configured:
|
15
|
+
#
|
16
|
+
# * Directly on a client via `:defaults_mode`
|
17
|
+
#
|
18
|
+
# * On a configuration profile via the "defaults_mode" profile file property.
|
19
|
+
#
|
20
|
+
# * Globally via the "AWS_DEFAULTS_MODE" environment variable.
|
21
|
+
#
|
22
|
+
#
|
23
|
+
# @code_generation START - documentation
|
24
|
+
# The following `:default_mode` values are supported:
|
25
|
+
#
|
26
|
+
# * `'standard'` -
|
27
|
+
# The STANDARD mode provides the latest recommended default values
|
28
|
+
# that should be safe to run in most scenarios
|
29
|
+
#
|
30
|
+
# Note that the default values vended from this mode might change as
|
31
|
+
# best practices may evolve. As a result, it is encouraged to perform
|
32
|
+
# tests when upgrading the SDK
|
33
|
+
#
|
34
|
+
# * `'in-region'` -
|
35
|
+
# The IN\_REGION mode builds on the standard mode and includes
|
36
|
+
# optimization tailored for applications which call AWS services from
|
37
|
+
# within the same AWS region
|
38
|
+
#
|
39
|
+
# Note that the default values vended from this mode might change as
|
40
|
+
# best practices may evolve. As a result, it is encouraged to perform
|
41
|
+
# tests when upgrading the SDK
|
42
|
+
#
|
43
|
+
# * `'cross-region'` -
|
44
|
+
# The CROSS\_REGION mode builds on the standard mode and includes
|
45
|
+
# optimization tailored for applications which call AWS services in a
|
46
|
+
# different region
|
47
|
+
#
|
48
|
+
# Note that the default values vended from this mode might change as
|
49
|
+
# best practices may evolve. As a result, it is encouraged to perform
|
50
|
+
# tests when upgrading the SDK
|
51
|
+
#
|
52
|
+
# * `'mobile'` -
|
53
|
+
# The MOBILE mode builds on the standard mode and includes
|
54
|
+
# optimization tailored for mobile applications
|
55
|
+
#
|
56
|
+
# Note that the default values vended from this mode might change as
|
57
|
+
# best practices may evolve. As a result, it is encouraged to perform
|
58
|
+
# tests when upgrading the SDK
|
59
|
+
#
|
60
|
+
# * `'auto'` -
|
61
|
+
# The AUTO mode is an experimental mode that builds on the standard
|
62
|
+
# mode. The SDK will attempt to discover the execution environment to
|
63
|
+
# determine the appropriate settings automatically.
|
64
|
+
#
|
65
|
+
# Note that the auto detection is heuristics-based and does not
|
66
|
+
# guarantee 100% accuracy. STANDARD mode will be used if the execution
|
67
|
+
# environment cannot be determined. The auto detection might query
|
68
|
+
# [EC2 Instance Metadata service][1], which might introduce latency.
|
69
|
+
# Therefore we recommend choosing an explicit defaults\_mode instead
|
70
|
+
# if startup latency is critical to your application
|
71
|
+
#
|
72
|
+
# * `'legacy'` -
|
73
|
+
# The LEGACY mode provides default settings that vary per SDK and were
|
74
|
+
# used prior to establishment of defaults\_mode
|
75
|
+
#
|
76
|
+
# Based on the provided mode, the SDK will vend sensible default values
|
77
|
+
# tailored to the mode for the following settings:
|
78
|
+
#
|
79
|
+
# * `:retry_mode` -
|
80
|
+
# A retry mode specifies how the SDK attempts retries. See [Retry
|
81
|
+
# Mode][2]
|
82
|
+
#
|
83
|
+
# * `:sts_regional_endpoints` -
|
84
|
+
# Specifies how the SDK determines the AWS service endpoint that it
|
85
|
+
# uses to talk to the AWS Security Token Service (AWS STS). See
|
86
|
+
# [Setting STS Regional endpoints][3]
|
87
|
+
#
|
88
|
+
# * `:s3_us_east_1_regional_endpoint` -
|
89
|
+
# Specifies how the SDK determines the AWS service endpoint that it
|
90
|
+
# uses to talk to the Amazon S3 for the us-east-1 region
|
91
|
+
#
|
92
|
+
# * `:http_open_timeout` -
|
93
|
+
# The amount of time after making an initial connection attempt on a
|
94
|
+
# socket, where if the client does not receive a completion of the
|
95
|
+
# connect handshake, the client gives up and fails the operation
|
96
|
+
#
|
97
|
+
# * `:ssl_timeout` -
|
98
|
+
# The maximum amount of time that a TLS handshake is allowed to take
|
99
|
+
# from the time the CLIENT HELLO message is sent to ethe time the
|
100
|
+
# client and server have fully negotiated ciphers and exchanged keys
|
101
|
+
#
|
102
|
+
# All options above can be configured by users, and the overridden value will take precedence.
|
103
|
+
#
|
104
|
+
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
|
105
|
+
# [2]: https://docs.aws.amazon.com/sdkref/latest/guide/setting-global-retry_mode.html
|
106
|
+
# [3]: https://docs.aws.amazon.com/sdkref/latest/guide/setting-global-sts_regional_endpoints.html
|
107
|
+
#
|
108
|
+
# @code_generation END - documentation
|
109
|
+
module DefaultsModeConfiguration
|
110
|
+
# @api private
|
111
|
+
# @code_generation START - configuration
|
112
|
+
SDK_DEFAULT_CONFIGURATION =
|
113
|
+
{
|
114
|
+
"version" => 1,
|
115
|
+
"base" => {
|
116
|
+
"retryMode" => "standard",
|
117
|
+
"stsRegionalEndpoints" => "regional",
|
118
|
+
"s3UsEast1RegionalEndpoints" => "regional",
|
119
|
+
"connectTimeoutInMillis" => 1100,
|
120
|
+
"tlsNegotiationTimeoutInMillis" => 1100
|
121
|
+
},
|
122
|
+
"modes" => {
|
123
|
+
"standard" => {
|
124
|
+
"connectTimeoutInMillis" => {
|
125
|
+
"override" => 3100
|
126
|
+
},
|
127
|
+
"tlsNegotiationTimeoutInMillis" => {
|
128
|
+
"override" => 3100
|
129
|
+
}
|
130
|
+
},
|
131
|
+
"in-region" => {
|
132
|
+
},
|
133
|
+
"cross-region" => {
|
134
|
+
"connectTimeoutInMillis" => {
|
135
|
+
"override" => 3100
|
136
|
+
},
|
137
|
+
"tlsNegotiationTimeoutInMillis" => {
|
138
|
+
"override" => 3100
|
139
|
+
}
|
140
|
+
},
|
141
|
+
"mobile" => {
|
142
|
+
"connectTimeoutInMillis" => {
|
143
|
+
"override" => 30000
|
144
|
+
},
|
145
|
+
"tlsNegotiationTimeoutInMillis" => {
|
146
|
+
"override" => 30000
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
# @code_generation END - configuration
|
152
|
+
end
|
153
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
#@api private
|
5
|
+
class DefaultsModeConfigResolver
|
6
|
+
|
7
|
+
@@application_region = nil
|
8
|
+
@@application_region_mutex = Mutex.new
|
9
|
+
@@imds_client = EC2Metadata.new(retries: 0, http_open_timeout: 0.01)
|
10
|
+
|
11
|
+
# mappings from Ruby SDK configuration names to the
|
12
|
+
# sdk defaults option names and (optional) scale modifiers
|
13
|
+
CFG_OPTIONS = {
|
14
|
+
retry_mode: { name: "retryMode" },
|
15
|
+
sts_regional_endpoints: { name: "stsRegionalEndpoints" },
|
16
|
+
s3_us_east_1_regional_endpoint: { name: "s3UsEast1RegionalEndpoints" },
|
17
|
+
http_open_timeout: { name: "connectTimeoutInMillis", scale: 0.001 },
|
18
|
+
http_read_timeout: { name: "timeToFirstByteTimeoutInMillis", scale: 0.001 },
|
19
|
+
ssl_timeout: { name: "tlsNegotiationTimeoutInMillis", scale: 0.001 }
|
20
|
+
}.freeze
|
21
|
+
|
22
|
+
def initialize(sdk_defaults, cfg)
|
23
|
+
@sdk_defaults = sdk_defaults
|
24
|
+
@cfg = cfg
|
25
|
+
@resolved_mode = nil
|
26
|
+
@mutex = Mutex.new
|
27
|
+
end
|
28
|
+
|
29
|
+
# option_name should be the symbolized ruby name to resolve
|
30
|
+
# returns the ruby appropriate value or nil if none are resolved
|
31
|
+
def resolve(option_name)
|
32
|
+
return unless (std_option = CFG_OPTIONS[option_name])
|
33
|
+
mode = resolved_mode.downcase
|
34
|
+
|
35
|
+
return nil if mode == 'legacy'
|
36
|
+
|
37
|
+
value = resolve_for_mode(std_option[:name], mode)
|
38
|
+
value = value * std_option[:scale] if value && std_option[:scale]
|
39
|
+
|
40
|
+
value
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
def resolved_mode
|
45
|
+
@mutex.synchronize do
|
46
|
+
return @resolved_mode unless @resolved_mode.nil?
|
47
|
+
|
48
|
+
@resolved_mode = @cfg.defaults_mode == 'auto' ? resolve_auto_mode : @cfg.defaults_mode
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def resolve_auto_mode
|
53
|
+
return "mobile" if env_mobile?
|
54
|
+
|
55
|
+
region = application_current_region
|
56
|
+
|
57
|
+
if region
|
58
|
+
@cfg.region == region ? "in-region": "cross-region"
|
59
|
+
else
|
60
|
+
# We don't seem to be mobile, and we couldn't determine whether we're running within an AWS region. Fall back to standard.
|
61
|
+
'standard'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def application_current_region
|
66
|
+
resolved_region = @@application_region_mutex.synchronize do
|
67
|
+
return @@application_region unless @@application_region.nil?
|
68
|
+
|
69
|
+
region = nil
|
70
|
+
if ENV['AWS_EXECUTION_ENV']
|
71
|
+
region = ENV['AWS_REGION'] || ENV['AWS_DEFAULT_REGION']
|
72
|
+
end
|
73
|
+
|
74
|
+
if region.nil? && ENV['AWS_EC2_METADATA_DISABLED']&.downcase != "true"
|
75
|
+
begin
|
76
|
+
region = @@imds_client.get('/latest/meta-data/placement/region')
|
77
|
+
rescue
|
78
|
+
# unable to get region, leave it unset
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# required so that we cache the unknown/nil result
|
83
|
+
@@application_region = region || :unknown
|
84
|
+
end
|
85
|
+
resolved_region == :unknown ? nil : resolved_region
|
86
|
+
end
|
87
|
+
|
88
|
+
def resolve_for_mode(name, mode)
|
89
|
+
base_value = @sdk_defaults['base'][name]
|
90
|
+
mode_value = @sdk_defaults['modes'].fetch(mode, {})[name]
|
91
|
+
|
92
|
+
if mode_value.nil?
|
93
|
+
return base_value
|
94
|
+
end
|
95
|
+
|
96
|
+
return mode_value['override'] unless mode_value['override'].nil?
|
97
|
+
return base_value + mode_value['add'] unless mode_value['add'].nil?
|
98
|
+
return base_value * mode_value['multiply'] unless mode_value['multiply'].nil?
|
99
|
+
return base_value
|
100
|
+
end
|
101
|
+
|
102
|
+
def env_mobile?
|
103
|
+
false
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
107
|
+
end
|
data/lib/aws-defaults.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
# @api private
|
5
|
+
module Plugins
|
6
|
+
# @api private
|
7
|
+
class DefaultsMode < Seahorse::Client::Plugin
|
8
|
+
|
9
|
+
option(:defaults_mode,
|
10
|
+
default: 'legacy',
|
11
|
+
doc_type: String,
|
12
|
+
docstring: <<-DOCS
|
13
|
+
See {Aws::DefaultsModeConfiguration} for a list of the
|
14
|
+
accepted modes and the configuration defaults that are included.
|
15
|
+
DOCS
|
16
|
+
) do |cfg|
|
17
|
+
resolve_defaults_mode(cfg)
|
18
|
+
end
|
19
|
+
|
20
|
+
option(:defaults_mode_config_resolver,
|
21
|
+
doc_type: 'Aws::DefaultsModeConfigResolver') do |cfg|
|
22
|
+
Aws::DefaultsModeConfigResolver.new(
|
23
|
+
Aws::DefaultsModeConfiguration::SDK_DEFAULT_CONFIGURATION, cfg)
|
24
|
+
end
|
25
|
+
|
26
|
+
class << self
|
27
|
+
private
|
28
|
+
|
29
|
+
def resolve_defaults_mode(cfg)
|
30
|
+
value = ENV['AWS_DEFAULTS_MODE']
|
31
|
+
value ||= Aws.shared_config.defaults_mode(
|
32
|
+
profile: cfg.profile
|
33
|
+
)
|
34
|
+
value&.downcase || "legacy"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -163,9 +163,15 @@ a clock skew correction and retry requests with skewed client clocks.
|
|
163
163
|
option(:clock_skew) { Retries::ClockSkew.new }
|
164
164
|
|
165
165
|
def self.resolve_retry_mode(cfg)
|
166
|
-
|
167
|
-
|
168
|
-
|
166
|
+
default_mode_value =
|
167
|
+
if cfg.respond_to?(:defaults_mode_config_resolver)
|
168
|
+
cfg.defaults_mode_config_resolver.resolve(:retry_mode)
|
169
|
+
end
|
170
|
+
|
171
|
+
value = ENV['AWS_RETRY_MODE'] ||
|
172
|
+
Aws.shared_config.retry_mode(profile: cfg.profile) ||
|
173
|
+
default_mode_value ||
|
174
|
+
'legacy'
|
169
175
|
# Raise if provided value is not one of the retry modes
|
170
176
|
if value != 'legacy' && value != 'standard' && value != 'adaptive'
|
171
177
|
raise ArgumentError,
|
data/lib/aws-sdk-core.rb
CHANGED
data/lib/aws-sdk-sso/client.rb
CHANGED
@@ -27,6 +27,7 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
27
27
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
28
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
|
+
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
30
31
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
31
32
|
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
32
33
|
|
@@ -73,6 +74,7 @@ module Aws::SSO
|
|
73
74
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
74
75
|
add_plugin(Aws::Plugins::TransferEncoding)
|
75
76
|
add_plugin(Aws::Plugins::HttpChecksum)
|
77
|
+
add_plugin(Aws::Plugins::DefaultsMode)
|
76
78
|
add_plugin(Aws::Plugins::SignatureV4)
|
77
79
|
add_plugin(Aws::Plugins::Protocols::RestJson)
|
78
80
|
|
@@ -175,6 +177,10 @@ module Aws::SSO
|
|
175
177
|
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
176
178
|
# a clock skew correction and retry requests with skewed client clocks.
|
177
179
|
#
|
180
|
+
# @option options [String] :defaults_mode ("legacy")
|
181
|
+
# See {Aws::DefaultsModeConfiguration} for a list of the
|
182
|
+
# accepted modes and the configuration defaults that are included.
|
183
|
+
#
|
178
184
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
179
185
|
# Set to true to disable SDK automatically adding host prefix
|
180
186
|
# to default service endpoint when available.
|
@@ -297,7 +303,7 @@ module Aws::SSO
|
|
297
303
|
# seconds to wait when opening a HTTP session before raising a
|
298
304
|
# `Timeout::Error`.
|
299
305
|
#
|
300
|
-
# @option options [
|
306
|
+
# @option options [Float] :http_read_timeout (60) The default
|
301
307
|
# number of seconds to wait for response data. This value can
|
302
308
|
# safely be set per-request on the session.
|
303
309
|
#
|
@@ -313,6 +319,9 @@ module Aws::SSO
|
|
313
319
|
# disables this behaviour. This value can safely be set per
|
314
320
|
# request on the session.
|
315
321
|
#
|
322
|
+
# @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
|
323
|
+
# in seconds.
|
324
|
+
#
|
316
325
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
317
326
|
# HTTP debug output will be sent to the `:logger`.
|
318
327
|
#
|
@@ -532,7 +541,7 @@ module Aws::SSO
|
|
532
541
|
params: params,
|
533
542
|
config: config)
|
534
543
|
context[:gem_name] = 'aws-sdk-core'
|
535
|
-
context[:gem_version] = '3.
|
544
|
+
context[:gem_version] = '3.125.1'
|
536
545
|
Seahorse::Client::Request.new(handlers, context)
|
537
546
|
end
|
538
547
|
|
data/lib/aws-sdk-sso.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -27,6 +27,7 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
27
27
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
28
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
|
+
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
30
31
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
31
32
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
32
33
|
require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
|
@@ -74,6 +75,7 @@ module Aws::STS
|
|
74
75
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
75
76
|
add_plugin(Aws::Plugins::TransferEncoding)
|
76
77
|
add_plugin(Aws::Plugins::HttpChecksum)
|
78
|
+
add_plugin(Aws::Plugins::DefaultsMode)
|
77
79
|
add_plugin(Aws::Plugins::SignatureV4)
|
78
80
|
add_plugin(Aws::Plugins::Protocols::Query)
|
79
81
|
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
@@ -177,6 +179,10 @@ module Aws::STS
|
|
177
179
|
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
178
180
|
# a clock skew correction and retry requests with skewed client clocks.
|
179
181
|
#
|
182
|
+
# @option options [String] :defaults_mode ("legacy")
|
183
|
+
# See {Aws::DefaultsModeConfiguration} for a list of the
|
184
|
+
# accepted modes and the configuration defaults that are included.
|
185
|
+
#
|
180
186
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
181
187
|
# Set to true to disable SDK automatically adding host prefix
|
182
188
|
# to default service endpoint when available.
|
@@ -304,7 +310,7 @@ module Aws::STS
|
|
304
310
|
# seconds to wait when opening a HTTP session before raising a
|
305
311
|
# `Timeout::Error`.
|
306
312
|
#
|
307
|
-
# @option options [
|
313
|
+
# @option options [Float] :http_read_timeout (60) The default
|
308
314
|
# number of seconds to wait for response data. This value can
|
309
315
|
# safely be set per-request on the session.
|
310
316
|
#
|
@@ -320,6 +326,9 @@ module Aws::STS
|
|
320
326
|
# disables this behaviour. This value can safely be set per
|
321
327
|
# request on the session.
|
322
328
|
#
|
329
|
+
# @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
|
330
|
+
# in seconds.
|
331
|
+
#
|
323
332
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
324
333
|
# HTTP debug output will be sent to the `:logger`.
|
325
334
|
#
|
@@ -2275,7 +2284,7 @@ module Aws::STS
|
|
2275
2284
|
params: params,
|
2276
2285
|
config: config)
|
2277
2286
|
context[:gem_name] = 'aws-sdk-core'
|
2278
|
-
context[:gem_version] = '3.
|
2287
|
+
context[:gem_version] = '3.125.1'
|
2279
2288
|
Seahorse::Client::Request.new(handlers, context)
|
2280
2289
|
end
|
2281
2290
|
|
@@ -24,7 +24,11 @@ regions to resolve to the STS global endpoint.
|
|
24
24
|
env_mode = nil if env_mode == ''
|
25
25
|
cfg_mode = Aws.shared_config.sts_regional_endpoints(
|
26
26
|
profile: cfg.profile)
|
27
|
-
|
27
|
+
default_mode_value =
|
28
|
+
if cfg.respond_to?(:defaults_mode_config_resolver)
|
29
|
+
cfg.defaults_mode_config_resolver.resolve(:sts_regional_endpoints)
|
30
|
+
end
|
31
|
+
env_mode || cfg_mode || default_mode_value || 'regional'
|
28
32
|
end
|
29
33
|
|
30
34
|
end
|
data/lib/aws-sdk-sts.rb
CHANGED
@@ -34,6 +34,7 @@ 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
38
|
}
|
38
39
|
|
39
40
|
# @api private
|
@@ -187,6 +188,9 @@ module Seahorse
|
|
187
188
|
# disables this behaviour. This value can safely be set per
|
188
189
|
# request on the session yielded by {#session_for}.
|
189
190
|
#
|
191
|
+
# @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
|
192
|
+
# in seconds.
|
193
|
+
#
|
190
194
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
191
195
|
# HTTP debug output will be sent to the `:logger`.
|
192
196
|
#
|
@@ -248,6 +252,7 @@ module Seahorse
|
|
248
252
|
:ssl_ca_bundle => options[:ssl_ca_bundle],
|
249
253
|
:ssl_ca_directory => options[:ssl_ca_directory],
|
250
254
|
:ssl_ca_store => options[:ssl_ca_store],
|
255
|
+
:ssl_timeout => options[:ssl_timeout]
|
251
256
|
}
|
252
257
|
end
|
253
258
|
|
@@ -285,6 +290,8 @@ module Seahorse
|
|
285
290
|
|
286
291
|
if endpoint.scheme == 'https'
|
287
292
|
http.use_ssl = true
|
293
|
+
http.ssl_timeout = ssl_timeout
|
294
|
+
|
288
295
|
if ssl_verify_peer?
|
289
296
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
290
297
|
http.ca_file = ssl_ca_bundle if ssl_ca_bundle
|
@@ -9,9 +9,13 @@ module Seahorse
|
|
9
9
|
|
10
10
|
option(:http_proxy, default: nil, doc_type: String, docstring: '')
|
11
11
|
|
12
|
-
option(:http_open_timeout, default: 15, doc_type: Integer, docstring: '')
|
12
|
+
option(:http_open_timeout, default: 15, doc_type: Integer, docstring: '') do |cfg|
|
13
|
+
resolve_http_open_timeout(cfg)
|
14
|
+
end
|
13
15
|
|
14
|
-
option(:http_read_timeout, default: 60, doc_type: Integer, docstring: '')
|
16
|
+
option(:http_read_timeout, default: 60, doc_type: Integer, docstring: '') do |cfg|
|
17
|
+
resolve_http_read_timeout(cfg)
|
18
|
+
end
|
15
19
|
|
16
20
|
option(:http_idle_timeout, default: 5, doc_type: Integer, docstring: '')
|
17
21
|
|
@@ -30,10 +34,37 @@ module Seahorse
|
|
30
34
|
|
31
35
|
option(:ssl_ca_store, default: nil, doc_type: String, docstring: '')
|
32
36
|
|
37
|
+
option(:ssl_timeout, default: nil, doc_type: Float, docstring: '') do |cfg|
|
38
|
+
resolve_ssl_timeout(cfg)
|
39
|
+
end
|
40
|
+
|
33
41
|
option(:logger) # for backwards compat
|
34
42
|
|
35
43
|
handler(Client::NetHttp::Handler, step: :send)
|
36
44
|
|
45
|
+
def self.resolve_http_open_timeout(cfg)
|
46
|
+
default_mode_value =
|
47
|
+
if cfg.respond_to?(:defaults_mode_config_resolver)
|
48
|
+
cfg.defaults_mode_config_resolver.resolve(:http_open_timeout)
|
49
|
+
end
|
50
|
+
default_mode_value || 15
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.resolve_http_read_timeout(cfg)
|
54
|
+
default_mode_value =
|
55
|
+
if cfg.respond_to?(:defaults_mode_config_resolver)
|
56
|
+
cfg.defaults_mode_config_resolver.resolve(:http_read_timeout)
|
57
|
+
end
|
58
|
+
default_mode_value || 60
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.resolve_ssl_timeout(cfg)
|
62
|
+
default_mode_value =
|
63
|
+
if cfg.respond_to?(:defaults_mode_config_resolver)
|
64
|
+
cfg.defaults_mode_config_resolver.resolve(:ssl_timeout)
|
65
|
+
end
|
66
|
+
default_mode_value || nil
|
67
|
+
end
|
37
68
|
end
|
38
69
|
end
|
39
70
|
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.125.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:
|
11
|
+
date: 2022-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|
@@ -89,6 +89,9 @@ files:
|
|
89
89
|
- LICENSE.txt
|
90
90
|
- VERSION
|
91
91
|
- ca-bundle.crt
|
92
|
+
- lib/aws-defaults.rb
|
93
|
+
- lib/aws-defaults/default_configuration.rb
|
94
|
+
- lib/aws-defaults/defaults_mode_config_resolver.rb
|
92
95
|
- lib/aws-sdk-core.rb
|
93
96
|
- lib/aws-sdk-core/arn.rb
|
94
97
|
- lib/aws-sdk-core/arn_parser.rb
|
@@ -139,6 +142,7 @@ files:
|
|
139
142
|
- lib/aws-sdk-core/plugins/client_metrics_plugin.rb
|
140
143
|
- lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb
|
141
144
|
- lib/aws-sdk-core/plugins/credentials_configuration.rb
|
145
|
+
- lib/aws-sdk-core/plugins/defaults_mode.rb
|
142
146
|
- lib/aws-sdk-core/plugins/endpoint_discovery.rb
|
143
147
|
- lib/aws-sdk-core/plugins/endpoint_pattern.rb
|
144
148
|
- lib/aws-sdk-core/plugins/event_stream_configuration.rb
|