aws-sdk-core 3.165.0 → 3.201.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +462 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +4 -4
  5. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
  6. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  7. data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
  8. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  9. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  10. data/lib/aws-sdk-core/cbor/cbor_engine.rb +19 -0
  11. data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
  12. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  13. data/lib/aws-sdk-core/cbor.rb +106 -0
  14. data/lib/aws-sdk-core/client_stubs.rb +18 -14
  15. data/lib/aws-sdk-core/credential_provider.rb +4 -1
  16. data/lib/aws-sdk-core/credential_provider_chain.rb +8 -5
  17. data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
  18. data/lib/aws-sdk-core/ecs_credentials.rb +178 -53
  19. data/lib/aws-sdk-core/endpoints/condition.rb +5 -0
  20. data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +5 -1
  21. data/lib/aws-sdk-core/endpoints/error_rule.rb +5 -0
  22. data/lib/aws-sdk-core/endpoints/function.rb +5 -0
  23. data/lib/aws-sdk-core/endpoints/matchers.rb +18 -10
  24. data/lib/aws-sdk-core/endpoints/reference.rb +5 -0
  25. data/lib/aws-sdk-core/endpoints/rule.rb +5 -0
  26. data/lib/aws-sdk-core/endpoints/rule_set.rb +5 -0
  27. data/lib/aws-sdk-core/endpoints/rules_provider.rb +5 -0
  28. data/lib/aws-sdk-core/endpoints/templater.rb +6 -0
  29. data/lib/aws-sdk-core/endpoints/tree_rule.rb +5 -0
  30. data/lib/aws-sdk-core/endpoints/url.rb +1 -0
  31. data/lib/aws-sdk-core/endpoints.rb +69 -19
  32. data/lib/aws-sdk-core/error_handler.rb +41 -0
  33. data/lib/aws-sdk-core/errors.rb +12 -3
  34. data/lib/aws-sdk-core/event_emitter.rb +0 -16
  35. data/lib/aws-sdk-core/ini_parser.rb +7 -0
  36. data/lib/aws-sdk-core/instance_profile_credentials.rb +55 -32
  37. data/lib/aws-sdk-core/json/builder.rb +8 -1
  38. data/lib/aws-sdk-core/json/error_handler.rb +29 -14
  39. data/lib/aws-sdk-core/json/handler.rb +12 -6
  40. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  41. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  42. data/lib/aws-sdk-core/json/parser.rb +33 -3
  43. data/lib/aws-sdk-core/json.rb +43 -14
  44. data/lib/aws-sdk-core/log/formatter.rb +6 -0
  45. data/lib/aws-sdk-core/lru_cache.rb +75 -0
  46. data/lib/aws-sdk-core/pageable_response.rb +3 -1
  47. data/lib/aws-sdk-core/param_validator.rb +9 -4
  48. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  49. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +7 -4
  50. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -0
  51. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
  52. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +2 -0
  53. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  54. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -1
  55. data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
  56. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  57. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  58. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  59. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  60. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  61. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
  62. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
  63. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  64. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +140 -35
  65. data/lib/aws-sdk-core/plugins/request_compression.rb +226 -0
  66. data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +2 -1
  67. data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
  68. data/lib/aws-sdk-core/plugins/sign.rb +43 -19
  69. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  70. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  71. data/lib/aws-sdk-core/plugins/stub_responses.rb +1 -0
  72. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  73. data/lib/aws-sdk-core/plugins/user_agent.rb +152 -14
  74. data/lib/aws-sdk-core/process_credentials.rb +45 -27
  75. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  76. data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
  77. data/lib/aws-sdk-core/query/handler.rb +4 -4
  78. data/lib/aws-sdk-core/query/param_builder.rb +2 -2
  79. data/lib/aws-sdk-core/query.rb +2 -1
  80. data/lib/aws-sdk-core/refreshing_credentials.rb +12 -12
  81. data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
  82. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  83. data/lib/aws-sdk-core/rest/request/body.rb +32 -5
  84. data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
  85. data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
  86. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
  87. data/lib/aws-sdk-core/rest/response/body.rb +15 -1
  88. data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
  89. data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
  90. data/lib/aws-sdk-core/rest.rb +1 -0
  91. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  92. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +45 -0
  93. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +84 -0
  94. data/lib/aws-sdk-core/rpc_v2/handler.rb +74 -0
  95. data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
  96. data/lib/aws-sdk-core/rpc_v2.rb +6 -0
  97. data/lib/aws-sdk-core/shared_config.rb +77 -18
  98. data/lib/aws-sdk-core/sso_credentials.rb +80 -45
  99. data/lib/aws-sdk-core/sso_token_provider.rb +3 -2
  100. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +41 -0
  101. data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
  102. data/lib/aws-sdk-core/util.rb +39 -0
  103. data/lib/aws-sdk-core/waiters/poller.rb +4 -2
  104. data/lib/aws-sdk-core/xml/builder.rb +17 -9
  105. data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
  106. data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
  107. data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +2 -0
  108. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  109. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  110. data/lib/aws-sdk-core.rb +8 -2
  111. data/lib/aws-sdk-sso/client.rb +103 -46
  112. data/lib/aws-sdk-sso/client_api.rb +6 -0
  113. data/lib/aws-sdk-sso/endpoint_provider.rb +41 -96
  114. data/lib/aws-sdk-sso/endpoints.rb +1 -0
  115. data/lib/aws-sdk-sso/plugins/endpoints.rb +4 -2
  116. data/lib/aws-sdk-sso/types.rb +0 -35
  117. data/lib/aws-sdk-sso.rb +1 -1
  118. data/lib/aws-sdk-ssooidc/client.rb +488 -74
  119. data/lib/aws-sdk-ssooidc/client_api.rb +82 -1
  120. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +41 -95
  121. data/lib/aws-sdk-ssooidc/endpoints.rb +15 -0
  122. data/lib/aws-sdk-ssooidc/errors.rb +52 -0
  123. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +6 -2
  124. data/lib/aws-sdk-ssooidc/types.rb +372 -83
  125. data/lib/aws-sdk-ssooidc.rb +1 -1
  126. data/lib/aws-sdk-sts/client.rb +361 -288
  127. data/lib/aws-sdk-sts/client_api.rb +24 -11
  128. data/lib/aws-sdk-sts/endpoint_provider.rb +96 -213
  129. data/lib/aws-sdk-sts/endpoints.rb +1 -0
  130. data/lib/aws-sdk-sts/plugins/endpoints.rb +4 -2
  131. data/lib/aws-sdk-sts/presigner.rb +1 -1
  132. data/lib/aws-sdk-sts/types.rb +128 -197
  133. data/lib/aws-sdk-sts.rb +1 -1
  134. data/lib/seahorse/client/async_base.rb +1 -1
  135. data/lib/seahorse/client/async_response.rb +19 -0
  136. data/lib/seahorse/client/base.rb +18 -7
  137. data/lib/seahorse/client/configuration.rb +0 -4
  138. data/lib/seahorse/client/h2/connection.rb +12 -11
  139. data/lib/seahorse/client/h2/handler.rb +1 -0
  140. data/lib/seahorse/client/handler.rb +1 -1
  141. data/lib/seahorse/client/net_http/connection_pool.rb +3 -9
  142. data/lib/seahorse/client/net_http/patches.rb +1 -4
  143. data/lib/seahorse/client/plugin.rb +9 -0
  144. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  145. data/lib/seahorse/client/plugins/h2.rb +3 -3
  146. data/lib/seahorse/client/plugins/net_http.rb +48 -16
  147. data/lib/seahorse/client/plugins/request_callback.rb +31 -0
  148. data/lib/seahorse/client/response.rb +6 -0
  149. data/lib/seahorse/model/operation.rb +3 -0
  150. data/lib/seahorse/model/shapes.rb +2 -2
  151. data/sig/aws-sdk-core/client_stubs.rbs +10 -0
  152. data/sig/aws-sdk-core/errors.rbs +22 -0
  153. data/sig/aws-sdk-core/resources/collection.rbs +21 -0
  154. data/sig/aws-sdk-core/structure.rbs +4 -0
  155. data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
  156. data/sig/aws-sdk-core.rbs +7 -0
  157. data/sig/seahorse/client/base.rbs +25 -0
  158. data/sig/seahorse/client/handler_builder.rbs +16 -0
  159. data/sig/seahorse/client/response.rbs +61 -0
  160. metadata +44 -17
  161. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  162. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  163. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  164. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -22,12 +22,14 @@ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
