aws-sdk-core 3.217.1 → 3.224.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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +88 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-core/assume_role_credentials.rb +1 -0
  5. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +1 -0
  6. data/lib/aws-sdk-core/client_stubs.rb +22 -48
  7. data/lib/aws-sdk-core/credential_provider.rb +4 -0
  8. data/lib/aws-sdk-core/credential_provider_chain.rb +27 -7
  9. data/lib/aws-sdk-core/credentials.rb +6 -0
  10. data/lib/aws-sdk-core/ecs_credentials.rb +1 -0
  11. data/lib/aws-sdk-core/errors.rb +2 -2
  12. data/lib/aws-sdk-core/instance_profile_credentials.rb +1 -0
  13. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
  14. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
  15. data/lib/aws-sdk-core/plugins/sign.rb +15 -1
  16. data/lib/aws-sdk-core/plugins/stub_responses.rb +24 -8
  17. data/lib/aws-sdk-core/plugins/user_agent.rb +23 -2
  18. data/lib/aws-sdk-core/process_credentials.rb +1 -1
  19. data/lib/aws-sdk-core/rest/request/headers.rb +1 -1
  20. data/lib/aws-sdk-core/shared_config.rb +72 -21
  21. data/lib/aws-sdk-core/shared_credentials.rb +1 -0
  22. data/lib/aws-sdk-core/sso_credentials.rb +2 -0
  23. data/lib/aws-sdk-sso/client.rb +30 -31
  24. data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
  25. data/lib/aws-sdk-sso.rb +1 -1
  26. data/lib/aws-sdk-ssooidc/client.rb +43 -33
  27. data/lib/aws-sdk-ssooidc/client_api.rb +6 -0
  28. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
  29. data/lib/aws-sdk-ssooidc/types.rb +28 -1
  30. data/lib/aws-sdk-ssooidc.rb +1 -1
  31. data/lib/aws-sdk-sts/client.rb +31 -32
  32. data/lib/aws-sdk-sts/client_api.rb +8 -8
  33. data/lib/aws-sdk-sts/endpoint_provider.rb +50 -55
  34. data/lib/aws-sdk-sts/errors.rb +16 -0
  35. data/lib/aws-sdk-sts.rb +1 -1
  36. data/lib/seahorse/client/async_base.rb +4 -5
  37. data/lib/seahorse/client/base.rb +0 -14
  38. data/lib/seahorse/client/h2/connection.rb +18 -28
  39. data/lib/seahorse/client/http/response.rb +1 -1
  40. data/lib/seahorse/client/net_http/connection_pool.rb +2 -0
  41. data/lib/seahorse/client/networking_error.rb +1 -1
  42. data/lib/seahorse/client/plugins/h2.rb +4 -4
  43. data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
  44. data/sig/seahorse/client/async_base.rbs +18 -0
  45. metadata +39 -13
@@ -34,7 +34,27 @@ module Aws
34
34
  "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED" : "Z",
35
35
  "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED" : "a",
36
36
  "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED" : "b",
37
- "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED" : "c"
37
+ "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED" : "c",
38
+ "DDB_MAPPER": "d",
39
+ "CREDENTIALS_CODE" : "e",
40
+ "CREDENTIALS_ENV_VARS" : "g",
41
+ "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN" : "h",
42
+ "CREDENTIALS_STS_ASSUME_ROLE" : "i",
43
+ "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID" : "k",
44
+ "CREDENTIALS_PROFILE" : "n",
45
+ "CREDENTIALS_PROFILE_SOURCE_PROFILE" : "o",
46
+ "CREDENTIALS_PROFILE_NAMED_PROVIDER" : "p",
47
+ "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN" : "q",
48
+ "CREDENTIALS_PROFILE_SSO" : "r",
49
+ "CREDENTIALS_SSO" : "s",
50
+ "CREDENTIALS_PROFILE_SSO_LEGACY" : "t",
51
+ "CREDENTIALS_SSO_LEGACY" : "u",
52
+ "CREDENTIALS_PROFILE_PROCESS" : "v",
53
+ "CREDENTIALS_PROCESS" : "w",
54
+ "CREDENTIALS_HTTP" : "z",
55
+ "CREDENTIALS_IMDS" : "0",
56
+ "SSO_LOGIN_DEVICE" : "1",
57
+ "SSO_LOGIN_AUTH" : "2"
38
58
  }
39
59
  METRICS
