aws-sdk-core 3.209.1 → 3.228.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +231 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +1 -2
  5. data/lib/aws-sdk-core/arn.rb +1 -3
  6. data/lib/aws-sdk-core/assume_role_credentials.rb +1 -0
  7. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +1 -0
  8. data/lib/aws-sdk-core/cbor/decoder.rb +0 -2
  9. data/lib/aws-sdk-core/cbor/encoder.rb +2 -2
  10. data/lib/aws-sdk-core/cbor.rb +3 -56
  11. data/lib/aws-sdk-core/client_stubs.rb +29 -55
  12. data/lib/aws-sdk-core/credential_provider.rb +4 -0
  13. data/lib/aws-sdk-core/credential_provider_chain.rb +28 -8
  14. data/lib/aws-sdk-core/credentials.rb +6 -0
  15. data/lib/aws-sdk-core/ecs_credentials.rb +1 -0
  16. data/lib/aws-sdk-core/endpoints/matchers.rb +3 -9
  17. data/lib/aws-sdk-core/endpoints.rb +37 -13
  18. data/lib/aws-sdk-core/error_handler.rb +5 -0
  19. data/lib/aws-sdk-core/errors.rb +2 -2
  20. data/lib/aws-sdk-core/event_emitter.rb +1 -1
  21. data/lib/aws-sdk-core/instance_profile_credentials.rb +147 -157
  22. data/lib/aws-sdk-core/json/error_handler.rb +14 -3
  23. data/lib/aws-sdk-core/json/handler.rb +1 -0
  24. data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
  25. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -170
  26. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
  27. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +85 -70
  28. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
  29. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
  30. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +44 -25
  31. data/lib/aws-sdk-core/plugins/sign.rb +30 -21
  32. data/lib/aws-sdk-core/plugins/stub_responses.rb +30 -8
  33. data/lib/aws-sdk-core/plugins/user_agent.rb +33 -2
  34. data/lib/aws-sdk-core/process_credentials.rb +1 -1
  35. data/lib/aws-sdk-core/rest/request/headers.rb +3 -3
  36. data/lib/aws-sdk-core/rpc_v2/builder.rb +1 -1
  37. data/lib/aws-sdk-core/{cbor → rpc_v2}/cbor_engine.rb +4 -5
  38. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +3 -1
  39. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +27 -16
  40. data/lib/aws-sdk-core/rpc_v2/handler.rb +2 -1
  41. data/lib/aws-sdk-core/rpc_v2/parser.rb +9 -1
  42. data/lib/aws-sdk-core/rpc_v2.rb +65 -2
  43. data/lib/aws-sdk-core/shared_config.rb +75 -21
  44. data/lib/aws-sdk-core/shared_credentials.rb +1 -0
  45. data/lib/aws-sdk-core/sso_credentials.rb +2 -0
  46. data/lib/aws-sdk-core/static_token_provider.rb +1 -2
  47. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
  48. data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
  49. data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
  50. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
  51. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
  52. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
  53. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +13 -15
  54. data/lib/aws-sdk-core/stubbing.rb +2 -2
  55. data/lib/aws-sdk-core/token.rb +3 -3
  56. data/lib/aws-sdk-core/token_provider.rb +4 -0
  57. data/lib/aws-sdk-core/token_provider_chain.rb +2 -6
  58. data/lib/aws-sdk-core/util.rb +2 -1
  59. data/lib/aws-sdk-core/xml/error_handler.rb +3 -1
  60. data/lib/aws-sdk-sso/client.rb +71 -39
  61. data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
  62. data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
  63. data/lib/aws-sdk-sso/endpoints.rb +2 -42
  64. data/lib/aws-sdk-sso/plugins/endpoints.rb +1 -14
  65. data/lib/aws-sdk-sso.rb +1 -1
  66. data/lib/aws-sdk-ssooidc/client.rb +108 -59
  67. data/lib/aws-sdk-ssooidc/client_api.rb +6 -0
  68. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
  69. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
  70. data/lib/aws-sdk-ssooidc/endpoints.rb +2 -42
  71. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +1 -14
  72. data/lib/aws-sdk-ssooidc/types.rb +48 -16
  73. data/lib/aws-sdk-ssooidc.rb +1 -1
  74. data/lib/aws-sdk-sts/client.rb +279 -91
  75. data/lib/aws-sdk-sts/client_api.rb +33 -8
  76. data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
  77. data/lib/aws-sdk-sts/endpoint_provider.rb +50 -55
  78. data/lib/aws-sdk-sts/endpoints.rb +2 -94
  79. data/lib/aws-sdk-sts/errors.rb +15 -0
  80. data/lib/aws-sdk-sts/plugins/endpoints.rb +1 -22
  81. data/lib/aws-sdk-sts/presigner.rb +2 -6
  82. data/lib/aws-sdk-sts/types.rb +170 -28
  83. data/lib/aws-sdk-sts.rb +1 -1
  84. data/lib/seahorse/client/async_base.rb +4 -5
  85. data/lib/seahorse/client/base.rb +0 -14
  86. data/lib/seahorse/client/h2/connection.rb +18 -28
  87. data/lib/seahorse/client/http/response.rb +1 -1
  88. data/lib/seahorse/client/net_http/connection_pool.rb +4 -1
  89. data/lib/seahorse/client/networking_error.rb +1 -1
  90. data/lib/seahorse/client/plugins/h2.rb +4 -4
  91. data/lib/seahorse/client/request_context.rb +2 -2
  92. data/lib/seahorse/client/response.rb +2 -0
  93. data/lib/seahorse/util.rb +2 -1
  94. data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
  95. data/sig/seahorse/client/async_base.rbs +18 -0
  96. metadata +57 -17
