aws-sdk-core 3.214.1 → 3.222.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.
@@ -29,8 +29,16 @@ requests are made, and retries are disabled.
29
29
  end
30
30
  end
31
31
 
32
+ option(:stubs) { {} }
33
+ option(:stubs_mutex) { Mutex.new }
34
+ option(:api_requests) { [] }
35
+ option(:api_requests_mutex) { Mutex.new }
36
+
32
37
  def add_handlers(handlers, config)
33
- handlers.add(Handler, step: :send) if config.stub_responses
38
+ return unless config.stub_responses
39
+
40
+ handlers.add(ApiRequestsHandler)
41
+ handlers.add(StubbingHandler, step: :send)
34
42
  end
35
43
 
36
44
  def after_initialize(client)
@@ -46,8 +54,20 @@ requests are made, and retries are disabled.
46
54
  end
47
55
  end
48
56
 
49
- class Handler < Seahorse::Client::Handler
57
+ class ApiRequestsHandler < Seahorse::Client::Handler
58
+ def call(context)
59
+ context.config.api_requests_mutex.synchronize do
60
+ context.config.api_requests << {
61
+ operation_name: context.operation_name,
62
+ params: context.params,
63
+ context: context
64
+ }
65
+ end
66
+ @handler.call(context)
67
+ end
68
+ end
50
69
 
70
+ class StubbingHandler < Seahorse::Client::Handler
51
71
  def call(context)
52
72
  span_wrapper(context) do
53
73
  stub_responses(context)
@@ -57,14 +77,10 @@ requests are made, and retries are disabled.
57
77
  private
58
78
 
59
79
  def stub_responses(context)
60
- stub = context.client.next_stub(context)
61
80
  resp = Seahorse::Client::Response.new(context: context)
62
81
  async_mode = context.client.is_a? Seahorse::Client::AsyncBase
63
- if Hash === stub && stub[:mutex]
64
- stub[:mutex].synchronize { apply_stub(stub, resp, async_mode) }
65
- else
66
- apply_stub(stub, resp, async_mode)
67
- end
82
+ stub = context.client.next_stub(context)
83
+ stub[:mutex].synchronize { apply_stub(stub, resp, async_mode) }
68
84
 
69
85
  if async_mode
70
86
  Seahorse::Client::AsyncResponse.new(
@@ -25,7 +25,16 @@ module Aws
25
25
  "ACCOUNT_ID_MODE_DISABLED": "Q",
26
26
  "ACCOUNT_ID_MODE_REQUIRED": "R",
27
27
  "SIGV4A_SIGNING": "S",
28
- "RESOLVED_ACCOUNT_ID": "T"
28
+ "RESOLVED_ACCOUNT_ID": "T",
29
+ "FLEXIBLE_CHECKSUMS_REQ_CRC32" : "U",
30
+ "FLEXIBLE_CHECKSUMS_REQ_CRC32C" : "V",
31
+ "FLEXIBLE_CHECKSUMS_REQ_CRC64" : "W",
32
+ "FLEXIBLE_CHECKSUMS_REQ_SHA1" : "X",
33
+ "FLEXIBLE_CHECKSUMS_REQ_SHA256" : "Y",
34
+ "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED" : "Z",
35
+ "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED" : "a",
36
+ "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED" : "b",
37
+ "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED" : "c"
29
38
  }
30
39
  METRICS
31
40
 
@@ -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
 
@@ -212,6 +212,8 @@ module Aws
212
212
  :retry_mode,
213
213
  :adaptive_retry_wait_to_fill,
214
214
  :correct_clock_skew,
215
+ :request_checksum_calculation,
216
+ :response_checksum_validation,
215
217
  :csm_client_id,
216
218
  :csm_enabled,
217
219
  :csm_host,