40
60
 
@@ -196,7 +216,8 @@ variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
196
216
  end
197
217
  end
198
218
 
199
- handler(Handler, step: :sign, priority: 97)
219
+ # Priority set to 5 in order to add user agent as late as possible after signing
220
+ handler(Handler, step: :sign, priority: 5)
200
221
  end
201
222
  end
202
223
  end
@@ -36,7 +36,7 @@ module Aws
36
36
  @process = process
37
37
  @credentials = credentials_from_process
38
38
  @async_refresh = false
39
-
39
+ @metrics = ['CREDENTIALS_PROCESS']
40
40
  super
41
41
  end
42
42
 
@@ -68,7 +68,7 @@ module Aws
68
68
  def apply_header_map(headers, ref, values)
69
69
  prefix = ref.location_name || ''
70
70
  values.each_pair do |name, value|
71
- headers["#{prefix}#{name}"] = value.to_s
71
+ headers["#{prefix}#{name}"] ||= value.to_s
72
72
  end
73
73
  end
74
74
 
@@ -138,7 +138,11 @@ module Aws
138
138
  role_session_name: entry['role_session_name']
139
139
  }
140
140
  cfg[:region] = opts[:region] if opts[:region]
141
- AssumeRoleWebIdentityCredentials.new(cfg)
141
+ with_metrics('CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN') do
142
+ creds = AssumeRoleWebIdentityCredentials.new(cfg)
143
+ creds.metrics << 'CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN'
144
+ creds
145
+ end
142
146
  end
143
147
  end
144
148
  end
@@ -208,6 +212,7 @@ module Aws
208
212
  :ec2_metadata_service_endpoint,
209
213
  :ec2_metadata_service_endpoint_mode,
210
214
  :ec2_metadata_v1_disabled,
215
+ :disable_host_prefix_injection,
211
216
  :max_attempts,
212
217
  :retry_mode,
213
218
  :adaptive_retry_wait_to_fill,
@@ -255,8 +260,8 @@ module Aws
255
260
  'provide only source_profile or credential_source, not both.'
256
261
  elsif opts[:source_profile]
257
262
  opts[:visited_profiles] ||= Set.new
258
- opts[:credentials] = resolve_source_profile(opts[:source_profile], opts)
259
- if opts[:credentials]
263
+ provider = resolve_source_profile(opts[:source_profile], opts)
264
+ if provider && (opts[:credentials] = provider.credentials)
260
265
  opts[:role_session_name] ||= prof_cfg['role_session_name']
261
266
  opts[:role_session_name] ||= 'default_session'
262
267
  opts[:role_arn] ||= prof_cfg['role_arn']
@@ -265,17 +270,28 @@ module Aws
265
270
  opts[:serial_number] ||= prof_cfg['mfa_serial']
266
271
  opts[:profile] = opts.delete(:source_profile)
267
272
  opts.delete(:visited_profiles)
268
- AssumeRoleCredentials.new(opts)
273
+
274
+ metrics = provider.metrics
275
+ if provider.is_a?(AssumeRoleCredentials)
276
+ opts[:credentials] = provider
277
+ metrics.delete('CREDENTIALS_STS_ASSUME_ROLE')
278
+ else
279
+ metrics << 'CREDENTIALS_PROFILE_SOURCE_PROFILE'
280
+ end
281
+ # Set the original credentials metrics to [] to prevent duplicate metrics during sign plugin
282
+ opts[:credentials].metrics = []
283
+ with_metrics(metrics) do
284
+ creds = AssumeRoleCredentials.new(opts)
285
+ creds.metrics.push(*metrics)
286
+ creds
287
+ end
269
288
  else
270
289
  raise Errors::NoSourceProfileError,
271
290
  "Profile #{profile} has a role_arn, and source_profile, but the"\
272
291
  ' source_profile does not have credentials.'
273
292
  end
274
293
  elsif credential_source
275
- opts[:credentials] = credentials_from_source(
276
- credential_source,
277
- chain_config
278
- )
294
+ opts[:credentials] = credentials_from_source(credential_source, chain_config)
279
295
  if opts[:credentials]
280
296
  opts[:role_session_name] ||= prof_cfg['role_session_name']
281
297
  opts[:role_session_name] ||= 'default_session'
@@ -284,7 +300,16 @@ module Aws
284
300
  opts[:external_id] ||= prof_cfg['external_id']