22
  require 'aws-sdk-core/plugins/response_paging.rb'
23
23
  require 'aws-sdk-core/plugins/stub_responses.rb'
24
24
  require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/invocation_id.rb'
25
26
  require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
27
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
28
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
29
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
30
  require 'aws-sdk-core/plugins/http_checksum.rb'
30
31
  require 'aws-sdk-core/plugins/checksum_algorithm.rb'
32
+ require 'aws-sdk-core/plugins/request_compression.rb'
31
33
  require 'aws-sdk-core/plugins/defaults_mode.rb'
32
34
  require 'aws-sdk-core/plugins/recursion_detection.rb'
33
35
  require 'aws-sdk-core/plugins/sign.rb'
@@ -71,12 +73,14 @@ module Aws::SSOOIDC
71
73
  add_plugin(Aws::Plugins::ResponsePaging)
72
74
  add_plugin(Aws::Plugins::StubResponses)
73
75
  add_plugin(Aws::Plugins::IdempotencyToken)
76
+ add_plugin(Aws::Plugins::InvocationId)
74
77
  add_plugin(Aws::Plugins::JsonvalueConverter)
75
78
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
76
79
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
77
80
  add_plugin(Aws::Plugins::TransferEncoding)
78
81
  add_plugin(Aws::Plugins::HttpChecksum)
79
82
  add_plugin(Aws::Plugins::ChecksumAlgorithm)
83
+ add_plugin(Aws::Plugins::RequestCompression)
80
84
  add_plugin(Aws::Plugins::DefaultsMode)
81
85
  add_plugin(Aws::Plugins::RecursionDetection)
82
86
  add_plugin(Aws::Plugins::Sign)
@@ -85,6 +89,11 @@ module Aws::SSOOIDC
85
89
 
86
90
  # @overload initialize(options)
87
91
  # @param [Hash] options
92
+ #
93
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
94
+ # A list of plugins to apply to the client. Each plugin is either a
95
+ # class name or an instance of a plugin class.
96
+ #
88
97
  # @option options [required, Aws::CredentialProvider] :credentials
89
98
  # Your AWS credentials. This can be an instance of any one of the
90
99
  # following classes:
