aws-sdk-core 3.171.0 → 3.186.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 +155 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +4 -4
- data/lib/aws-sdk-core/credential_provider.rb +3 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +13 -9
- data/lib/aws-sdk-core/endpoints.rb +5 -1
- data/lib/aws-sdk-core/errors.rb +1 -1
- data/lib/aws-sdk-core/ini_parser.rb +7 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +52 -30
- data/lib/aws-sdk-core/json/error_handler.rb +15 -5
- data/lib/aws-sdk-core/json/parser.rb +1 -1
- data/lib/aws-sdk-core/log/formatter.rb +6 -0
- data/lib/aws-sdk-core/pageable_response.rb +3 -1
- data/lib/aws-sdk-core/param_validator.rb +2 -2
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +1 -1
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +109 -33
- data/lib/aws-sdk-core/plugins/request_compression.rb +217 -0
- data/lib/aws-sdk-core/plugins/sign.rb +1 -0
- data/lib/aws-sdk-core/plugins/user_agent.rb +117 -14
- data/lib/aws-sdk-core/refreshing_credentials.rb +0 -6
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +43 -29
- data/lib/aws-sdk-core/shared_config.rb +47 -18
- data/lib/aws-sdk-core/sso_credentials.rb +1 -1
- data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
- data/lib/aws-sdk-core/waiters/poller.rb +3 -1
- data/lib/aws-sdk-sso/client.rb +21 -1
- data/lib/aws-sdk-sso/endpoint_provider.rb +30 -24
- data/lib/aws-sdk-sso/endpoints.rb +1 -0
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +21 -1
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +30 -24
- data/lib/aws-sdk-ssooidc/endpoints.rb +1 -0
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +138 -112
- data/lib/aws-sdk-sts/client_api.rb +12 -1
- data/lib/aws-sdk-sts/endpoint_provider.rb +81 -78
- data/lib/aws-sdk-sts/endpoints.rb +1 -0
- data/lib/aws-sdk-sts/types.rb +35 -11
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/configuration.rb +0 -4
- data/lib/seahorse/client/plugins/request_callback.rb +31 -0
- data/lib/seahorse/client/response.rb +6 -0
- data/lib/seahorse/model/operation.rb +3 -0
- metadata +3 -2
@@ -167,6 +167,26 @@ module Aws
|
|
167
167
|
token
|
168
168
|
end
|
169
169
|
|
170
|
+
# Source a custom configured endpoint from the shared configuration file
|
171
|
+
#
|
172
|
+
# @param [Hash] opts
|
173
|
+
# @option opts [String] :profile
|
174
|
+
# @option opts [String] :service_id
|
175
|
+
def configured_endpoint(opts = {})
|
176
|
+
# services section is only allowed in the shared config file (not credentials)
|
177
|
+
profile = opts[:profile] || @profile_name
|
178
|
+
service_id = opts[:service_id]&.gsub(" ", "_")&.downcase
|
179
|
+
if @parsed_config && (prof_config = @parsed_config[profile])
|
180
|
+
services_section_name = prof_config['services']
|
181
|
+
if (services_config = @parsed_config["services #{services_section_name}"]) &&
|
182
|
+
(service_config = services_config[service_id])
|
183
|
+
return service_config['endpoint_url'] if service_config['endpoint_url']
|
184
|
+
end
|
185
|
+
return prof_config['endpoint_url']
|
186
|
+
end
|
187
|
+
nil
|
188
|
+
end
|
189
|
+
|
170
190
|
# Add an accessor method (similar to attr_reader) to return a configuration value
|
171
191
|
# Uses the get_config_value below to control where
|
172
192
|
# values are loaded from
|
@@ -185,6 +205,7 @@ module Aws
|
|
185
205
|
:use_fips_endpoint,
|
186
206
|
:ec2_metadata_service_endpoint,
|
187
207
|
:ec2_metadata_service_endpoint_mode,
|
208
|
+
:ec2_metadata_v1_disabled,
|
188
209
|
:max_attempts,
|
189
210
|
:retry_mode,
|
190
211
|
:adaptive_retry_wait_to_fill,
|
@@ -197,7 +218,11 @@ module Aws
|
|
197
218
|
:s3_use_arn_region,
|
198
219
|
:s3_us_east_1_regional_endpoint,
|
199
220
|
:s3_disable_multiregion_access_points,
|
200
|
-
:defaults_mode
|
221
|
+
:defaults_mode,
|
222
|
+
:sdk_ua_app_id,
|
223
|
+
:disable_request_compression,
|
224
|
+
:request_min_compression_size_bytes,
|
225
|
+
:ignore_configured_endpoint_urls
|
201
226
|
)
|
202
227
|
|
203
228
|
private
|
@@ -335,12 +360,8 @@ module Aws
|
|
335
360
|
!(prof_config.keys & SSO_CREDENTIAL_PROFILE_KEYS).empty?
|
336
361
|
|
337
362
|
if sso_session_name = prof_config['sso_session']
|
338
|
-
sso_session = cfg
|
339
|
-
|
340
|
-
raise ArgumentError,
|
341
|
-
"sso-session #{sso_session_name} must be defined in the config file. " \
|
342
|
-
"Referenced by profile #{profile}"
|
343
|
-
end
|
363
|
+
sso_session = sso_session(cfg, profile, sso_session_name)
|
364
|
+
|
344
365
|
sso_region = sso_session['sso_region']
|
345
366
|
sso_start_url = sso_session['sso_start_url']
|
346
367
|
|
@@ -365,7 +386,7 @@ module Aws
|
|
365
386
|
sso_role_name: prof_config['sso_role_name'],
|
366
387
|
sso_session: prof_config['sso_session'],
|
367
388
|
sso_region: sso_region,
|
368
|
-
sso_start_url:
|
389
|
+
sso_start_url: sso_start_url
|
369
390
|
)
|
370
391
|
end
|
371
392
|
end
|
@@ -378,16 +399,7 @@ module Aws
|
|
378
399
|
!(prof_config.keys & SSO_TOKEN_PROFILE_KEYS).empty?
|
379
400
|
|
380
401
|
sso_session_name = prof_config['sso_session']
|
381
|
-
sso_session = cfg
|
382
|
-
unless sso_session
|
383
|
-
raise ArgumentError,
|
384
|
-
"sso-session #{sso_session_name} must be defined in the config file." \
|
385
|
-
"Referenced by profile #{profile}"
|
386
|
-
end
|
387
|
-
|
388
|
-
unless sso_session['sso_region']
|
389
|
-
raise ArgumentError, "sso-session #{sso_session_name} missing required parameter: sso_region"
|
390
|
-
end
|
402
|
+
sso_session = sso_session(cfg, profile, sso_session_name)
|
391
403
|
|
392
404
|
SSOTokenProvider.new(
|
393
405
|
sso_session: sso_session_name,
|
@@ -445,5 +457,22 @@ module Aws
|
|
445
457
|
ret ||= 'default'
|
446
458
|
ret
|
447
459
|
end
|
460
|
+
|
461
|
+
def sso_session(cfg, profile, sso_session_name)
|
462
|
+
# aws sso-configure may add quotes around sso session names with whitespace
|
463
|
+
sso_session = cfg["sso-session #{sso_session_name}"] || cfg["sso-session '#{sso_session_name}'"]
|
464
|
+
|
465
|
+
unless sso_session
|
466
|
+
raise ArgumentError,
|
467
|
+
"sso-session #{sso_session_name} must be defined in the config file. " \
|
468
|
+
"Referenced by profile #{profile}"
|
469
|
+
end
|
470
|
+
|
471
|
+
unless sso_session['sso_region']
|
472
|
+
raise ArgumentError, "sso-session #{sso_session_name} missing required parameter: sso_region"
|
473
|
+
end
|
474
|
+
|
475
|
+
sso_session
|
476
|
+
end
|
448
477
|
end
|
449
478
|
end
|
@@ -13,12 +13,23 @@ module Aws
|
|
13
13
|
def stub(data = {})
|
14
14
|
stub = EmptyStub.new(@rules).stub
|
15
15
|
remove_paging_tokens(stub)
|
16
|
+
remove_checksums(stub)
|
16
17
|
apply_data(data, stub)
|
17
18
|
stub
|
18
19
|
end
|
19
20
|
|
20
21
|
private
|
21
22
|
|
23
|
+
def remove_checksums(stub)
|
24
|
+
if @rules && @rules.shape.is_a?(Seahorse::Model::Shapes::StructureShape)
|
25
|
+
@rules.shape.members.each do |key, member|
|
26
|
+
if member.location == 'header' && member.location_name.start_with?('x-amz-checksum-')
|
27
|
+
stub[key] = nil
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
22
33
|
def remove_paging_tokens(stub)
|
23
34
|
if @pager
|
24
35
|
@pager.instance_variable_get("@tokens").keys.each do |path|
|
@@ -62,7 +62,9 @@ module Aws
|
|
62
62
|
def send_request(options)
|
63
63
|
req = options[:client].build_request(@operation_name, options[:params])
|
64
64
|
req.handlers.remove(RAISE_HANDLER)
|
65
|
-
|
65
|
+
Aws::Plugins::UserAgent.feature('waiter') do
|
66
|
+
req.send_request
|
67
|
+
end
|
66
68
|
end
|
67
69
|
|
68
70
|
def acceptor_matches?(acceptor, response)
|
data/lib/aws-sdk-sso/client.rb
CHANGED
@@ -28,6 +28,7 @@ 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
30
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
|
+
require 'aws-sdk-core/plugins/request_compression.rb'
|
31
32
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
33
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
34
|
require 'aws-sdk-core/plugins/sign.rb'
|
@@ -77,6 +78,7 @@ module Aws::SSO
|
|
77
78
|
add_plugin(Aws::Plugins::TransferEncoding)
|
78
79
|
add_plugin(Aws::Plugins::HttpChecksum)
|
79
80
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
81
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
80
82
|
add_plugin(Aws::Plugins::DefaultsMode)
|
81
83
|
add_plugin(Aws::Plugins::RecursionDetection)
|
82
84
|
add_plugin(Aws::Plugins::Sign)
|
@@ -190,6 +192,10 @@ module Aws::SSO
|
|
190
192
|
# Set to true to disable SDK automatically adding host prefix
|
191
193
|
# to default service endpoint when available.
|
192
194
|
#
|
195
|
+
# @option options [Boolean] :disable_request_compression (false)
|
196
|
+
# When set to 'true' the request body will not be compressed
|
197
|
+
# for supported operations.
|
198
|
+
#
|
193
199
|
# @option options [String] :endpoint
|
194
200
|
# The client endpoint is normally constructed from the `:region`
|
195
201
|
# option. You should only configure an `:endpoint` when connecting
|
@@ -210,6 +216,10 @@ module Aws::SSO
|
|
210
216
|
# @option options [Boolean] :endpoint_discovery (false)
|
211
217
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
212
218
|
#
|
219
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
220
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
221
|
+
# variables and the shared configuration file.
|
222
|
+
#
|
213
223
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
214
224
|
# The log formatter.
|
215
225
|
#
|
@@ -230,6 +240,11 @@ module Aws::SSO
|
|
230
240
|
# Used when loading credentials from the shared credentials file
|
231
241
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
232
242
|
#
|
243
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
244
|
+
# The minimum size in bytes that triggers compression for request
|
245
|
+
# bodies. The value must be non-negative integer value between 0
|
246
|
+
# and 10485780 bytes inclusive.
|
247
|
+
#
|
233
248
|
# @option options [Proc] :retry_backoff
|
234
249
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
235
250
|
# This option is only used in the `legacy` retry mode.
|
@@ -275,6 +290,11 @@ module Aws::SSO
|
|
275
290
|
# in the future.
|
276
291
|
#
|
277
292
|
#
|
293
|
+
# @option options [String] :sdk_ua_app_id
|
294
|
+
# A unique and opaque application ID that is appended to the
|
295
|
+
# User-Agent header as app/<sdk_ua_app_id>. It should have a
|
296
|
+
# maximum length of 50.
|
297
|
+
#
|
278
298
|
# @option options [String] :secret_access_key
|
279
299
|
#
|
280
300
|
# @option options [String] :session_token
|
@@ -585,7 +605,7 @@ module Aws::SSO
|
|
585
605
|
params: params,
|
586
606
|
config: config)
|
587
607
|
context[:gem_name] = 'aws-sdk-core'
|
588
|
-
context[:gem_version] = '3.
|
608
|
+
context[:gem_version] = '3.186.0'
|
589
609
|
Seahorse::Client::Request.new(handlers, context)
|
590
610
|
end
|
591
611
|
|
@@ -14,36 +14,42 @@ module Aws::SSO
|
|
14
14
|
use_dual_stack = parameters.use_dual_stack
|
15
15
|
use_fips = parameters.use_fips
|
16
16
|
endpoint = parameters.endpoint
|
17
|
-
if
|
18
|
-
if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
|
19
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
20
|
-
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
21
|
-
end
|
22
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
23
|
-
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
24
|
-
end
|
25
|
-
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
26
|
-
end
|
27
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
28
|
-
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
29
|
-
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
30
|
-
end
|
31
|
-
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
32
|
-
end
|
17
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
33
18
|
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
34
|
-
|
35
|
-
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
36
|
-
end
|
37
|
-
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
38
20
|
end
|
39
21
|
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
40
|
-
|
41
|
-
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
|
+
end
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
25
|
+
end
|
26
|
+
if Aws::Endpoints::Matchers.set?(region)
|
27
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
29
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
30
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
|
+
end
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
|
+
end
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
36
|
+
if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
|
37
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.amazonaws.com", headers: {}, properties: {})
|
38
|
+
end
|
39
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
40
|
+
end
|
41
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
42
|
+
end
|
43
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
44
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
45
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
46
|
+
end
|
47
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
42
48
|
end
|
43
|
-
|
49
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
44
50
|
end
|
45
|
-
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
46
51
|
end
|
52
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
47
53
|
raise ArgumentError, 'No endpoint could be resolved'
|
48
54
|
|
49
55
|
end
|
data/lib/aws-sdk-sso.rb
CHANGED
@@ -28,6 +28,7 @@ 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
30
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
|
+
require 'aws-sdk-core/plugins/request_compression.rb'
|
31
32
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
33
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
34
|
require 'aws-sdk-core/plugins/sign.rb'
|
@@ -77,6 +78,7 @@ module Aws::SSOOIDC
|
|
77
78
|
add_plugin(Aws::Plugins::TransferEncoding)
|
78
79
|
add_plugin(Aws::Plugins::HttpChecksum)
|
79
80
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
81
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
80
82
|
add_plugin(Aws::Plugins::DefaultsMode)
|
81
83
|
add_plugin(Aws::Plugins::RecursionDetection)
|
82
84
|
add_plugin(Aws::Plugins::Sign)
|
@@ -190,6 +192,10 @@ module Aws::SSOOIDC
|
|
190
192
|
# Set to true to disable SDK automatically adding host prefix
|
191
193
|
# to default service endpoint when available.
|
192
194
|
#
|
195
|
+
# @option options [Boolean] :disable_request_compression (false)
|
196
|
+
# When set to 'true' the request body will not be compressed
|
197
|
+
# for supported operations.
|
198
|
+
#
|
193
199
|
# @option options [String] :endpoint
|
194
200
|
# The client endpoint is normally constructed from the `:region`
|
195
201
|
# option. You should only configure an `:endpoint` when connecting
|
@@ -210,6 +216,10 @@ module Aws::SSOOIDC
|
|
210
216
|
# @option options [Boolean] :endpoint_discovery (false)
|
211
217
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
212
218
|
#
|
219
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
220
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
221
|
+
# variables and the shared configuration file.
|
222
|
+
#
|
213
223
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
214
224
|
# The log formatter.
|
215
225
|
#
|
@@ -230,6 +240,11 @@ module Aws::SSOOIDC
|
|
230
240
|
# Used when loading credentials from the shared credentials file
|
231
241
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
232
242
|
#
|
243
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
244
|
+
# The minimum size in bytes that triggers compression for request
|
245
|
+
# bodies. The value must be non-negative integer value between 0
|
246
|
+
# and 10485780 bytes inclusive.
|
247
|
+
#
|
233
248
|
# @option options [Proc] :retry_backoff
|
234
249
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
235
250
|
# This option is only used in the `legacy` retry mode.
|
@@ -275,6 +290,11 @@ module Aws::SSOOIDC
|
|
275
290
|
# in the future.
|
276
291
|
#
|
277
292
|
#
|
293
|
+
# @option options [String] :sdk_ua_app_id
|
294
|
+
# A unique and opaque application ID that is appended to the
|
295
|
+
# User-Agent header as app/<sdk_ua_app_id>. It should have a
|
296
|
+
# maximum length of 50.
|
297
|
+
#
|
278
298
|
# @option options [String] :secret_access_key
|
279
299
|
#
|
280
300
|
# @option options [String] :session_token
|
@@ -581,7 +601,7 @@ module Aws::SSOOIDC
|
|
581
601
|
params: params,
|
582
602
|
config: config)
|
583
603
|
context[:gem_name] = 'aws-sdk-core'
|
584
|
-
context[:gem_version] = '3.
|
604
|
+
context[:gem_version] = '3.186.0'
|
585
605
|
Seahorse::Client::Request.new(handlers, context)
|
586
606
|
end
|
587
607
|
|
@@ -14,36 +14,42 @@ module Aws::SSOOIDC
|
|
14
14
|
use_dual_stack = parameters.use_dual_stack
|
15
15
|
use_fips = parameters.use_fips
|
16
16
|
endpoint = parameters.endpoint
|
17
|
-
if
|
18
|
-
if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
|
19
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
20
|
-
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
21
|
-
end
|
22
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
23
|
-
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
24
|
-
end
|
25
|
-
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
26
|
-
end
|
27
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
28
|
-
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
29
|
-
return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
30
|
-
end
|
31
|
-
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
32
|
-
end
|
17
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
33
18
|
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
34
|
-
|
35
|
-
return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
36
|
-
end
|
37
|
-
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
38
20
|
end
|
39
21
|
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
40
|
-
|
41
|
-
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
|
+
end
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
25
|
+
end
|
26
|
+
if Aws::Endpoints::Matchers.set?(region)
|
27
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
29
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
30
|
+
return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
|
+
end
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
|
+
end
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
36
|
+
if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
|
37
|
+
return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.amazonaws.com", headers: {}, properties: {})
|
38
|
+
end
|
39
|
+
return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
40
|
+
end
|
41
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
42
|
+
end
|
43
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
44
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
45
|
+
return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
46
|
+
end
|
47
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
42
48
|
end
|
43
|
-
|
49
|
+
return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
44
50
|
end
|
45
|
-
return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
46
51
|
end
|
52
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
47
53
|
raise ArgumentError, 'No endpoint could be resolved'
|
48
54
|
|
49
55
|
end
|