285
301
  opts[:serial_number] ||= prof_cfg['mfa_serial']
286
302
  opts.delete(:source_profile) # Cleanup
287
- AssumeRoleCredentials.new(opts)
303
+
304
+ metrics = opts[:credentials].metrics
305
+ metrics << 'CREDENTIALS_PROFILE_NAMED_PROVIDER'
306
+ # Set the original credentials metrics to [] to prevent duplicate metrics during sign plugin
307
+ opts[:credentials].metrics = []
308
+ with_metrics(metrics) do
309
+ creds = AssumeRoleCredentials.new(opts)
310
+ creds.metrics.push(*metrics)
311
+ creds
312
+ end
288
313
  else
289
314
  raise Errors::NoSourceCredentials,
290
315
  "Profile #{profile} could not get source credentials from"\
@@ -312,12 +337,24 @@ module Aws
312
337
  elsif profile_config && profile_config['source_profile']
313
338
  opts.delete(:source_profile)
314
339
  assume_role_credentials_from_config(opts.merge(profile: profile))
315
- elsif (provider = assume_role_web_identity_credentials_from_config(opts.merge(profile: profile)))
316
- provider.credentials if provider.credentials.set?
340
+ elsif (provider = assume_role_web_identity_credentials_from_config_with_metrics(opts.merge(profile: profile)))
341
+ provider if provider.credentials.set?
317
342
  elsif (provider = assume_role_process_credentials_from_config(profile))
318
- provider.credentials if provider.credentials.set?
319
- elsif (provider = sso_credentials_from_config(profile: profile))
320
- provider.credentials if provider.credentials.set?
343
+ provider if provider.credentials.set?
344
+ elsif (provider = sso_credentials_from_config_with_metrics(profile))
345
+ provider if provider.credentials.set?
346
+ end
347
+ end
348
+
349
+ def assume_role_web_identity_credentials_from_config_with_metrics(opts)
350
+ with_metrics('CREDENTIALS_PROFILE_SOURCE_PROFILE') do
351
+ assume_role_web_identity_credentials_from_config(opts)
352
+ end
353
+ end
354
+
355
+ def sso_credentials_from_config_with_metrics(profile)
356
+ with_metrics('CREDENTIALS_PROFILE_SOURCE_PROFILE') do
357
+ sso_credentials_from_config(profile: profile)
321
358
  end
322
359
  end
323
360
 
@@ -342,7 +379,11 @@ module Aws
342
379
  if @parsed_config
343
380
  credential_process ||= @parsed_config.fetch(profile, {})['credential_process']
344
381
  end
345
- ProcessCredentials.new([credential_process]) if credential_process
382
+ if credential_process
383
+ creds = ProcessCredentials.new([credential_process])
384
+ creds.metrics << 'CREDENTIALS_PROFILE_PROCESS'
385
+ creds
386
+ end
346
387
  end
347
388
 
348
389
  def credentials_from_shared(profile, _opts)
@@ -386,13 +427,18 @@ module Aws
386
427
  sso_start_url = prof_config['sso_start_url']
387
428
  end
388
429
 
389
- SSOCredentials.new(
390
- sso_account_id: prof_config['sso_account_id'],
391
- sso_role_name: prof_config['sso_role_name'],
392
- sso_session: prof_config['sso_session'],
393
- sso_region: sso_region,
394
- sso_start_url: sso_start_url
430
+ metric = prof_config['sso_session'] ? 'CREDENTIALS_PROFILE_SSO' : 'CREDENTIALS_PROFILE_SSO_LEGACY'
431
+ with_metrics(metric) do
432
+ creds = SSOCredentials.new(
433
+ sso_account_id: prof_config['sso_account_id'],
434
+ sso_role_name: prof_config['sso_role_name'],
435
+ sso_session: prof_config['sso_session'],
436
+ sso_region: sso_region,
437
+ sso_start_url: sso_start_url
395
438
  )
439
+ creds.metrics << metric
440
+ creds
441
+ end
396
442
  end
397
443
  end
398
444
 
@@ -420,6 +466,7 @@ module Aws
420
466
  prof_config['aws_session_token'],
421
467
  account_id: prof_config['aws_account_id']
422
468
  )
469
+ creds.metrics = ['CREDENTIALS_PROFILE']
423
470
  creds if creds.set?
424
471
  end
425
472
 
@@ -480,5 +527,9 @@ module Aws
480
527
 
481
528
  sso_session
482
529
  end