@@ -190,10 +199,20 @@ module Aws::SSOOIDC
190
199
  # Set to true to disable SDK automatically adding host prefix
191
200
  # to default service endpoint when available.
192
201
  #
193
- # @option options [String] :endpoint
194
- # The client endpoint is normally constructed from the `:region`
195
- # option. You should only configure an `:endpoint` when connecting
196
- # to test or custom endpoints. This should be a valid HTTP(S) URI.
202
+ # @option options [Boolean] :disable_request_compression (false)
203
+ # When set to 'true' the request body will not be compressed
204
+ # for supported operations.
205
+ #
206
+ # @option options [String, URI::HTTPS, URI::HTTP] :endpoint
207
+ # Normally you should not configure the `:endpoint` option
208
+ # directly. This is normally constructed from the `:region`
209
+ # option. Configuring `:endpoint` is normally reserved for
210
+ # connecting to test or custom endpoints. The endpoint should
211
+ # be a URI formatted like:
212
+ #
213
+ # 'http://example.com'
214
+ # 'https://example.com'
215
+ # 'http://example.com:123'
197
216
  #
198
217
  # @option options [Integer] :endpoint_cache_max_entries (1000)
199
218
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -210,6 +229,10 @@ module Aws::SSOOIDC
210
229
  # @option options [Boolean] :endpoint_discovery (false)
211
230
  # When set to `true`, endpoint discovery will be enabled for operations when available.
212
231
  #
232
+ # @option options [Boolean] :ignore_configured_endpoint_urls
233
+ # Setting to true disables use of endpoint URLs provided via environment
234
+ # variables and the shared configuration file.
235
+ #
213
236
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
214
237
  # The log formatter.
215
238
  #
@@ -230,6 +253,11 @@ module Aws::SSOOIDC
230
253
  # Used when loading credentials from the shared credentials file
231
254
  # at HOME/.aws/credentials. When not specified, 'default' is used.
232
255
  #
256
+ # @option options [Integer] :request_min_compression_size_bytes (10240)
257
+ # The minimum size in bytes that triggers compression for request
258
+ # bodies. The value must be non-negative integer value between 0
259
+ # and 10485780 bytes inclusive.
260
+ #
233
261
  # @option options [Proc] :retry_backoff
234
262
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
235
263
  # This option is only used in the `legacy` retry mode.
@@ -274,11 +302,25 @@ module Aws::SSOOIDC
274
302
  # throttling. This is a provisional mode that may change behavior
275
303
  # in the future.
276
304
  #
305
+ # @option options [String] :sdk_ua_app_id
306
+ # A unique and opaque application ID that is appended to the
307
+ # User-Agent header as app/sdk_ua_app_id. It should have a
308
+ # maximum length of 50. This variable is sourced from environment
309
+ # variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
277
310
  #
278
311
  # @option options [String] :secret_access_key
279
312
  #
280
313
  # @option options [String] :session_token
281
314
  #
315
+ # @option options [Array] :sigv4a_signing_region_set
316
+ # A list of regions that should be signed with SigV4a signing. When
317
+ # not passed, a default `:sigv4a_signing_region_set` is searched for
318
+ # in the following locations:
319
+ #
320
+ # * `Aws.config[:sigv4a_signing_region_set]`
321
+ # * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
322
+ # * `~/.aws/config`
323
+ #
282
324
  # @option options [Boolean] :stub_responses (false)
283
325
  # Causes the client to return stubbed responses. By default
284
326
  # fake responses are generated and returned. You can specify
@@ -317,50 +359,65 @@ module Aws::SSOOIDC
317
359
  # @option options [Aws::SSOOIDC::EndpointProvider] :endpoint_provider
318
360
  # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SSOOIDC::EndpointParameters`
319
361
  #