@@ -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`.
@@ -95,7 +95,7 @@ module Aws::SSOOIDC
95
95
  # class name or an instance of a plugin class.
96
96
  #
97
97
  # @option options [required, Aws::CredentialProvider] :credentials
98
- # Your AWS credentials. This can be an instance of any one of the
98
+ # Your AWS credentials used for authentication. This can be an instance of any one of the
99
99
  # following classes:
100
100
  #
101
101
  # * `Aws::Credentials` - Used for configuring static, non-refreshing
@@ -128,18 +128,23 @@ module Aws::SSOOIDC
128
128
  # locations will be searched for credentials:
129
129
  #
130
130
  # * `Aws.config[:credentials]`
131
+ #
131
132
  # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
132
133
  # `:account_id` options.
133
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
134
- # ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
134
+ #
135
+ # * `ENV['AWS_ACCESS_KEY_ID']`, `ENV['AWS_SECRET_ACCESS_KEY']`,
136
+ # `ENV['AWS_SESSION_TOKEN']`, and `ENV['AWS_ACCOUNT_ID']`.
137
+ #
135
138
  # * `~/.aws/credentials`
139
+ #
136
140
  # * `~/.aws/config`
141
+ #
137
142
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
138
143
  # are very aggressive. Construct and pass an instance of
139
144
  # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
140
145
  # enable retries and extended timeouts. Instance profile credential
141
- # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
142
- # to true.
146
+ # fetching can be disabled by setting `ENV['AWS_EC2_METADATA_DISABLED']`
147
+ # to `true`.
143
148
  #
144
149
  # @option options [required, String] :region
145
150
  # The AWS region to connect to. The configured `:region` is
@@ -167,6 +172,11 @@ module Aws::SSOOIDC
167
172
  # When false, the request will raise a `RetryCapacityNotAvailableError` and will
168
173
  # not retry instead of sleeping.
169
174
  #
175
+ # @option options [Array<String>] :auth_scheme_preference
176
+ # A list of preferred authentication schemes to use when making a request. Supported values are:
177
+ # `sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV['AWS_AUTH_SCHEME_PREFERENCE']` or in
178
+ # shared config as `auth_scheme_preference`, the value should be a comma-separated list.
179
+ #
170
180
  # @option options [Boolean] :client_side_monitoring (false)
171
181
  # When `true`, client-side metrics will be collected for all API requests from
172
182
  # this client.
@@ -200,8 +210,7 @@ module Aws::SSOOIDC
200
210
  # accepted modes and the configuration defaults that are included.
201
211
  #
202
212
  # @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.
213
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
205
214
  #
206
215
  # @option options [Boolean] :disable_request_compression (false)
207
216
  # When set to 'true' the request body will not be compressed
@@ -254,14 +263,37 @@ module Aws::SSOOIDC
254
263
  # 4 times. Used in `standard` and `adaptive` retry modes.
255
264
  #
256
265
  # @option options [String] :profile ("default")
257
- # Used when loading credentials from the shared credentials file
258
- # at HOME/.aws/credentials. When not specified, 'default' is used.
266
+ # Used when loading credentials from the shared credentials file at `HOME/.aws/credentials`.
267
+ # When not specified, 'default' is used.
268
+ #
269
+ # @option options [String] :request_checksum_calculation ("when_supported")
270
+ # Determines when a checksum will be calculated for request payloads. Values are:
271
+ #
272
+ # * `when_supported` - (default) When set, a checksum will be
273
+ # calculated for all request payloads of operations modeled with the
274
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
275
+ # `requestAlgorithmMember` is modeled.
276
+ # * `when_required` - When set, a checksum will only be calculated for
277
+ # request payloads of operations modeled with the `httpChecksum` trait where
278
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
279
+ # is modeled and supplied.
259
280
  #
260
281
  # @option options [Integer] :request_min_compression_size_bytes (10240)
261
282
  # The minimum size in bytes that triggers compression for request
262
283
  # bodies. The value must be non-negative integer value between 0
263
284
  # and 10485780 bytes inclusive.
264
285
  #
286
+ # @option options [String] :response_checksum_validation ("when_supported")
287
+ # Determines when checksum validation will be performed on response payloads. Values are:
288
+ #
289
+ # * `when_supported` - (default) When set, checksum validation is performed on all
290
+ # response payloads of operations modeled with the `httpChecksum` trait where
291
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
292
+ # are supported.
293
+ # * `when_required` - When set, checksum validation is not performed on
294
+ # response payloads of operations unless the checksum algorithm is supported and
295
+ # the `requestValidationModeMember` member is set to `ENABLED`.
296
+ #
265
297
  # @option options [Proc] :retry_backoff
266
298
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
267
299
  # This option is only used in the `legacy` retry mode.
@@ -345,7 +377,7 @@ module Aws::SSOOIDC
345
377
  # `Aws::Telemetry::OTelProvider` for telemetry provider.
346
378
  #
347
379
  # @option options [Aws::TokenProvider] :token_provider
348
- # A Bearer Token Provider. This can be an instance of any one of the
380
+ # Your Bearer token used for authentication. This can be an instance of any one of the
349
381
  # following classes:
350
382
  #
351
383
  # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
@@ -449,7 +481,7 @@ module Aws::SSOOIDC
449
481
 
450
482
  # Creates and returns access and refresh tokens for clients that are
451
483
  # authenticated using client secrets. The access token can be used to
452
- # fetch short-term credentials for the assigned AWS accounts or to
484
+ # fetch short-lived credentials for the assigned AWS accounts or to
453
485
  # access application APIs using `bearer` authentication.
454
486
  #
455
487
  # @option params [required, String] :client_id
@@ -461,30 +493,28 @@ module Aws::SSOOIDC
461
493
  # the persisted result of the RegisterClient API.
462
494
  #
463
495
  # @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:
496
+ # Supports the following OAuth grant types: Authorization Code, Device
497
+ # Code, and Refresh Token. Specify one of the following values,
498
+ # depending on the grant type that you want:
499
+ #
500
+ # * Authorization Code - `authorization_code`
467
501
  #
468
502
  # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
469
503
  #
470
504
  # * Refresh Token - `refresh_token`
471
505
  #
472
- # For information about how to obtain the device code, see the
473
- # StartDeviceAuthorization topic.
474
- #
475
506
  # @option params [String] :device_code
476
507
  # 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
508
+ # short-lived code is used to identify this authorization request. This
478
509
  # comes from the result of the StartDeviceAuthorization API.
479
510
  #
480
511
  # @option params [String] :code
481
512
  # 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.
513
+ # The short-lived code is used to identify this authorization request.
484
514
  #
485
515
  # @option params [String] :refresh_token
486
516
  # 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,
517
+ # token is used to refresh short-lived tokens, such as the access token,
488
518
  # that might expire.
489
519
  #
490
520
  # For more information about the features and limitations of the current
@@ -590,7 +620,7 @@ module Aws::SSOOIDC
590
620
 
591
621
  # Creates and returns access and refresh tokens for clients and
592
622
  # applications that are authenticated using IAM entities. The access
593
- # token can be used to fetch short-term credentials for the assigned
623
+ # token can be used to fetch short-lived credentials for the assigned
594
624
  # Amazon Web Services accounts or to access application APIs using
595
625
  # `bearer` authentication.
596
626
  #
@@ -613,14 +643,14 @@ module Aws::SSOOIDC
613
643
  #
614
644
  # @option params [String] :code
615
645
  # Used only when calling this API for the Authorization Code grant type.
616
- # This short-term code is used to identify this authorization request.
646
+ # This short-lived code is used to identify this authorization request.
617
647
  # The code is obtained through a redirect from IAM Identity Center to a
618
648
  # redirect URI persisted in the Authorization Code GrantOptions for the
619
649
  # application.
620
650
  #
621
651
  # @option params [String] :refresh_token
622
652
  # 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,
653
+ # token is used to refresh short-lived tokens, such as the access token,
624
654
  # that might expire.
625
655
  #
626
656
  # For more information about the features and limitations of the current
@@ -687,6 +717,7 @@ module Aws::SSOOIDC
687
717
  # * {Types::CreateTokenWithIAMResponse#id_token #id_token} => String
688
718
  # * {Types::CreateTokenWithIAMResponse#issued_token_type #issued_token_type} => String
689
719
  # * {Types::CreateTokenWithIAMResponse#scope #scope} => Array&lt;String&gt;
720
+ # * {Types::CreateTokenWithIAMResponse#aws_additional_details #aws_additional_details} => Types::AwsAdditionalDetails
690
721
  #
691
722
  #
692
723
  # @example Example: Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication
@@ -706,6 +737,9 @@ module Aws::SSOOIDC
706
737
  # resp.to_h outputs the following:
707
738
  # {
708
739
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
740
+ # aws_additional_details: {
741
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
742
+ # },
709
743
  # expires_in: 1579729529,
710
744
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
711
745
  # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
@@ -751,6 +785,9 @@ module Aws::SSOOIDC
751
785
  # resp.to_h outputs the following:
752
786
  # {
753
787
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
788
+ # aws_additional_details: {
789
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
790
+ # },
754
791
  # expires_in: 1579729529,
755
792
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
756
793
  # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
@@ -776,6 +813,9 @@ module Aws::SSOOIDC
776
813
  # resp.to_h outputs the following:
777
814
  # {
778
815
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
816
+ # aws_additional_details: {
817
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
818
+ # },
779
819
  # expires_in: 1579729529,
780
820
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM",
781
821
  # issued_token_type: "urn:ietf:params:oauth:token-type:access_token",
@@ -813,6 +853,7 @@ module Aws::SSOOIDC
813
853
  # resp.issued_token_type #=> String
814
854
  # resp.scope #=> Array
815
855
  # resp.scope[0] #=> String
856
+ # resp.aws_additional_details.identity_context #=> String
816
857
  #
817
858
  # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM AWS API Documentation
818
859
  #
@@ -823,9 +864,10 @@ module Aws::SSOOIDC
823
864
  req.send_request(options)
824
865
  end
825
866
 
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.
867
+ # Registers a public client with IAM Identity Center. This allows
868
+ # clients to perform authorization using the authorization
869
+ # code grant with Proof Key for Code Exchange (PKCE) or the device
870
+ # code grant.
829
871
  #
830
872
  # @option params [required, String] :client_name
831
873
  # The friendly name of the client.
@@ -847,7 +889,14 @@ module Aws::SSOOIDC
847
889
  # @option params [Array<String>] :grant_types
848
890
  # The list of OAuth 2.0 grant types that are defined by the client. This
849
891
  # list is used to restrict the token granting flows available to the
850
- # client.
892
+ # client. Supports the following OAuth 2.0 grant types: Authorization
893
+ # Code, Device Code, and Refresh Token.
894
+ #
895
+ # * Authorization Code - `authorization_code`
896
+ #
897
+ # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
898
+ #
899
+ # * Refresh Token - `refresh_token`
851
900
  #
852
901
  # @option params [String] :issuer_url
853
902
  # The IAM Identity Center Issuer URL associated with an instance of IAM
@@ -974,8 +1023,8 @@ module Aws::SSOOIDC
974
1023
  # expires_in: 1579729529,
975
1024
  # interval: 1,
976
1025
  # 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",
1026
+ # verification_uri: "https://directory-alias-example.awsapps.com/start/#/device",
1027
+ # verification_uri_complete: "https://directory-alias-example.awsapps.com/start/#/device?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
979
1028
  # }
980
1029
  #
981
1030
  # @example Request syntax with placeholder values
@@ -1022,7 +1071,7 @@ module Aws::SSOOIDC
1022
1071
  tracer: tracer
1023
1072
  )
1024
1073
  context[:gem_name] = 'aws-sdk-core'
1025
- context[:gem_version] = '3.209.1'
1074
+ context[:gem_version] = '3.228.0'
1026
1075
  Seahorse::Client::Request.new(handlers, context)
1027
1076
  end
1028
1077
 
@@ -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"))
@@ -52,15 +52,18 @@ module Aws::SSOOIDC
52
52
  self[:region] = options[:region]
53
53
  self[:use_dual_stack] = options[:use_dual_stack]
54
54
  self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
- if self[:use_dual_stack].nil?
56
- raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
57
- end
58
55
  self[:use_fips] = options[:use_fips]
59
56
  self[:use_fips] = false if self[:use_fips].nil?
60
- if self[:use_fips].nil?
61
- raise ArgumentError, "Missing required EndpointParameter: :use_fips"
62
- end
63
57
  self[:endpoint] = options[:endpoint]
64
58
  end
59
+
60
+ def self.create(config, options={})
61
+ new({
62
+ region: config.region,
63
+ use_dual_stack: config.use_dualstack_endpoint,
64
+ use_fips: config.use_fips_endpoint,
65
+ endpoint: (config.endpoint.to_s unless config.regional_endpoint),
66
+ }.merge(options))
67
+ end
65
68
  end
66
69
  end
@@ -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"
@@ -12,49 +12,9 @@ module Aws::SSOOIDC
12
12
  # @api private
13
13
  module Endpoints
14
14
 
15
- class CreateToken
16
- def self.build(context)
17
- Aws::SSOOIDC::EndpointParameters.new(
18
- region: context.config.region,
19
- use_dual_stack: context.config.use_dualstack_endpoint,
20
- use_fips: context.config.use_fips_endpoint,
21
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
22
- )
23
- end
24
- end
25
-
26
- class CreateTokenWithIAM
27
- def self.build(context)
28
- Aws::SSOOIDC::EndpointParameters.new(
29
- region: context.config.region,
30
- use_dual_stack: context.config.use_dualstack_endpoint,
31
- use_fips: context.config.use_fips_endpoint,
32
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
33
- )
34
- end
35
- end
36
15
 
37
- class RegisterClient
38
- def self.build(context)
39
- Aws::SSOOIDC::EndpointParameters.new(
40
- region: context.config.region,
41
- use_dual_stack: context.config.use_dualstack_endpoint,
42
- use_fips: context.config.use_fips_endpoint,
43
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
44
- )
45
- end
16
+ def self.parameters_for_operation(context)
17
+ Aws::SSOOIDC::EndpointParameters.create(context.config)
46
18
  end
47
-
48
- class StartDeviceAuthorization
49
- def self.build(context)
50
- Aws::SSOOIDC::EndpointParameters.new(
51
- region: context.config.region,
52
- use_dual_stack: context.config.use_dualstack_endpoint,
53
- use_fips: context.config.use_fips_endpoint,
54
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
55
- )
56
- end
57
- end
58
-
59
19
  end
60
20
  end
@@ -27,7 +27,7 @@ The endpoint provider used to resolve endpoints. Any object that responds to
27
27
  class Handler < Seahorse::Client::Handler
28
28
  def call(context)
29
29
  unless context[:discovered_endpoint]
30
- params = parameters_for_operation(context)
30
+ params = Aws::SSOOIDC::Endpoints.parameters_for_operation(context)
31
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
32
 
33
33
  context.http_request.endpoint = endpoint.url
@@ -67,19 +67,6 @@ The endpoint provider used to resolve endpoints. Any object that responds to
67
67
  context.http_request.headers[key] = value
68
68
  end
69
69
  end
70
-
71
- def parameters_for_operation(context)
72
- case context.operation_name
73
- when :create_token
74
- Aws::SSOOIDC::Endpoints::CreateToken.build(context)
75
- when :create_token_with_iam
76
- Aws::SSOOIDC::Endpoints::CreateTokenWithIAM.build(context)
77
- when :register_client
78
- Aws::SSOOIDC::Endpoints::RegisterClient.build(context)
79
- when :start_device_authorization
80
- Aws::SSOOIDC::Endpoints::StartDeviceAuthorization.build(context)
81
- end
82
- end
83
70
  end
84
71
 
85
72
  def add_handlers(handlers, _config)