530
+
531
+ def with_metrics(metrics, &block)
532
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
533
+ end
483
534
  end
484
535
  end
@@ -40,6 +40,7 @@ module Aws
40
40
  )
41
41
  @credentials = config.credentials(profile: @profile_name)
42
42
  end
43
+ @metrics = ['CREDENTIALS_CODE']
43
44
  end
44
45
 
45
46
  # @return [String]
@@ -91,6 +91,7 @@ module Aws
91
91
  client_opts[:credentials] = nil
92
92
  @client = Aws::SSO::Client.new(client_opts)
93
93
  end
94
+ @metrics = ['CREDENTIALS_SSO']
94
95
  else # legacy behavior
95
96
  missing_keys = LEGACY_REQUIRED_OPTS.select { |k| options[k].nil? }
96
97
  unless missing_keys.empty?
@@ -111,6 +112,7 @@ module Aws
111
112
  client_opts[:credentials] = nil
112
113
 
113
114
  @client = options[:client] || Aws::SSO::Client.new(client_opts)
115
+ @metrics = ['CREDENTIALS_SSO_LEGACY']
114
116
  end
115
117
 
116
118
  @async_refresh = true
@@ -7,34 +7,34 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
- require 'seahorse/client/plugins/content_length.rb'
11
- require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
- require 'aws-sdk-core/plugins/logging.rb'
13
- require 'aws-sdk-core/plugins/param_converter.rb'
14
- require 'aws-sdk-core/plugins/param_validator.rb'
15
- require 'aws-sdk-core/plugins/user_agent.rb'
16
- require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
- require 'aws-sdk-core/plugins/retry_errors.rb'
18
- require 'aws-sdk-core/plugins/global_configuration.rb'
19
- require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
- require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
- require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
- require 'aws-sdk-core/plugins/response_paging.rb'
23
- require 'aws-sdk-core/plugins/stub_responses.rb'
24
- require 'aws-sdk-core/plugins/idempotency_token.rb'
25
- require 'aws-sdk-core/plugins/invocation_id.rb'
26
- require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
27
- require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
28
- require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
29
- require 'aws-sdk-core/plugins/transfer_encoding.rb'
30
- require 'aws-sdk-core/plugins/http_checksum.rb'
31
- require 'aws-sdk-core/plugins/checksum_algorithm.rb'
32
- require 'aws-sdk-core/plugins/request_compression.rb'
33
- require 'aws-sdk-core/plugins/defaults_mode.rb'
34
- require 'aws-sdk-core/plugins/recursion_detection.rb'
35
- require 'aws-sdk-core/plugins/telemetry.rb'
36
- require 'aws-sdk-core/plugins/sign.rb'
37
- require 'aws-sdk-core/plugins/protocols/rest_json.rb'
10
+ require 'seahorse/client/plugins/content_length'
11
+ require 'aws-sdk-core/plugins/credentials_configuration'
12
+ require 'aws-sdk-core/plugins/logging'
13
+ require 'aws-sdk-core/plugins/param_converter'
14
+ require 'aws-sdk-core/plugins/param_validator'
15
+ require 'aws-sdk-core/plugins/user_agent'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors'
17
+ require 'aws-sdk-core/plugins/retry_errors'
18
+ require 'aws-sdk-core/plugins/global_configuration'
19
+ require 'aws-sdk-core/plugins/regional_endpoint'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern'
22
+ require 'aws-sdk-core/plugins/response_paging'
23
+ require 'aws-sdk-core/plugins/stub_responses'
24
+ require 'aws-sdk-core/plugins/idempotency_token'
25
+ require 'aws-sdk-core/plugins/invocation_id'
26
+ require 'aws-sdk-core/plugins/jsonvalue_converter'
27
+ require 'aws-sdk-core/plugins/client_metrics_plugin'
28
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin'
29
+ require 'aws-sdk-core/plugins/transfer_encoding'
30
+ require 'aws-sdk-core/plugins/http_checksum'
31
+ require 'aws-sdk-core/plugins/checksum_algorithm'
32
+ require 'aws-sdk-core/plugins/request_compression'
33
+ require 'aws-sdk-core/plugins/defaults_mode'
34
+ require 'aws-sdk-core/plugins/recursion_detection'
35
+ require 'aws-sdk-core/plugins/telemetry'
36
+ require 'aws-sdk-core/plugins/sign'
37
+ require 'aws-sdk-core/plugins/protocols/rest_json'
38
38
 