320
- # @option options [URI::HTTP,String] :http_proxy A proxy to send
321
- # requests through. Formatted like 'http://proxy.com:123'.
322
- #
323
- # @option options [Float] :http_open_timeout (15) The number of
324
- # seconds to wait when opening a HTTP session before raising a
325
- # `Timeout::Error`.
326
- #
327
- # @option options [Float] :http_read_timeout (60) The default
328
- # number of seconds to wait for response data. This value can
329
- # safely be set per-request on the session.
330
- #
331
- # @option options [Float] :http_idle_timeout (5) The number of
332
- # seconds a connection is allowed to sit idle before it is
333
- # considered stale. Stale connections are closed and removed
334
- # from the pool before making a request.
335
- #
336
- # @option options [Float] :http_continue_timeout (1) The number of
337
- # seconds to wait for a 100-continue response before sending the
338
- # request body. This option has no effect unless the request has
339
- # "Expect" header set to "100-continue". Defaults to `nil` which
340
- # disables this behaviour. This value can safely be set per
341
- # request on the session.
342
- #
343
- # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
344
- # in seconds.
345
- #
346
- # @option options [Boolean] :http_wire_trace (false) When `true`,
347
- # HTTP debug output will be sent to the `:logger`.
362
+ # @option options [Float] :http_continue_timeout (1)
363
+ # The number of seconds to wait for a 100-continue response before sending the
364
+ # request body. This option has no effect unless the request has "Expect"
365
+ # header set to "100-continue". Defaults to `nil` which disables this
366
+ # behaviour. This value can safely be set per request on the session.
367
+ #
368
+ # @option options [Float] :http_idle_timeout (5)
369
+ # The number of seconds a connection is allowed to sit idle before it
370
+ # is considered stale. Stale connections are closed and removed from the
371
+ # pool before making a request.
372
+ #
373
+ # @option options [Float] :http_open_timeout (15)
374
+ # The default number of seconds to wait for response data.
375
+ # This value can safely be set per-request on the session.
376
+ #
377
+ # @option options [URI::HTTP,String] :http_proxy
378
+ # A proxy to send requests through. Formatted like 'http://proxy.com:123'.
379
+ #
380
+ # @option options [Float] :http_read_timeout (60)
381
+ # The default number of seconds to wait for response data.
382
+ # This value can safely be set per-request on the session.
383
+ #
384
+ # @option options [Boolean] :http_wire_trace (false)
385
+ # When `true`, HTTP debug output will be sent to the `:logger`.
386
+ #
387
+ # @option options [Proc] :on_chunk_received
388
+ # When a Proc object is provided, it will be used as callback when each chunk
389
+ # of the response body is received. It provides three arguments: the chunk,
390
+ # the number of bytes received, and the total number of
391
+ # bytes in the response (or nil if the server did not send a `content-length`).
392
+ #
393
+ # @option options [Proc] :on_chunk_sent
394
+ # When a Proc object is provided, it will be used as callback when each chunk
395
+ # of the request body is sent. It provides three arguments: the chunk,
396
+ # the number of bytes read from the body, and the total number of
397
+ # bytes in the body.
398
+ #
399
+ # @option options [Boolean] :raise_response_errors (true)
400
+ # When `true`, response errors are raised.
401
+ #
402
+ # @option options [String] :ssl_ca_bundle
403
+ # Full path to the SSL certificate authority bundle file that should be used when
404
+ # verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
405
+ # `:ssl_ca_directory` the the system default will be used if available.
406
+ #
407
+ # @option options [String] :ssl_ca_directory
408
+ # Full path of the directory that contains the unbundled SSL certificate
409
+ # authority files for verifying peer certificates. If you do
410
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
411
+ # default will be used if available.
348
412
  #
349
- # @option options [Boolean] :ssl_verify_peer (true) When `true`,
350
- # SSL peer certificates are verified when establishing a
351
- # connection.
413
+ # @option options [String] :ssl_ca_store
414
+ # Sets the X509::Store to verify peer certificate.
352
415
  #
353
- # @option options [String] :ssl_ca_bundle Full path to the SSL
354
- # certificate authority bundle file that should be used when
355
- # verifying peer certificates. If you do not pass
356
- # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
357
- # will be used if available.
416
+ # @option options [Float] :ssl_timeout
417
+ # Sets the SSL timeout in seconds
358
418
  #
359
- # @option options [String] :ssl_ca_directory Full path of the
360
- # directory that contains the unbundled SSL certificate
361
- # authority files for verifying peer certificates. If you do
362
- # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
363
- # system default will be used if available.
419
+ # @option options [Boolean] :ssl_verify_peer (true)
420
+ # When `true`, SSL peer certificates are verified when establishing a connection.
364
421
  #
365
422
  def initialize(*args)
366
423
  super
@@ -368,61 +425,69 @@ module Aws::SSOOIDC
368
425
 
369
426
  # @!group API Operations
370
427
 
371
- # Creates and returns an access token for the authorized client. The
372
- # access token issued will be used to fetch short-term credentials for
373
- # the assigned roles in the AWS account.
428
+ # Creates and returns access and refresh tokens for clients that are
429
+ # authenticated using client secrets. The access token can be used to
430
+ # fetch short-term credentials for the assigned AWS accounts or to
431
+ # access application APIs using `bearer` authentication.
374
432
  #
375
433
  # @option params [required, String] :client_id
376
- # The unique identifier string for each client. This value should come
377
- # from the persisted result of the RegisterClient API.
434
+ # The unique identifier string for the client or application. This value
435
+ # comes from the result of the RegisterClient API.
378
436
  #
379
437
  # @option params [required, String] :client_secret
380
438
  # A secret string generated for the client. This value should come from
381
439
  # the persisted result of the RegisterClient API.
382
440
  #
383
441
  # @option params [required, String] :grant_type
384
- # Supports grant types for the authorization code, refresh token, and
385
- # device code request. For device code requests, specify the following
386
- # value:
442
+ # Supports the following OAuth grant types: Device Code and Refresh
443
+ # Token. Specify either of the following values, depending on the grant
444
+ # type that you want:
387
445
  #
388
- # `urn:ietf:params:oauth:grant-type:device_code `
446
+ # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
447
+ #
448
+ # * Refresh Token - `refresh_token`
389
449
  #
390
450
  # For information about how to obtain the device code, see the
391
451
  # StartDeviceAuthorization topic.
392
452
  #
393
453
  # @option params [String] :device_code
394
- # Used only when calling this API for the device code grant type. This
395
- # short-term code is used to identify this authentication attempt. This
396
- # should come from an in-memory reference to the result of the
397
- # StartDeviceAuthorization API.
454
+ # Used only when calling this API for the Device Code grant type. This
455
+ # short-term code is used to identify this authorization request. This
456
+ # comes from the result of the StartDeviceAuthorization API.
398
457
  #
399
458
  # @option params [String] :code