@@ -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`.
@@ -257,11 +257,34 @@ module Aws::SSO
257
257
  # Used when loading credentials from the shared credentials file
258
258
  # at HOME/.aws/credentials. When not specified, 'default' is used.
259
259
  #
260
+ # @option options [String] :request_checksum_calculation ("when_supported")
261
+ # Determines when a checksum will be calculated for request payloads. Values are:
262
+ #
263
+ # * `when_supported` - (default) When set, a checksum will be
264
+ # calculated for all request payloads of operations modeled with the
265
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
266
+ # `requestAlgorithmMember` is modeled.
267
+ # * `when_required` - When set, a checksum will only be calculated for
268
+ # request payloads of operations modeled with the `httpChecksum` trait where
269
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
270
+ # is modeled and supplied.
271
+ #
260
272
  # @option options [Integer] :request_min_compression_size_bytes (10240)
261
273
  # The minimum size in bytes that triggers compression for request
262
274
  # bodies. The value must be non-negative integer value between 0
263
275
  # and 10485780 bytes inclusive.
264
276
  #
277
+ # @option options [String] :response_checksum_validation ("when_supported")
278
+ # Determines when checksum validation will be performed on response payloads. Values are:
279
+ #
280
+ # * `when_supported` - (default) When set, checksum validation is performed on all
281
+ # response payloads of operations modeled with the `httpChecksum` trait where
282
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
283
+ # are supported.
284
+ # * `when_required` - When set, checksum validation is not performed on
285
+ # response payloads of operations unless the checksum algorithm is supported and
286
+ # the `requestValidationModeMember` member is set to `ENABLED`.
287
+ #
265
288
  # @option options [Proc] :retry_backoff
266
289
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
267
290
  # This option is only used in the `legacy` retry mode.
@@ -669,7 +692,7 @@ module Aws::SSO
669
692
  tracer: tracer
670
693
  )
671
694
  context[:gem_name] = 'aws-sdk-core'
672
- context[:gem_version] = '3.214.1'
695
+ context[:gem_version] = '3.222.1'
673
696
  Seahorse::Client::Request.new(handlers, context)
674
697
  end
675
698
 
@@ -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.214.1'
59
+ GEM_VERSION = '3.222.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`.
@@ -257,11 +257,34 @@ module Aws::SSOOIDC
257
257
  # Used when loading credentials from the shared credentials file
258
258
  # at HOME/.aws/credentials. When not specified, 'default' is used.
259
259
  #
260
+ # @option options [String] :request_checksum_calculation ("when_supported")
261
+ # Determines when a checksum will be calculated for request payloads. Values are:
262
+ #
263
+ # * `when_supported` - (default) When set, a checksum will be
264
+ # calculated for all request payloads of operations modeled with the
265
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
266
+ # `requestAlgorithmMember` is modeled.
267
+ # * `when_required` - When set, a checksum will only be calculated for
268
+ # request payloads of operations modeled with the `httpChecksum` trait where
269
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
270
+ # is modeled and supplied.
271
+ #
260
272
  # @option options [Integer] :request_min_compression_size_bytes (10240)
261
273
  # The minimum size in bytes that triggers compression for request
262
274
  # bodies. The value must be non-negative integer value between 0
263
275
  # and 10485780 bytes inclusive.
264
276
  #
277
+ # @option options [String] :response_checksum_validation ("when_supported")
278
+ # Determines when checksum validation will be performed on response payloads. Values are:
279
+ #
280
+ # * `when_supported` - (default) When set, checksum validation is performed on all
281
+ # response payloads of operations modeled with the `httpChecksum` trait where
282
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
283
+ # are supported.
284
+ # * `when_required` - When set, checksum validation is not performed on
285
+ # response payloads of operations unless the checksum algorithm is supported and
286
+ # the `requestValidationModeMember` member is set to `ENABLED`.
287
+ #
265
288
  # @option options [Proc] :retry_backoff
266
289
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
267
290
  # This option is only used in the `legacy` retry mode.
@@ -449,7 +472,7 @@ module Aws::SSOOIDC
449
472
 