39
39
  module Aws::SSO
40
40
  # An API client for SSO. To construct a client, you need to configure a `:region` and `:credentials`.
@@ -200,8 +200,7 @@ module Aws::SSO
200
200
  # accepted modes and the configuration defaults that are included.
201
201
  #
202
202
  # @option options [Boolean] :disable_host_prefix_injection (false)
203
- # Set to true to disable SDK automatically adding host prefix
204
- # to default service endpoint when available.
203
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
205
204
  #
206
205
  # @option options [Boolean] :disable_request_compression (false)
207
206
  # When set to 'true' the request body will not be compressed
@@ -692,7 +691,7 @@ module Aws::SSO
692
691
  tracer: tracer
693
692
  )
694
693
  context[:gem_name] = 'aws-sdk-core'
695
- context[:gem_version] = '3.217.1'
694
+ context[:gem_version] = '3.224.1'
696
695
  Seahorse::Client::Request.new(handlers, context)
697
696
  end
698
697
 
@@ -10,43 +10,39 @@
10
10
  module Aws::SSO
11
11
  class EndpointProvider
12
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)
13
+ if Aws::Endpoints::Matchers.set?(parameters.endpoint)
14
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
19
15
  raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
20
16
  end
21
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
17
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
22
18
  raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
19
  end
24
- return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
20
+ return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
25
21
  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)
22
+ if Aws::Endpoints::Matchers.set?(parameters.region)
23
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
24
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
29
25
  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: {})
26
+ return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
27
  end
32
28
  raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
29
  end
34
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
30
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
35
31
  if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
36
32
  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: {})
33
+ return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{parameters.region}.amazonaws.com", headers: {}, properties: {})
38
34
  end
39
- return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
35
+ return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
40
36
  end
41
37
  raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
42
38
  end
43
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
39
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
44
40
  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: {})
41
+ return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
46
42
  end
47
43
  raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
48
44
  end
49
- return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
45
+ return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
50
46
  end
51
47
  end
52
48
  raise ArgumentError, "Invalid Configuration: Missing Region"
data/lib/aws-sdk-sso.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::SSO
56
56
  autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sso/endpoints'
58
58
 
59
- GEM_VERSION = '3.217.1'
59
+ GEM_VERSION = '3.224.1'
60
60
 
61
61
  end
62
62
 
@@ -7,34 +7,34 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
- require 'seahorse/client/plugins/content_length.rb'
11
- require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
- require 'aws-sdk-core/plugins/logging.rb'
13
- require 'aws-sdk-core/plugins/param_converter.rb'
14
- require 'aws-sdk-core/plugins/param_validator.rb'
15
- require 'aws-sdk-core/plugins/user_agent.rb'
16
- require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
- require 'aws-sdk-core/plugins/retry_errors.rb'
18
- require 'aws-sdk-core/plugins/global_configuration.rb'
19
- require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
- require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
- require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
- require 'aws-sdk-core/plugins/response_paging.rb'
23
- require 'aws-sdk-core/plugins/stub_responses.rb'
24
- require 'aws-sdk-core/plugins/idempotency_token.rb'
25
- require 'aws-sdk-core/plugins/invocation_id.rb'
26
- require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
27
- require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
28
- require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
29
- require 'aws-sdk-core/plugins/transfer_encoding.rb'
30
- require 'aws-sdk-core/plugins/http_checksum.rb'
31
- require 'aws-sdk-core/plugins/checksum_algorithm.rb'
32
- require 'aws-sdk-core/plugins/request_compression.rb'
33
- require 'aws-sdk-core/plugins/defaults_mode.rb'
34
- require 'aws-sdk-core/plugins/recursion_detection.rb'
35
- require 'aws-sdk-core/plugins/telemetry.rb'
36
- require 'aws-sdk-core/plugins/sign.rb'
37
- require 'aws-sdk-core/plugins/protocols/rest_json.rb'
10
+ require 'seahorse/client/plugins/content_length'
11
+ require 'aws-sdk-core/plugins/credentials_configuration'
12
+ require 'aws-sdk-core/plugins/logging'
13
+ require 'aws-sdk-core/plugins/param_converter'
14
+ require 'aws-sdk-core/plugins/param_validator'
15
+ require 'aws-sdk-core/plugins/user_agent'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors'
17
+ require 'aws-sdk-core/plugins/retry_errors'
18
+ require 'aws-sdk-core/plugins/global_configuration'
19
+ require 'aws-sdk-core/plugins/regional_endpoint'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern'
22
+ require 'aws-sdk-core/plugins/response_paging'
23
+ require 'aws-sdk-core/plugins/stub_responses'
24
+ require 'aws-sdk-core/plugins/idempotency_token'
25
+ require 'aws-sdk-core/plugins/invocation_id'
26
+ require 'aws-sdk-core/plugins/jsonvalue_converter'
27
+ require 'aws-sdk-core/plugins/client_metrics_plugin'
28
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin'
29
+ require 'aws-sdk-core/plugins/transfer_encoding'
30
+ require 'aws-sdk-core/plugins/http_checksum'
31
+ require 'aws-sdk-core/plugins/checksum_algorithm'
32
+ require 'aws-sdk-core/plugins/request_compression'
33
+ require 'aws-sdk-core/plugins/defaults_mode'
34
+ require 'aws-sdk-core/plugins/recursion_detection'
35
+ require 'aws-sdk-core/plugins/telemetry'
36
+ require 'aws-sdk-core/plugins/sign'
37
+ require 'aws-sdk-core/plugins/protocols/rest_json'
38
38
 