400
- # The authorization code received from the authorization service. This
401
- # parameter is required to perform an authorization grant request to get
402
- # access to a token.
459
+ # Used only when calling this API for the Authorization Code grant type.
460
+ # The short-term code is used to identify this authorization request.
461
+ # This grant type is currently unsupported for the CreateToken API.
403
462
  #
404
463
  # @option params [String] :refresh_token
405
- # Currently, `refreshToken` is not yet implemented and is not supported.
464
+ # Used only when calling this API for the Refresh Token grant type. This
465
+ # token is used to refresh short-term tokens, such as the access token,
466
+ # that might expire.
467
+ #
406
468
  # For more information about the features and limitations of the current
407
469
  # IAM Identity Center OIDC implementation, see *Considerations for Using
408
470
  # this Guide* in the [IAM Identity Center OIDC API Reference][1].
409
471
  #
410
- # The token used to obtain an access token in the event that the access
411
- # token is invalid or expired.
412
- #
413
472
  #
414
473
  #
415
474
  # [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
416
475
  #
417
476
  # @option params [Array<String>] :scope
418
- # The list of scopes that is defined by the client. Upon authorization,
419
- # this list is used to restrict permissions when granting an access
420
- # token.
477
+ # The list of scopes for which authorization is requested. The access
478
+ # token that is issued is limited to the scopes that are granted. If
479
+ # this value is not specified, IAM Identity Center authorizes all scopes
480
+ # that are configured for the client during the call to RegisterClient.
421
481
  #
422
482
  # @option params [String] :redirect_uri
423
- # The location of the application that will receive the authorization
424
- # code. Users authorize the service to send the request to this
425
- # location.
483
+ # Used only when calling this API for the Authorization Code grant type.
484
+ # This value specifies the location of the client or application that
485
+ # has registered to receive the authorization code.
486
+ #
487
+ # @option params [String] :code_verifier
488
+ # Used only when calling this API for the Authorization Code grant type.
489
+ # This value is generated by the client and presented to validate the
490
+ # original code challenge value the client passed at authorization time.
426
491
  #
427
492
  # @return [Types::CreateTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
428
493
  #
@@ -432,6 +497,44 @@ module Aws::SSOOIDC
432
497
  # * {Types::CreateTokenResponse#refresh_token #refresh_token} => String
433
498
  # * {Types::CreateTokenResponse#id_token #id_token} => String
434
499
  #
500
+ #
501
+ # @example Example: Call OAuth/OIDC /token endpoint for Device Code grant with Secret authentication
502
+ #
503
+ # resp = client.create_token({
504
+ # client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
505
+ # client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
506
+ # device_code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
507
+ # grant_type: "urn:ietf:params:oauth:grant-type:device-code",
508
+ # })
509
+ #
510
+ # resp.to_h outputs the following:
511
+ # {
512
+ # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
513
+ # expires_in: 1579729529,
514
+ # refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
515
+ # token_type: "Bearer",
516
+ # }
517
+ #
518
+ # @example Example: Call OAuth/OIDC /token endpoint for Refresh Token grant with Secret authentication
519
+ #
520
+ # resp = client.create_token({
521
+ # client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
522
+ # client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
523
+ # grant_type: "refresh_token",
524
+ # refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
525
+ # scope: [
526
+ # "codewhisperer:completions",
527
+ # ],
528
+ # })
529
+ #
530
+ # resp.to_h outputs the following:
531
+ # {
532
+ # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
533
+ # expires_in: 1579729529,
534
+ # refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
535
+ # token_type: "Bearer",
536
+ # }
537
+ #
435
538
  # @example Request syntax with placeholder values
436
539
  #
437
540
  # resp = client.create_token({
@@ -443,6 +546,7 @@ module Aws::SSOOIDC
443
546
  # refresh_token: "RefreshToken",
444
547
  # scope: ["Scope"],
445
548
  # redirect_uri: "URI",
549
+ # code_verifier: "CodeVerifier",
446
550
  # })
447
551
  #
448
552
  # @example Response structure
@@ -462,6 +566,241 @@ module Aws::SSOOIDC
462
566
  req.send_request(options)
463
567
  end
464
568
 