450
473
  # Creates and returns access and refresh tokens for clients that are
451
474
  # authenticated using client secrets. The access token can be used to
452
- # fetch short-term credentials for the assigned AWS accounts or to
475
+ # fetch short-lived credentials for the assigned AWS accounts or to
453
476
  # access application APIs using `bearer` authentication.
454
477
  #
455
478
  # @option params [required, String] :client_id
@@ -461,30 +484,28 @@ module Aws::SSOOIDC
461
484
  # the persisted result of the RegisterClient API.
462
485
  #
463
486
  # @option params [required, String] :grant_type
464
- # Supports the following OAuth grant types: Device Code and Refresh
465
- # Token. Specify either of the following values, depending on the grant
466
- # type that you want:
487
+ # Supports the following OAuth grant types: Authorization Code, Device
488
+ # Code, and Refresh Token. Specify one of the following values,
489
+ # depending on the grant type that you want:
490
+ #
491
+ # * Authorization Code - `authorization_code`
467
492
  #
468
493
  # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
469
494
  #
470
495
  # * Refresh Token - `refresh_token`
471
496
  #
472
- # For information about how to obtain the device code, see the
473
- # StartDeviceAuthorization topic.
474
- #
475
497
  # @option params [String] :device_code
476
498
  # Used only when calling this API for the Device Code grant type. This
477
- # short-term code is used to identify this authorization request. This
499
+ # short-lived code is used to identify this authorization request. This
478
500
  # comes from the result of the StartDeviceAuthorization API.
479
501
  #
480
502
  # @option params [String] :code
481
503
  # Used only when calling this API for the Authorization Code grant type.
482
- # The short-term code is used to identify this authorization request.
483
- # This grant type is currently unsupported for the CreateToken API.
504
+ # The short-lived code is used to identify this authorization request.
484
505
  #
485
506
  # @option params [String] :refresh_token
486
507
  # Used only when calling this API for the Refresh Token grant type. This
487
- # token is used to refresh short-term tokens, such as the access token,
508
+ # token is used to refresh short-lived tokens, such as the access token,
488
509
  # that might expire.
489
510
  #
490
511
  # For more information about the features and limitations of the current
@@ -590,7 +611,7 @@ module Aws::SSOOIDC
590
611
 
591
612
  # Creates and returns access and refresh tokens for clients and
592
613
  # applications that are authenticated using IAM entities. The access
593
- # token can be used to fetch short-term credentials for the assigned
614
+ # token can be used to fetch short-lived credentials for the assigned
594
615
  # Amazon Web Services accounts or to access application APIs using
595
616
  # `bearer` authentication.
596
617
  #
@@ -613,14 +634,14 @@ module Aws::SSOOIDC
613
634
  #
614
635
  # @option params [String] :code
615
636
  # Used only when calling this API for the Authorization Code grant type.
616
- # This short-term code is used to identify this authorization request.
637
+ # This short-lived code is used to identify this authorization request.
617
638
  # The code is obtained through a redirect from IAM Identity Center to a
618
639
  # redirect URI persisted in the Authorization Code GrantOptions for the
619
640
  # application.
620
641
  #
621
642
  # @option params [String] :refresh_token
622
643
  # Used only when calling this API for the Refresh Token grant type. This
623
- # token is used to refresh short-term tokens, such as the access token,
644
+ # token is used to refresh short-lived tokens, such as the access token,
624
645
  # that might expire.
625
646
  #
626
647
  # For more information about the features and limitations of the current
@@ -687,6 +708,7 @@ module Aws::SSOOIDC
687
708
  # * {Types::CreateTokenWithIAMResponse#id_token #id_token} => String
688
709
  # * {Types::CreateTokenWithIAMResponse#issued_token_type #issued_token_type} => String
689
710
  # * {Types::CreateTokenWithIAMResponse#scope #scope} => Array&lt;String&gt;
711
+ # * {Types::CreateTokenWithIAMResponse#aws_additional_details #aws_additional_details} => Types::AwsAdditionalDetails
690
712
  #