39
39
  module Aws::SSOOIDC
40
40
  # An API client for SSOOIDC. To construct a client, you need to configure a `:region` and `:credentials`.
@@ -200,8 +200,7 @@ module Aws::SSOOIDC
200
200
  # accepted modes and the configuration defaults that are included.
201
201
  #
202
202
  # @option options [Boolean] :disable_host_prefix_injection (false)
203
- # Set to true to disable SDK automatically adding host prefix
204
- # to default service endpoint when available.
203
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
205
204
  #
206
205
  # @option options [Boolean] :disable_request_compression (false)
207
206
  # When set to 'true' the request body will not be compressed
@@ -708,6 +707,7 @@ module Aws::SSOOIDC
708
707
  # * {Types::CreateTokenWithIAMResponse#id_token #id_token} => String
709
708
  # * {Types::CreateTokenWithIAMResponse#issued_token_type #issued_token_type} => String
710
709
  # * {Types::CreateTokenWithIAMResponse#scope #scope} => Array&lt;String&gt;
710
+ # * {Types::CreateTokenWithIAMResponse#aws_additional_details #aws_additional_details} => Types::AwsAdditionalDetails
711
711
  #
712
712
  #
713
713
  # @example Example: Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication
@@ -727,6 +727,9 @@ module Aws::SSOOIDC
727
727
  # resp.to_h outputs the following:
728
728
  # {
729
729
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
730
+ # aws_additional_details: {
731
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
732
+ # },
730
733
  # expires_in: 1579729529,
731
734
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
732
735
  # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
@@ -772,6 +775,9 @@ module Aws::SSOOIDC
772
775
  # resp.to_h outputs the following:
773
776
  # {
774
777
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
778
+ # aws_additional_details: {
779
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
780
+ # },
775
781
  # expires_in: 1579729529,
776
782
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
777
783
  # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
@@ -797,6 +803,9 @@ module Aws::SSOOIDC
797
803
  # resp.to_h outputs the following:
798
804
  # {
799
805
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
806
+ # aws_additional_details: {
807
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
808
+ # },
800
809
  # expires_in: 1579729529,
801
810
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM",
802
811
  # issued_token_type: "urn:ietf:params:oauth:token-type:access_token",
@@ -834,6 +843,7 @@ module Aws::SSOOIDC
834
843
  # resp.issued_token_type #=> String
835
844
  # resp.scope #=> Array
836
845
  # resp.scope[0] #=> String
846
+ # resp.aws_additional_details.identity_context #=> String
837
847
  #
838
848
  # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM AWS API Documentation
839
849
  #
@@ -1003,8 +1013,8 @@ module Aws::SSOOIDC
1003
1013
  # expires_in: 1579729529,
1004
1014
  # interval: 1,
1005
1015
  # user_code: "makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
1006
- # verification_uri: "https://device.sso.us-west-2.amazonaws.com",
1007
- # verification_uri_complete: "https://device.sso.us-west-2.amazonaws.com?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
1016
+ # verification_uri: "https://directory-alias-example.awsapps.com/start/#/device",
1017
+ # verification_uri_complete: "https://directory-alias-example.awsapps.com/start/#/device?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
1008
1018
  # }