569
+ # Creates and returns access and refresh tokens for clients and
570
+ # applications that are authenticated using IAM entities. The access
571
+ # token can be used to fetch short-term credentials for the assigned
572
+ # Amazon Web Services accounts or to access application APIs using
573
+ # `bearer` authentication.
574
+ #
575
+ # @option params [required, String] :client_id
576
+ # The unique identifier string for the client or application. This value
577
+ # is an application ARN that has OAuth grants configured.
578
+ #
579
+ # @option params [required, String] :grant_type
580
+ # Supports the following OAuth grant types: Authorization Code, Refresh
581
+ # Token, JWT Bearer, and Token Exchange. Specify one of the following
582
+ # values, depending on the grant type that you want:
583
+ #
584
+ # * Authorization Code - `authorization_code`
585
+ #
586
+ # * Refresh Token - `refresh_token`
587
+ #
588
+ # * JWT Bearer - `urn:ietf:params:oauth:grant-type:jwt-bearer`
589
+ #
590
+ # * Token Exchange - `urn:ietf:params:oauth:grant-type:token-exchange`
591
+ #
592
+ # @option params [String] :code
593
+ # Used only when calling this API for the Authorization Code grant type.
594
+ # This short-term code is used to identify this authorization request.
595
+ # The code is obtained through a redirect from IAM Identity Center to a
596
+ # redirect URI persisted in the Authorization Code GrantOptions for the
597
+ # application.
598
+ #
599
+ # @option params [String] :refresh_token
600
+ # Used only when calling this API for the Refresh Token grant type. This
601
+ # token is used to refresh short-term tokens, such as the access token,
602
+ # that might expire.
603
+ #
604
+ # For more information about the features and limitations of the current
605
+ # IAM Identity Center OIDC implementation, see *Considerations for Using
606
+ # this Guide* in the [IAM Identity Center OIDC API Reference][1].
607
+ #
608
+ #
609
+ #
610
+ # [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html
611
+ #
612
+ # @option params [String] :assertion
613
+ # Used only when calling this API for the JWT Bearer grant type. This
614
+ # value specifies the JSON Web Token (JWT) issued by a trusted token
615
+ # issuer. To authorize a trusted token issuer, configure the JWT Bearer
616
+ # GrantOptions for the application.
617
+ #
618
+ # @option params [Array<String>] :scope
619
+ # The list of scopes for which authorization is requested. The access
620
+ # token that is issued is limited to the scopes that are granted. If the
621
+ # value is not specified, IAM Identity Center authorizes all scopes
622
+ # configured for the application, including the following default
623
+ # scopes: `openid`, `aws`, `sts:identity_context`.
624
+ #
625
+ # @option params [String] :redirect_uri
626
+ # Used only when calling this API for the Authorization Code grant type.
627
+ # This value specifies the location of the client or application that
628
+ # has registered to receive the authorization code.
629
+ #
630
+ # @option params [String] :subject_token
631
+ # Used only when calling this API for the Token Exchange grant type.
632
+ # This value specifies the subject of the exchange. The value of the
633
+ # subject token must be an access token issued by IAM Identity Center to
634
+ # a different client or application. The access token must have
635
+ # authorized scopes that indicate the requested application as a target
636
+ # audience.
637
+ #
638
+ # @option params [String] :subject_token_type
639
+ # Used only when calling this API for the Token Exchange grant type.
640
+ # This value specifies the type of token that is passed as the subject
641
+ # of the exchange. The following value is supported:
642
+ #
643
+ # * Access Token - `urn:ietf:params:oauth:token-type:access_token`
644
+ #
645
+ # @option params [String] :requested_token_type
646
+ # Used only when calling this API for the Token Exchange grant type.
647
+ # This value specifies the type of token that the requester can receive.
648
+ # The following values are supported:
649
+ #
650
+ # * Access Token - `urn:ietf:params:oauth:token-type:access_token`
651
+ #
652
+ # * Refresh Token - `urn:ietf:params:oauth:token-type:refresh_token`
653
+ #
654
+ # @option params [String] :code_verifier
655
+ # Used only when calling this API for the Authorization Code grant type.
656
+ # This value is generated by the client and presented to validate the
657
+ # original code challenge value the client passed at authorization time.
658
+ #
659
+ # @return [Types::CreateTokenWithIAMResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
660
+ #
661
+ # * {Types::CreateTokenWithIAMResponse#access_token #access_token} => String
662
+ # * {Types::CreateTokenWithIAMResponse#token_type #token_type} => String
663
+ # * {Types::CreateTokenWithIAMResponse#expires_in #expires_in} => Integer
664
+ # * {Types::CreateTokenWithIAMResponse#refresh_token #refresh_token} => String
665
+ # * {Types::CreateTokenWithIAMResponse#id_token #id_token} => String
666
+ # * {Types::CreateTokenWithIAMResponse#issued_token_type #issued_token_type} => String
667
+ # * {Types::CreateTokenWithIAMResponse#scope #scope} => Array&lt;String&gt;
668
+ #
669
+ #
670
+ # @example Example: Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication
671
+ #
672
+ # resp = client.create_token_with_iam({
673
+ # client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
674
+ # code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzg0In0EXAMPLEAUTHCODE",
675
+ # grant_type: "authorization_code",
676
+ # redirect_uri: "https://mywebapp.example/redirect",
677
+ # scope: [
678
+ # "openid",
679
+ # "aws",
680
+ # "sts:identity_context",
681
+ # ],
682
+ # })
683
+ #
684
+ # resp.to_h outputs the following:
685
+ # {
686
+ # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
687
+ # expires_in: 1579729529,
688
+ # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
689
+ # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
690
+ # refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
691
+ # scope: [
692
+ # "openid",
693
+ # "aws",
694
+ # "sts:identity_context",
695
+ # ],
696
+ # token_type: "Bearer",
697
+ # }
698
+ #
699
+ # @example Example: Call OAuth/OIDC /token endpoint for Refresh Token grant with IAM authentication
700
+ #
701
+ # resp = client.create_token_with_iam({
702
+ # client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
703
+ # grant_type: "refresh_token",
704
+ # refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
705
+ # })
706
+ #
707
+ # resp.to_h outputs the following:
708
+ # {
709
+ # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
710
+ # expires_in: 1579729529,
711
+ # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
712
+ # refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
713
+ # scope: [
714
+ # "openid",
715
+ # "aws",
716
+ # "sts:identity_context",
717
+ # ],
718
+ # token_type: "Bearer",
719
+ # }
720
+ #
721
+ # @example Example: Call OAuth/OIDC /token endpoint for JWT Bearer grant with IAM authentication
722
+ #
723
+ # resp = client.create_token_with_iam({
724
+ # assertion: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjFMVE16YWtpaGlSbGFfOHoyQkVKVlhlV01xbyJ9.eyJ2ZXIiOiIyLjAiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vOTEyMjA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkL3YyLjAiLCJzdWIiOiJBQUFBQUFBQUFBQUFBQUFBQUFBQUFJa3pxRlZyU2FTYUZIeTc4MmJidGFRIiwiYXVkIjoiNmNiMDQwMTgtYTNmNS00NmE3LWI5OTUtOTQwYzc4ZjVhZWYzIiwiZXhwIjoxNTM2MzYxNDExLCJpYXQiOjE1MzYyNzQ3MTEsIm5iZiI6MTUzNjI3NDcxMSwibmFtZSI6IkFiZSBMaW5jb2xuIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiQWJlTGlAbWljcm9zb2Z0LmNvbSIsIm9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC02NmYzLTMzMzJlY2E3ZWE4MSIsInRpZCI6IjkxMjIwNDBkLTZjNjctNGM1Yi1iMTEyLTM2YTMwNGI2NmRhZCIsIm5vbmNlIjoiMTIzNTIzIiwiYWlvIjoiRGYyVVZYTDFpeCFsTUNXTVNPSkJjRmF0emNHZnZGR2hqS3Y4cTVnMHg3MzJkUjVNQjVCaXN2R1FPN1lXQnlqZDhpUURMcSFlR2JJRGFreXA1bW5PcmNkcUhlWVNubHRlcFFtUnA2QUlaOGpZIn0.1AFWW-Ck5nROwSlltm7GzZvDwUkqvhSQpm55TQsmVo9Y59cLhRXpvB8n-55HCr9Z6G_31_UbeUkoz612I2j_Sm9FFShSDDjoaLQr54CreGIJvjtmS3EkK9a7SJBbcpL1MpUtlfygow39tFjY7EVNW9plWUvRrTgVk7lYLprvfzw-CIqw3gHC-T7IK_m_xkr08INERBtaecwhTeN4chPC4W3jdmw_lIxzC48YoQ0dB1L9-ImX98Egypfrlbm0IBL5spFzL6JDZIRRJOu8vecJvj1mq-IUhGt0MacxX8jdxYLP-KUu2d9MbNKpCKJuZ7p8gwTL5B7NlUdh_dmSviPWrw",
725
+ # client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
726
+ # grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
727
+ # })
728
+ #
729
+ # resp.to_h outputs the following:
730
+ # {
731
+ # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
732
+ # expires_in: 1579729529,
733
+ # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
734
+ # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
735
+ # refresh_token: "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
736
+ # scope: [
737
+ # "openid",
738
+ # "aws",
739
+ # "sts:identity_context",
740
+ # ],
741
+ # token_type: "Bearer",
742
+ # }
743
+ #
744
+ # @example Example: Call OAuth/OIDC /token endpoint for Token Exchange grant with IAM authentication
745
+ #
746
+ # resp = client.create_token_with_iam({
747
+ # client_id: "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
748
+ # grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
749
+ # requested_token_type: "urn:ietf:params:oauth:token-type:access_token",
750
+ # subject_token: "aoak-Hig8TUDPNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZDIFFERENTACCESSTOKEN",
751
+ # subject_token_type: "urn:ietf:params:oauth:token-type:access_token",
752
+ # })
753
+ #
754
+ # resp.to_h outputs the following:
755
+ # {
756
+ # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
757
+ # expires_in: 1579729529,
758
+ # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM",
759
+ # issued_token_type: "urn:ietf:params:oauth:token-type:access_token",
760
+ # scope: [
761
+ # "openid",
762
+ # "aws",
763
+ # "sts:identity_context",
764
+ # ],
765
+ # token_type: "Bearer",
766
+ # }
767
+ #
768
+ # @example Request syntax with placeholder values
769
+ #
770
+ # resp = client.create_token_with_iam({
771
+ # client_id: "ClientId", # required
772
+ # grant_type: "GrantType", # required
773
+ # code: "AuthCode",
774
+ # refresh_token: "RefreshToken",
775
+ # assertion: "Assertion",
776
+ # scope: ["Scope"],
777
+ # redirect_uri: "URI",
778
+ # subject_token: "SubjectToken",
779
+ # subject_token_type: "TokenTypeURI",
780
+ # requested_token_type: "TokenTypeURI",
781
+ # code_verifier: "CodeVerifier",
782
+ # })
783
+ #
784
+ # @example Response structure
785
+ #
786
+ # resp.access_token #=> String
787
+ # resp.token_type #=> String
788
+ # resp.expires_in #=> Integer
789
+ # resp.refresh_token #=> String
790
+ # resp.id_token #=> String
791
+ # resp.issued_token_type #=> String
792
+ # resp.scope #=> Array
793
+ # resp.scope[0] #=> String
794
+ #
795
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM AWS API Documentation
796
+ #
797
+ # @overload create_token_with_iam(params = {})
798
+ # @param [Hash] params ({})
799
+ def create_token_with_iam(params = {}, options = {})
800
+ req = build_request(:create_token_with_iam, params)
801
+ req.send_request(options)
802
+ end
803
+
465
804
  # Registers a client with IAM Identity Center. This allows clients to
