aws-sdk-core 3.168.4 → 3.190.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +231 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +4 -4
- data/lib/aws-sdk-core/client_stubs.rb +15 -12
- data/lib/aws-sdk-core/credential_provider.rb +3 -0
- data/lib/aws-sdk-core/credential_provider_chain.rb +2 -1
- data/lib/aws-sdk-core/ecs_credentials.rb +177 -53
- data/lib/aws-sdk-core/endpoints/condition.rb +5 -0
- data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +5 -1
- data/lib/aws-sdk-core/endpoints/error_rule.rb +5 -0
- data/lib/aws-sdk-core/endpoints/function.rb +5 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +13 -9
- data/lib/aws-sdk-core/endpoints/reference.rb +5 -0
- data/lib/aws-sdk-core/endpoints/rule.rb +5 -0
- data/lib/aws-sdk-core/endpoints/rule_set.rb +5 -0
- data/lib/aws-sdk-core/endpoints/rules_provider.rb +5 -0
- data/lib/aws-sdk-core/endpoints/templater.rb +6 -0
- data/lib/aws-sdk-core/endpoints/tree_rule.rb +5 -0
- data/lib/aws-sdk-core/endpoints/url.rb +1 -0
- data/lib/aws-sdk-core/endpoints.rb +6 -2
- 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/handler.rb +8 -1
- data/lib/aws-sdk-core/json/parser.rb +27 -2
- 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 +5 -3
- data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -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 +16 -10
- data/lib/aws-sdk-core/plugins/user_agent.rb +117 -14
- data/lib/aws-sdk-core/refreshing_credentials.rb +12 -12
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +43 -29
- data/lib/aws-sdk-core/shared_config.rb +48 -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 +4 -2
- data/lib/aws-sdk-core/xml/parser/engines/oga.rb +2 -0
- data/lib/aws-sdk-sso/client.rb +21 -1
- data/lib/aws-sdk-sso/endpoint_provider.rb +41 -96
- data/lib/aws-sdk-sso/endpoints.rb +1 -0
- data/lib/aws-sdk-sso/plugins/endpoints.rb +3 -2
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +358 -29
- data/lib/aws-sdk-ssooidc/client_api.rb +56 -1
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +41 -95
- data/lib/aws-sdk-ssooidc/endpoints.rb +15 -0
- data/lib/aws-sdk-ssooidc/errors.rb +31 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +5 -2
- data/lib/aws-sdk-ssooidc/types.rb +302 -49
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +158 -122
- data/lib/aws-sdk-sts/client_api.rb +12 -1
- data/lib/aws-sdk-sts/endpoint_provider.rb +96 -213
- data/lib/aws-sdk-sts/endpoints.rb +1 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +3 -2
- data/lib/aws-sdk-sts/presigner.rb +1 -1
- data/lib/aws-sdk-sts/types.rb +49 -11
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/configuration.rb +0 -4
- data/lib/seahorse/client/h2/connection.rb +10 -6
- data/lib/seahorse/client/net_http/patches.rb +1 -4
- data/lib/seahorse/client/plugins/h2.rb +3 -3
- 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 +13 -12
@@ -4,9 +4,16 @@ module Aws
|
|
4
4
|
module Rest
|
5
5
|
module Request
|
6
6
|
class QuerystringBuilder
|
7
|
-
|
8
7
|
include Seahorse::Model::Shapes
|
9
8
|
|
9
|
+
SUPPORTED_TYPES = [
|
10
|
+
BooleanShape,
|
11
|
+
FloatShape,
|
12
|
+
IntegerShape,
|
13
|
+
StringShape,
|
14
|
+
TimestampShape
|
15
|
+
].freeze
|
16
|
+
|
10
17
|
# Provide shape references and param values:
|
11
18
|
#
|
12
19
|
# [
|
@@ -33,29 +40,12 @@ module Aws
|
|
33
40
|
def build_part(shape_ref, param_value)
|
34
41
|
case shape_ref.shape
|
35
42
|
# supported scalar types
|
36
|
-
when
|
37
|
-
|
38
|
-
"#{param_name}=#{escape(param_value.to_s)}"
|
39
|
-
when TimestampShape
|
40
|
-
param_name = shape_ref.location_name
|
41
|
-
"#{param_name}=#{escape(timestamp(shape_ref, param_value))}"
|
43
|
+
when *SUPPORTED_TYPES
|
44
|
+
"#{shape_ref.location_name}=#{query_value(shape_ref, param_value)}"
|
42
45
|
when MapShape
|
43
|
-
|
44
|
-
query_map_of_string(param_value)
|
45
|
-
elsif ListShape === shape_ref.shape.value.shape
|
46
|
-
query_map_of_string_list(param_value)
|
47
|
-
else
|
48
|
-
msg = "only map of string and string list supported"
|
49
|
-
raise NotImplementedError, msg
|
50
|
-
end
|
46
|
+
generate_query_map(shape_ref, param_value)
|
51
47
|
when ListShape
|
52
|
-
|
53
|
-
list_of_strings(shape_ref.location_name, param_value)
|
54
|
-
else
|
55
|
-
msg = "Only list of strings supported, got "\
|
56
|
-
"#{shape_ref.shape.member.shape.class.name}"
|
57
|
-
raise NotImplementedError, msg
|
58
|
-
end
|
48
|
+
generate_query_list(shape_ref, param_value)
|
59
49
|
else
|
60
50
|
raise NotImplementedError
|
61
51
|
end
|
@@ -71,6 +61,37 @@ module Aws
|
|
71
61
|
end
|
72
62
|
end
|
73
63
|
|
64
|
+
def query_value(ref, value)
|
65
|
+
case ref.shape
|
66
|
+
when TimestampShape
|
67
|
+
escape(timestamp(ref, value))
|
68
|
+
when *SUPPORTED_TYPES
|
69
|
+
escape(value.to_s)
|
70
|
+
else
|
71
|
+
raise NotImplementedError
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def generate_query_list(ref, values)
|
76
|
+
member_ref = ref.shape.member
|
77
|
+
values.map do |value|
|
78
|
+
value = query_value(member_ref, value)
|
79
|
+
"#{ref.location_name}=#{value}"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def generate_query_map(ref, value)
|
84
|
+
case ref.shape.value.shape
|
85
|
+
when StringShape
|
86
|
+
query_map_of_string(value)
|
87
|
+
when ListShape
|
88
|
+
query_map_of_string_list(value)
|
89
|
+
else
|
90
|
+
msg = 'Only map of string and string list supported'
|
91
|
+
raise NotImplementedError, msg
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
74
95
|
def query_map_of_string(hash)
|
75
96
|
list = []
|
76
97
|
hash.each_pair do |key, value|
|
@@ -89,16 +110,9 @@ module Aws
|
|
89
110
|
list
|
90
111
|
end
|
91
112
|
|
92
|
-
def list_of_strings(name, values)
|
93
|
-
values.map do |value|
|
94
|
-
"#{name}=#{escape(value)}"
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
113
|
def escape(string)
|
99
114
|
Seahorse::Util.uri_escape(string)
|
100
115
|
end
|
101
|
-
|
102
116
|
end
|
103
117
|
end
|
104
118
|
end
|
@@ -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,12 @@ module Aws
|
|
197
218
|
:s3_use_arn_region,
|
198
219
|
:s3_us_east_1_regional_endpoint,
|
199
220
|
:s3_disable_multiregion_access_points,
|
200
|
-
:
|
221
|
+
:s3_disable_express_session_auth,
|
222
|
+
:defaults_mode,
|
223
|
+
:sdk_ua_app_id,
|
224
|
+
:disable_request_compression,
|
225
|
+
:request_min_compression_size_bytes,
|
226
|
+
:ignore_configured_endpoint_urls
|
201
227
|
)
|
202
228
|
|
203
229
|
private
|
@@ -335,12 +361,8 @@ module Aws
|
|
335
361
|
!(prof_config.keys & SSO_CREDENTIAL_PROFILE_KEYS).empty?
|
336
362
|
|
337
363
|
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
|
364
|
+
sso_session = sso_session(cfg, profile, sso_session_name)
|
365
|
+
|
344
366
|
sso_region = sso_session['sso_region']
|
345
367
|
sso_start_url = sso_session['sso_start_url']
|
346
368
|
|
@@ -365,7 +387,7 @@ module Aws
|
|
365
387
|
sso_role_name: prof_config['sso_role_name'],
|
366
388
|
sso_session: prof_config['sso_session'],
|
367
389
|
sso_region: sso_region,
|
368
|
-
sso_start_url:
|
390
|
+
sso_start_url: sso_start_url
|
369
391
|
)
|
370
392
|
end
|
371
393
|
end
|
@@ -378,16 +400,7 @@ module Aws
|
|
378
400
|
!(prof_config.keys & SSO_TOKEN_PROFILE_KEYS).empty?
|
379
401
|
|
380
402
|
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
|
403
|
+
sso_session = sso_session(cfg, profile, sso_session_name)
|
391
404
|
|
392
405
|
SSOTokenProvider.new(
|
393
406
|
sso_session: sso_session_name,
|
@@ -445,5 +458,22 @@ module Aws
|
|
445
458
|
ret ||= 'default'
|
446
459
|
ret
|
447
460
|
end
|
461
|
+
|
462
|
+
def sso_session(cfg, profile, sso_session_name)
|
463
|
+
# aws sso-configure may add quotes around sso session names with whitespace
|
464
|
+
sso_session = cfg["sso-session #{sso_session_name}"] || cfg["sso-session '#{sso_session_name}'"]
|
465
|
+
|
466
|
+
unless sso_session
|
467
|
+
raise ArgumentError,
|
468
|
+
"sso-session #{sso_session_name} must be defined in the config file. " \
|
469
|
+
"Referenced by profile #{profile}"
|
470
|
+
end
|
471
|
+
|
472
|
+
unless sso_session['sso_region']
|
473
|
+
raise ArgumentError, "sso-session #{sso_session_name} missing required parameter: sso_region"
|
474
|
+
end
|
475
|
+
|
476
|
+
sso_session
|
477
|
+
end
|
448
478
|
end
|
449
479
|
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)
|
@@ -95,7 +97,7 @@ module Aws
|
|
95
97
|
|
96
98
|
def matches_error?(acceptor, response)
|
97
99
|
Aws::Errors::ServiceError === response.error &&
|
98
|
-
response.error.code == acceptor['expected'].
|
100
|
+
response.error.code == acceptor['expected'].delete('.')
|
99
101
|
end
|
100
102
|
|
101
103
|
def path(acceptor)
|
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.190.3'
|
589
609
|
Seahorse::Client::Request.new(handlers, context)
|
590
610
|
end
|
591
611
|
|
@@ -9,104 +9,49 @@
|
|
9
9
|
|
10
10
|
module Aws::SSO
|
11
11
|
class EndpointProvider
|
12
|
-
def
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
def resolve_endpoint(parameters)
|
13
|
+
region = parameters.region
|
14
|
+
use_dual_stack = parameters.use_dual_stack
|
15
|
+
use_fips = parameters.use_fips
|
16
|
+
endpoint = parameters.endpoint
|
17
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
18
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
20
|
+
end
|
21
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
|
+
end
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
21
25
|
end
|
22
|
-
|
23
|
-
|
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"
|
48
|
+
end
|
49
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
50
|
+
end
|
51
|
+
end
|
52
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
53
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
24
54
|
|
25
|
-
def resolve_endpoint(parameters)
|
26
|
-
@provider.resolve_endpoint(parameters)
|
27
55
|
end
|
28
|
-
|
29
|
-
# @api private
|
30
|
-
RULES = <<-JSON
|
31
|
-
eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
|
32
|
-
bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOmZhbHNlLCJkb2N1bWVu
|
33
|
-
dGF0aW9uIjoiVGhlIEFXUyByZWdpb24gdXNlZCB0byBkaXNwYXRjaCB0aGUg
|
34
|
-
cmVxdWVzdC4iLCJ0eXBlIjoiU3RyaW5nIn0sIlVzZUR1YWxTdGFjayI6eyJi
|
35
|
-
dWlsdEluIjoiQVdTOjpVc2VEdWFsU3RhY2siLCJyZXF1aXJlZCI6dHJ1ZSwi
|
36
|
-
ZGVmYXVsdCI6ZmFsc2UsImRvY3VtZW50YXRpb24iOiJXaGVuIHRydWUsIHVz
|
37
|
-
ZSB0aGUgZHVhbC1zdGFjayBlbmRwb2ludC4gSWYgdGhlIGNvbmZpZ3VyZWQg
|
38
|
-
ZW5kcG9pbnQgZG9lcyBub3Qgc3VwcG9ydCBkdWFsLXN0YWNrLCBkaXNwYXRj
|
39
|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1bHQjZHVhbFN0YWNr
|
101
|
-
RG5zU3VmZml4fSIsInByb3BlcnRpZXMiOnt9LCJoZWFkZXJzIjp7fX0sInR5
|
102
|
-
cGUiOiJlbmRwb2ludCJ9XX0seyJjb25kaXRpb25zIjpbXSwiZXJyb3IiOiJE
|
103
|
-
dWFsU3RhY2sgaXMgZW5hYmxlZCBidXQgdGhpcyBwYXJ0aXRpb24gZG9lcyBu
|
104
|
-
b3Qgc3VwcG9ydCBEdWFsU3RhY2siLCJ0eXBlIjoiZXJyb3IifV19LHsiY29u
|
105
|
-
ZGl0aW9ucyI6W10sImVuZHBvaW50Ijp7InVybCI6Imh0dHBzOi8vcG9ydGFs
|
106
|
-
LnNzby57UmVnaW9ufS57UGFydGl0aW9uUmVzdWx0I2Ruc1N1ZmZpeH0iLCJw
|
107
|
-
cm9wZXJ0aWVzIjp7fSwiaGVhZGVycyI6e319LCJ0eXBlIjoiZW5kcG9pbnQi
|
108
|
-
fV19XX0=
|
109
|
-
|
110
|
-
JSON
|
111
56
|
end
|
112
57
|
end
|
@@ -25,16 +25,17 @@ module Aws::SSO
|
|
25
25
|
# @api private
|
26
26
|
class Handler < Seahorse::Client::Handler
|
27
27
|
def call(context)
|
28
|
-
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
28
|
unless context[:discovered_endpoint]
|
30
29
|
params = parameters_for_operation(context)
|
31
30
|
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
31
|
|
33
32
|
context.http_request.endpoint = endpoint.url
|
34
33
|
apply_endpoint_headers(context, endpoint.headers)
|
34
|
+
|
35
|
+
context[:endpoint_params] = params
|
36
|
+
context[:endpoint_properties] = endpoint.properties
|
35
37
|
end
|
36
38
|
|
37
|
-
context[:endpoint_params] = params
|
38
39
|
context[:auth_scheme] =
|
39
40
|
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
41
|
|