1009
1019
  #
1010
1020
  # @example Request syntax with placeholder values
@@ -1051,7 +1061,7 @@ module Aws::SSOOIDC
1051
1061
  tracer: tracer
1052
1062
  )
1053
1063
  context[:gem_name] = 'aws-sdk-core'
1054
- context[:gem_version] = '3.217.1'
1064
+ context[:gem_version] = '3.224.1'
1055
1065
  Seahorse::Client::Request.new(handlers, context)
1056
1066
  end
1057
1067
 
@@ -20,6 +20,7 @@ module Aws::SSOOIDC
20
20
  Assertion = Shapes::StringShape.new(name: 'Assertion')
21
21
  AuthCode = Shapes::StringShape.new(name: 'AuthCode')
22
22
  AuthorizationPendingException = Shapes::StructureShape.new(name: 'AuthorizationPendingException')
23
+ AwsAdditionalDetails = Shapes::StructureShape.new(name: 'AwsAdditionalDetails')
23
24
  ClientId = Shapes::StringShape.new(name: 'ClientId')
24
25
  ClientName = Shapes::StringShape.new(name: 'ClientName')
25
26
  ClientSecret = Shapes::StringShape.new(name: 'ClientSecret')
@@ -37,6 +38,7 @@ module Aws::SSOOIDC
37
38
  GrantType = Shapes::StringShape.new(name: 'GrantType')
38
39
  GrantTypes = Shapes::ListShape.new(name: 'GrantTypes')
39
40
  IdToken = Shapes::StringShape.new(name: 'IdToken')
41
+ IdentityContext = Shapes::StringShape.new(name: 'IdentityContext')
40
42
  InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
41
43
  IntervalInSeconds = Shapes::IntegerShape.new(name: 'IntervalInSeconds')
42
44
  InvalidClientException = Shapes::StructureShape.new(name: 'InvalidClientException')
@@ -74,6 +76,9 @@ module Aws::SSOOIDC
74
76
  AuthorizationPendingException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
75
77
  AuthorizationPendingException.struct_class = Types::AuthorizationPendingException
76
78
 
79
+ AwsAdditionalDetails.add_member(:identity_context, Shapes::ShapeRef.new(shape: IdentityContext, location_name: "identityContext"))
80
+ AwsAdditionalDetails.struct_class = Types::AwsAdditionalDetails
81
+
77
82
  CreateTokenRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, required: true, location_name: "clientId"))
78
83
  CreateTokenRequest.add_member(:client_secret, Shapes::ShapeRef.new(shape: ClientSecret, required: true, location_name: "clientSecret"))
79
84
  CreateTokenRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: GrantType, required: true, location_name: "grantType"))
@@ -112,6 +117,7 @@ module Aws::SSOOIDC
112
117
  CreateTokenWithIAMResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
113
118
  CreateTokenWithIAMResponse.add_member(:issued_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "issuedTokenType"))
114
119
  CreateTokenWithIAMResponse.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
120
+ CreateTokenWithIAMResponse.add_member(:aws_additional_details, Shapes::ShapeRef.new(shape: AwsAdditionalDetails, location_name: "awsAdditionalDetails"))
115
121
  CreateTokenWithIAMResponse.struct_class = Types::CreateTokenWithIAMResponse
116
122
 
117
123
  ExpiredTokenException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
@@ -10,43 +10,39 @@
10
10
  module Aws::SSOOIDC
11
11
  class EndpointProvider
12
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)
13
+ if Aws::Endpoints::Matchers.set?(parameters.endpoint)
14
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
19
15
  raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
20
16
  end
21
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
17
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
22
18
  raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
19
  end
24
- return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
20
+ return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
25
21
  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)
22
+ if Aws::Endpoints::Matchers.set?(parameters.region)
23
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
24
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
29
25
  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: {})
26
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
27
  end
32
28
  raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
29
  end
34
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
30
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
35
31
  if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
36
32
  if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
37
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.amazonaws.com", headers: {}, properties: {})
33
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.amazonaws.com", headers: {}, properties: {})
38
34
  end
39
- return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
35
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
40
36
  end
41
37
  raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
42
38
  end
43
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
39
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
44
40
  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: {})
41
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
46
42
  end
47
43
  raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
48
44
  end
49
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
45
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
50
46
  end
51
47
  end
52
48
  raise ArgumentError, "Invalid Configuration: Missing Region"