466
805
  # initiate device authorization. The output should be persisted for
467
806
  # reuse through many authentication requests.
@@ -478,6 +817,28 @@ module Aws::SSOOIDC
478
817
  # this list is used to restrict permissions when granting an access
479
818
  # token.
480
819
  #
820
+ # @option params [Array<String>] :redirect_uris
821
+ # The list of redirect URI that are defined by the client. At completion
822
+ # of authorization, this list is used to restrict what locations the
823
+ # user agent can be redirected back to.
824
+ #
825
+ # @option params [Array<String>] :grant_types
826
+ # The list of OAuth 2.0 grant types that are defined by the client. This
827
+ # list is used to restrict the token granting flows available to the
828
+ # client.
829
+ #
830
+ # @option params [String] :issuer_url
831
+ # The IAM Identity Center Issuer URL associated with an instance of IAM
832
+ # Identity Center. This value is needed for user access to resources
833
+ # through the client.
834
+ #
835
+ # @option params [String] :entitled_application_arn
836
+ # This IAM Identity Center application ARN is used to define
837
+ # administrator-managed configuration for public client access to
838
+ # resources. At authorization, the scopes, grants, and redirect URI
839
+ # available to this client will be restricted by this application
840
+ # resource.
841
+ #
481
842
  # @return [Types::RegisterClientResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