691
713
  #
692
714
  # @example Example: Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication
@@ -706,6 +728,9 @@ module Aws::SSOOIDC
706
728
  # resp.to_h outputs the following:
707
729
  # {
708
730
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
731
+ # aws_additional_details: {
732
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
733
+ # },
709
734
  # expires_in: 1579729529,
710
735
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
711
736
  # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
@@ -751,6 +776,9 @@ module Aws::SSOOIDC
751
776
  # resp.to_h outputs the following:
752
777
  # {
753
778
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
779
+ # aws_additional_details: {
780
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
781
+ # },
754
782
  # expires_in: 1579729529,
755
783
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
756
784
  # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
@@ -776,6 +804,9 @@ module Aws::SSOOIDC
776
804
  # resp.to_h outputs the following:
777
805
  # {
778
806
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
807
+ # aws_additional_details: {
808
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
809
+ # },
779
810
  # expires_in: 1579729529,
780
811
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM",
781
812
  # issued_token_type: "urn:ietf:params:oauth:token-type:access_token",
@@ -813,6 +844,7 @@ module Aws::SSOOIDC
813
844
  # resp.issued_token_type #=> String
814
845
  # resp.scope #=> Array
815
846
  # resp.scope[0] #=> String
847
+ # resp.aws_additional_details.identity_context #=> String
816
848
  #
817
849
  # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM AWS API Documentation
818
850
  #
@@ -823,9 +855,10 @@ module Aws::SSOOIDC
823
855
  req.send_request(options)
824
856
  end
825
857
 
826
- # Registers a client with IAM Identity Center. This allows clients to
827
- # initiate device authorization. The output should be persisted for
828
- # reuse through many authentication requests.
858
+ # Registers a public client with IAM Identity Center. This allows
859
+ # clients to perform authorization using the authorization
860
+ # code grant with Proof Key for Code Exchange (PKCE) or the device
861
+ # code grant.
829
862
  #
830
863
  # @option params [required, String] :client_name
831
864
  # The friendly name of the client.
@@ -847,7 +880,14 @@ module Aws::SSOOIDC
847
880
  # @option params [Array<String>] :grant_types
848
881
  # The list of OAuth 2.0 grant types that are defined by the client. This
849
882
  # list is used to restrict the token granting flows available to the
850
- # client.
883
+ # client. Supports the following OAuth 2.0 grant types: Authorization
884
+ # Code, Device Code, and Refresh Token.
885
+ #
886
+ # * Authorization Code - `authorization_code`
887
+ #
888
+ # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
889
+ #
890
+ # * Refresh Token - `refresh_token`
851
891
  #
852
892
  # @option params [String] :issuer_url
853
893
  # The IAM Identity Center Issuer URL associated with an instance of IAM
@@ -974,8 +1014,8 @@ module Aws::SSOOIDC
974
1014
  # expires_in: 1579729529,
975
1015
  # interval: 1,
976
1016
  # user_code: "makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
977
- # verification_uri: "https://device.sso.us-west-2.amazonaws.com",
978
- # verification_uri_complete: "https://device.sso.us-west-2.amazonaws.com?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
1017
+ # verification_uri: "https://directory-alias-example.awsapps.com/start/#/device",
1018
+ # verification_uri_complete: "https://directory-alias-example.awsapps.com/start/#/device?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
979
1019
  # }
980
1020
  #
981
1021
  # @example Request syntax with placeholder values
@@ -1022,7 +1062,7 @@ module Aws::SSOOIDC
1022
1062
  tracer: tracer
1023
1063
  )
1024
1064
  context[:gem_name] = 'aws-sdk-core'
1025
- context[:gem_version] = '3.214.1'
1065
+ context[:gem_version] = '3.222.1'
1026
1066
  Seahorse::Client::Request.new(handlers, context)
1027
1067
  end
1028
1068
 
@@ -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"