482
843
  #
483
844
  # * {Types::RegisterClientResponse#client_id #client_id} => String
@@ -487,12 +848,45 @@ module Aws::SSOOIDC
487
848
  # * {Types::RegisterClientResponse#authorization_endpoint #authorization_endpoint} => String
488
849
  # * {Types::RegisterClientResponse#token_endpoint #token_endpoint} => String
489
850
  #
851
+ #
852
+ # @example Example: Call OAuth/OIDC /register-client endpoint
853
+ #
854
+ # resp = client.register_client({
855
+ # client_name: "My IDE Plugin",
856
+ # client_type: "public",
857
+ # entitled_application_arn: "arn:aws:sso::ACCOUNTID:application/ssoins-1111111111111111/apl-1111111111111111",
858
+ # grant_types: [
859
+ # "authorization_code",
860
+ # "refresh_token",
861
+ # ],
862
+ # issuer_url: "https://identitycenter.amazonaws.com/ssoins-1111111111111111",
863
+ # redirect_uris: [
864
+ # "127.0.0.1:PORT/oauth/callback",
865
+ # ],
866
+ # scopes: [
867
+ # "sso:account:access",
868
+ # "codewhisperer:completions",
869
+ # ],
870
+ # })
871
+ #
872
+ # resp.to_h outputs the following:
873
+ # {
874
+ # client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
875
+ # client_id_issued_at: 1579725929,
876
+ # client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
877
+ # client_secret_expires_at: 1587584729,
878
+ # }
879
+ #
490
880
  # @example Request syntax with placeholder values
491
881
  #
492
882
  # resp = client.register_client({
493
883
  # client_name: "ClientName", # required
494
884
  # client_type: "ClientType", # required
495
885
  # scopes: ["Scope"],
886
+ # redirect_uris: ["URI"],
887
+ # grant_types: ["GrantType"],
888
+ # issuer_url: "URI",
889
+ # entitled_application_arn: "ArnType",
496
890
  # })
497
891
  #
498
892
  # @example Response structure
@@ -526,8 +920,9 @@ module Aws::SSOOIDC
526
920
  # come from the persisted result of the RegisterClient API operation.
527
921
  #
528
922
  # @option params [required, String] :start_url
529
- # The URL for the AWS access portal. For more information, see [Using
530
- # the AWS access portal][1] in the *IAM Identity Center User Guide*.
923
+ # The URL for the Amazon Web Services access portal. For more
924
+ # information, see [Using the Amazon Web Services access portal][1] in
925
+ # the *IAM Identity Center User Guide*.
531
926
  #
532
927
  #
533
928
  #
@@ -542,6 +937,25 @@ module Aws::SSOOIDC
542
937
  # * {Types::StartDeviceAuthorizationResponse#expires_in #expires_in} => Integer
543
938
  # * {Types::StartDeviceAuthorizationResponse#interval #interval} => Integer
544
939
  #
940
+ #
941
+ # @example Example: Call OAuth/OIDC /start-device-authorization endpoint
942
+ #
943
+ # resp = client.start_device_authorization({
944
+ # client_id: "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
945
+ # client_secret: "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
946
+ # start_url: "https://identitycenter.amazonaws.com/ssoins-111111111111",
947
+ # })
948
+ #
949
+ # resp.to_h outputs the following:
950
+ # {
951
+ # device_code: "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
952
+ # expires_in: 1579729529,
953
+ # interval: 1,
954
+ # user_code: "makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
955
+ # verification_uri: "https://device.sso.us-west-2.amazonaws.com",
956
+ # verification_uri_complete: "https://device.sso.us-west-2.amazonaws.com?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
957
+ # }
958
+ #
545
959
  # @example Request syntax with placeholder values
546
960
  #
547
961
  # resp = client.start_device_authorization({
@@ -581,7 +995,7 @@ module Aws::SSOOIDC
581
995
  params: params,
582
996
  config: config)
583
997
  context[:gem_name] = 'aws-sdk-core'
584
- context[:gem_version] = '3.165.0'
998
+ context[:gem_version] = '3.201.0'
585
999
  Seahorse::Client::Request.new(handlers, context)
586
1000
  end
587
1001