aws-sdk-core 3.122.0 → 3.180.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +505 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +153 -0
- data/lib/aws-defaults/defaults_mode_config_resolver.rb +107 -0
- data/lib/aws-defaults.rb +3 -0
- data/lib/aws-sdk-core/arn.rb +13 -0
- data/lib/aws-sdk-core/assume_role_credentials.rb +21 -7
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +14 -10
- data/lib/aws-sdk-core/binary/encode_handler.rb +12 -1
- data/lib/aws-sdk-core/client_stubs.rb +5 -1
- data/lib/aws-sdk-core/credential_provider.rb +3 -0
- data/lib/aws-sdk-core/credential_provider_chain.rb +8 -5
- data/lib/aws-sdk-core/ec2_metadata.rb +3 -2
- data/lib/aws-sdk-core/ecs_credentials.rb +121 -53
- data/lib/aws-sdk-core/endpoints/condition.rb +41 -0
- data/lib/aws-sdk-core/endpoints/endpoint.rb +17 -0
- data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +75 -0
- data/lib/aws-sdk-core/endpoints/error_rule.rb +42 -0
- data/lib/aws-sdk-core/endpoints/function.rb +80 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +127 -0
- data/lib/aws-sdk-core/endpoints/reference.rb +31 -0
- data/lib/aws-sdk-core/endpoints/rule.rb +25 -0
- data/lib/aws-sdk-core/endpoints/rule_set.rb +52 -0
- data/lib/aws-sdk-core/endpoints/rules_provider.rb +37 -0
- data/lib/aws-sdk-core/endpoints/templater.rb +58 -0
- data/lib/aws-sdk-core/endpoints/tree_rule.rb +45 -0
- data/lib/aws-sdk-core/endpoints/url.rb +60 -0
- data/lib/aws-sdk-core/endpoints.rb +78 -0
- data/lib/aws-sdk-core/errors.rb +14 -1
- data/lib/aws-sdk-core/ini_parser.rb +1 -1
- data/lib/aws-sdk-core/instance_profile_credentials.rb +85 -14
- data/lib/aws-sdk-core/json/error_handler.rb +20 -1
- data/lib/aws-sdk-core/log/formatter.rb +6 -0
- data/lib/aws-sdk-core/pageable_response.rb +81 -32
- data/lib/aws-sdk-core/plugins/bearer_authorization.rb +67 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +340 -0
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +27 -1
- data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
- data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +6 -2
- data/lib/aws-sdk-core/plugins/http_checksum.rb +8 -1
- data/lib/aws-sdk-core/plugins/jsonvalue_converter.rb +34 -6
- data/lib/aws-sdk-core/plugins/recursion_detection.rb +38 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +111 -30
- data/lib/aws-sdk-core/plugins/request_compression.rb +217 -0
- data/lib/aws-sdk-core/plugins/response_paging.rb +1 -1
- data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +7 -4
- data/lib/aws-sdk-core/plugins/retry_errors.rb +21 -5
- data/lib/aws-sdk-core/plugins/sign.rb +201 -0
- data/lib/aws-sdk-core/plugins/signature_v2.rb +1 -0
- data/lib/aws-sdk-core/plugins/signature_v4.rb +15 -8
- data/lib/aws-sdk-core/plugins/stub_responses.rb +5 -1
- data/lib/aws-sdk-core/plugins/user_agent.rb +117 -14
- data/lib/aws-sdk-core/process_credentials.rb +9 -11
- data/lib/aws-sdk-core/refreshing_credentials.rb +41 -16
- data/lib/aws-sdk-core/refreshing_token.rb +71 -0
- data/lib/aws-sdk-core/rest/handler.rb +1 -1
- data/lib/aws-sdk-core/rest/request/headers.rb +14 -6
- data/lib/aws-sdk-core/rest/response/headers.rb +2 -0
- data/lib/aws-sdk-core/shared_config.rb +103 -12
- data/lib/aws-sdk-core/sso_credentials.rb +91 -50
- data/lib/aws-sdk-core/sso_token_provider.rb +135 -0
- data/lib/aws-sdk-core/static_token_provider.rb +14 -0
- data/lib/aws-sdk-core/structure.rb +6 -4
- data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
- data/lib/aws-sdk-core/token.rb +31 -0
- data/lib/aws-sdk-core/token_provider.rb +15 -0
- data/lib/aws-sdk-core/token_provider_chain.rb +51 -0
- data/lib/aws-sdk-core/waiters/poller.rb +3 -1
- data/lib/aws-sdk-core/xml/error_handler.rb +7 -0
- data/lib/aws-sdk-core/xml/parser/engines/oga.rb +2 -0
- data/lib/aws-sdk-core/xml/parser/engines/ox.rb +1 -1
- data/lib/aws-sdk-core.rb +17 -0
- data/lib/aws-sdk-sso/client.rb +88 -13
- data/lib/aws-sdk-sso/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-sso/endpoint_provider.rb +51 -0
- data/lib/aws-sdk-sso/endpoints.rb +72 -0
- data/lib/aws-sdk-sso/plugins/endpoints.rb +76 -0
- data/lib/aws-sdk-sso/types.rb +8 -43
- data/lib/aws-sdk-sso.rb +5 -1
- data/lib/aws-sdk-ssooidc/client.rb +626 -0
- data/lib/aws-sdk-ssooidc/client_api.rb +216 -0
- data/lib/aws-sdk-ssooidc/customizations.rb +1 -0
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +51 -0
- data/lib/aws-sdk-ssooidc/endpoints.rb +58 -0
- data/lib/aws-sdk-ssooidc/errors.rb +290 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +74 -0
- data/lib/aws-sdk-ssooidc/resource.rb +26 -0
- data/lib/aws-sdk-ssooidc/types.rb +502 -0
- data/lib/aws-sdk-ssooidc.rb +59 -0
- data/lib/aws-sdk-sts/client.rb +394 -362
- data/lib/aws-sdk-sts/client_api.rb +10 -0
- data/lib/aws-sdk-sts/endpoint_parameters.rb +78 -0
- data/lib/aws-sdk-sts/endpoint_provider.rb +112 -0
- data/lib/aws-sdk-sts/endpoints.rb +136 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +84 -0
- data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +5 -1
- data/lib/aws-sdk-sts/presigner.rb +13 -15
- data/lib/aws-sdk-sts/types.rb +154 -227
- data/lib/aws-sdk-sts.rb +5 -1
- data/lib/seahorse/client/async_base.rb +0 -1
- data/lib/seahorse/client/configuration.rb +1 -5
- data/lib/seahorse/client/h2/connection.rb +12 -11
- data/lib/seahorse/client/net_http/connection_pool.rb +7 -0
- data/lib/seahorse/client/plugins/net_http.rb +33 -2
- data/lib/seahorse/client/plugins/request_callback.rb +9 -9
- data/lib/seahorse/client/response.rb +6 -0
- data/lib/seahorse/model/operation.rb +6 -0
- data/lib/seahorse/util.rb +4 -0
- metadata +62 -8
data/lib/aws-sdk-sso/client.rb
CHANGED
@@ -27,7 +27,11 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
27
27
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
28
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
|
-
require 'aws-sdk-core/plugins/
|
30
|
+
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
|
+
require 'aws-sdk-core/plugins/request_compression.rb'
|
32
|
+
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
33
|
+
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
34
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
31
35
|
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
32
36
|
|
33
37
|
Aws::Plugins::GlobalConfiguration.add_identifier(:sso)
|
@@ -73,8 +77,13 @@ module Aws::SSO
|
|
73
77
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
74
78
|
add_plugin(Aws::Plugins::TransferEncoding)
|
75
79
|
add_plugin(Aws::Plugins::HttpChecksum)
|
76
|
-
add_plugin(Aws::Plugins::
|
80
|
+
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
81
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
82
|
+
add_plugin(Aws::Plugins::DefaultsMode)
|
83
|
+
add_plugin(Aws::Plugins::RecursionDetection)
|
84
|
+
add_plugin(Aws::Plugins::Sign)
|
77
85
|
add_plugin(Aws::Plugins::Protocols::RestJson)
|
86
|
+
add_plugin(Aws::SSO::Plugins::Endpoints)
|
78
87
|
|
79
88
|
# @overload initialize(options)
|
80
89
|
# @param [Hash] options
|
@@ -119,7 +128,9 @@ module Aws::SSO
|
|
119
128
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
120
129
|
# are very aggressive. Construct and pass an instance of
|
121
130
|
# `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
|
122
|
-
# enable retries and extended timeouts.
|
131
|
+
# enable retries and extended timeouts. Instance profile credential
|
132
|
+
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
133
|
+
# to true.
|
123
134
|
#
|
124
135
|
# @option options [required, String] :region
|
125
136
|
# The AWS region to connect to. The configured `:region` is
|
@@ -173,10 +184,18 @@ module Aws::SSO
|
|
173
184
|
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
174
185
|
# a clock skew correction and retry requests with skewed client clocks.
|
175
186
|
#
|
187
|
+
# @option options [String] :defaults_mode ("legacy")
|
188
|
+
# See {Aws::DefaultsModeConfiguration} for a list of the
|
189
|
+
# accepted modes and the configuration defaults that are included.
|
190
|
+
#
|
176
191
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
177
192
|
# Set to true to disable SDK automatically adding host prefix
|
178
193
|
# to default service endpoint when available.
|
179
194
|
#
|
195
|
+
# @option options [Boolean] :disable_request_compression (false)
|
196
|
+
# When set to 'true' the request body will not be compressed
|
197
|
+
# for supported operations.
|
198
|
+
#
|
180
199
|
# @option options [String] :endpoint
|
181
200
|
# The client endpoint is normally constructed from the `:region`
|
182
201
|
# option. You should only configure an `:endpoint` when connecting
|
@@ -197,6 +216,10 @@ module Aws::SSO
|
|
197
216
|
# @option options [Boolean] :endpoint_discovery (false)
|
198
217
|
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
199
218
|
#
|
219
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
220
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
221
|
+
# variables and the shared configuration file.
|
222
|
+
#
|
200
223
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
201
224
|
# The log formatter.
|
202
225
|
#
|
@@ -217,6 +240,11 @@ module Aws::SSO
|
|
217
240
|
# Used when loading credentials from the shared credentials file
|
218
241
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
219
242
|
#
|
243
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
244
|
+
# The minimum size in bytes that triggers compression for request
|
245
|
+
# bodies. The value must be non-negative integer value between 0
|
246
|
+
# and 10485780 bytes inclusive.
|
247
|
+
#
|
220
248
|
# @option options [Proc] :retry_backoff
|
221
249
|
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
222
250
|
# This option is only used in the `legacy` retry mode.
|
@@ -262,6 +290,11 @@ module Aws::SSO
|
|
262
290
|
# in the future.
|
263
291
|
#
|
264
292
|
#
|
293
|
+
# @option options [String] :sdk_ua_app_id
|
294
|
+
# A unique and opaque application ID that is appended to the
|
295
|
+
# User-Agent header as app/<sdk_ua_app_id>. It should have a
|
296
|
+
# maximum length of 50.
|
297
|
+
#
|
265
298
|
# @option options [String] :secret_access_key
|
266
299
|
#
|
267
300
|
# @option options [String] :session_token
|
@@ -275,6 +308,19 @@ module Aws::SSO
|
|
275
308
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
276
309
|
# requests are made, and retries are disabled.
|
277
310
|
#
|
311
|
+
# @option options [Aws::TokenProvider] :token_provider
|
312
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
313
|
+
# following classes:
|
314
|
+
#
|
315
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
316
|
+
# tokens.
|
317
|
+
#
|
318
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
319
|
+
# access token generated from `aws login`.
|
320
|
+
#
|
321
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
322
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
323
|
+
#
|
278
324
|
# @option options [Boolean] :use_dualstack_endpoint
|
279
325
|
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
280
326
|
# will be used if available.
|
@@ -288,6 +334,9 @@ module Aws::SSO
|
|
288
334
|
# When `true`, request parameters are validated before
|
289
335
|
# sending the request.
|
290
336
|
#
|
337
|
+
# @option options [Aws::SSO::EndpointProvider] :endpoint_provider
|
338
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SSO::EndpointParameters`
|
339
|
+
#
|
291
340
|
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
292
341
|
# requests through. Formatted like 'http://proxy.com:123'.
|
293
342
|
#
|
@@ -295,7 +344,7 @@ module Aws::SSO
|
|
295
344
|
# seconds to wait when opening a HTTP session before raising a
|
296
345
|
# `Timeout::Error`.
|
297
346
|
#
|
298
|
-
# @option options [
|
347
|
+
# @option options [Float] :http_read_timeout (60) The default
|
299
348
|
# number of seconds to wait for response data. This value can
|
300
349
|
# safely be set per-request on the session.
|
301
350
|
#
|
@@ -311,6 +360,9 @@ module Aws::SSO
|
|
311
360
|
# disables this behaviour. This value can safely be set per
|
312
361
|
# request on the session.
|
313
362
|
#
|
363
|
+
# @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
|
364
|
+
# in seconds.
|
365
|
+
#
|
314
366
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
315
367
|
# HTTP debug output will be sent to the `:logger`.
|
316
368
|
#
|
@@ -347,7 +399,8 @@ module Aws::SSO
|
|
347
399
|
#
|
348
400
|
# @option params [required, String] :access_token
|
349
401
|
# The token issued by the `CreateToken` API call. For more information,
|
350
|
-
# see [CreateToken][1] in the *
|
402
|
+
# see [CreateToken][1] in the *IAM Identity Center OIDC API Reference
|
403
|
+
# Guide*.
|
351
404
|
#
|
352
405
|
#
|
353
406
|
#
|
@@ -392,7 +445,8 @@ module Aws::SSO
|
|
392
445
|
#
|
393
446
|
# @option params [required, String] :access_token
|
394
447
|
# The token issued by the `CreateToken` API call. For more information,
|
395
|
-
# see [CreateToken][1] in the *
|
448
|
+
# see [CreateToken][1] in the *IAM Identity Center OIDC API Reference
|
449
|
+
# Guide*.
|
396
450
|
#
|
397
451
|
#
|
398
452
|
#
|
@@ -435,8 +489,8 @@ module Aws::SSO
|
|
435
489
|
|
436
490
|
# Lists all AWS accounts assigned to the user. These AWS accounts are
|
437
491
|
# assigned by the administrator of the account. For more information,
|
438
|
-
# see [Assign User Access][1] in the *
|
439
|
-
# operation returns a paginated response.
|
492
|
+
# see [Assign User Access][1] in the *IAM Identity Center User Guide*.
|
493
|
+
# This operation returns a paginated response.
|
440
494
|
#
|
441
495
|
#
|
442
496
|
#
|
@@ -451,7 +505,8 @@ module Aws::SSO
|
|
451
505
|
#
|
452
506
|
# @option params [required, String] :access_token
|
453
507
|
# The token issued by the `CreateToken` API call. For more information,
|
454
|
-
# see [CreateToken][1] in the *
|
508
|
+
# see [CreateToken][1] in the *IAM Identity Center OIDC API Reference
|
509
|
+
# Guide*.
|
455
510
|
#
|
456
511
|
#
|
457
512
|
#
|
@@ -489,12 +544,32 @@ module Aws::SSO
|
|
489
544
|
req.send_request(options)
|
490
545
|
end
|
491
546
|
|
492
|
-
# Removes the
|
493
|
-
# the
|
547
|
+
# Removes the locally stored SSO tokens from the client-side cache and
|
548
|
+
# sends an API call to the IAM Identity Center service to invalidate the
|
549
|
+
# corresponding server-side IAM Identity Center sign in session.
|
550
|
+
#
|
551
|
+
# <note markdown="1"> If a user uses IAM Identity Center to access the AWS CLI, the user’s
|
552
|
+
# IAM Identity Center sign in session is used to obtain an IAM session,
|
553
|
+
# as specified in the corresponding IAM Identity Center permission set.
|
554
|
+
# More specifically, IAM Identity Center assumes an IAM role in the
|
555
|
+
# target account on behalf of the user, and the corresponding temporary
|
556
|
+
# AWS credentials are returned to the client.
|
557
|
+
#
|
558
|
+
# After user logout, any existing IAM role sessions that were created by
|
559
|
+
# using IAM Identity Center permission sets continue based on the
|
560
|
+
# duration configured in the permission set. For more information, see
|
561
|
+
# [User authentications][1] in the *IAM Identity Center User Guide*.
|
562
|
+
#
|
563
|
+
# </note>
|
564
|
+
#
|
565
|
+
#
|
566
|
+
#
|
567
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html
|
494
568
|
#
|
495
569
|
# @option params [required, String] :access_token
|
496
570
|
# The token issued by the `CreateToken` API call. For more information,
|
497
|
-
# see [CreateToken][1] in the *
|
571
|
+
# see [CreateToken][1] in the *IAM Identity Center OIDC API Reference
|
572
|
+
# Guide*.
|
498
573
|
#
|
499
574
|
#
|
500
575
|
#
|
@@ -530,7 +605,7 @@ module Aws::SSO
|
|
530
605
|
params: params,
|
531
606
|
config: config)
|
532
607
|
context[:gem_name] = 'aws-sdk-core'
|
533
|
-
context[:gem_version] = '3.
|
608
|
+
context[:gem_version] = '3.180.1'
|
534
609
|
Seahorse::Client::Request.new(handlers, context)
|
535
610
|
end
|
536
611
|
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::SSO
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute region
|
14
|
+
# The AWS region used to dispatch the request.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
EndpointParameters = Struct.new(
|
34
|
+
:region,
|
35
|
+
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'Region' => :region,
|
45
|
+
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:region] = options[:region]
|
53
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
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
|
+
self[:use_fips] = options[:use_fips]
|
59
|
+
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
|
+
self[:endpoint] = options[:endpoint]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::SSO
|
11
|
+
class EndpointProvider
|
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 (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
18
|
+
if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
|
19
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
20
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
21
|
+
end
|
22
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
23
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
24
|
+
end
|
25
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
26
|
+
end
|
27
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
28
|
+
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"))
|
29
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
30
|
+
end
|
31
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
32
|
+
end
|
33
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
35
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
36
|
+
end
|
37
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
38
|
+
end
|
39
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
40
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
41
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
42
|
+
end
|
43
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
44
|
+
end
|
45
|
+
return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
46
|
+
end
|
47
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::SSO
|
12
|
+
# @api private
|
13
|
+
module Endpoints
|
14
|
+
|
15
|
+
class GetRoleCredentials
|
16
|
+
def self.build(context)
|
17
|
+
unless context.config.regional_endpoint
|
18
|
+
endpoint = context.config.endpoint.to_s
|
19
|
+
end
|
20
|
+
Aws::SSO::EndpointParameters.new(
|
21
|
+
region: context.config.region,
|
22
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
23
|
+
use_fips: context.config.use_fips_endpoint,
|
24
|
+
endpoint: endpoint,
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class ListAccountRoles
|
30
|
+
def self.build(context)
|
31
|
+
unless context.config.regional_endpoint
|
32
|
+
endpoint = context.config.endpoint.to_s
|
33
|
+
end
|
34
|
+
Aws::SSO::EndpointParameters.new(
|
35
|
+
region: context.config.region,
|
36
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
37
|
+
use_fips: context.config.use_fips_endpoint,
|
38
|
+
endpoint: endpoint,
|
39
|
+
)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
class ListAccounts
|
44
|
+
def self.build(context)
|
45
|
+
unless context.config.regional_endpoint
|
46
|
+
endpoint = context.config.endpoint.to_s
|
47
|
+
end
|
48
|
+
Aws::SSO::EndpointParameters.new(
|
49
|
+
region: context.config.region,
|
50
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
51
|
+
use_fips: context.config.use_fips_endpoint,
|
52
|
+
endpoint: endpoint,
|
53
|
+
)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class Logout
|
58
|
+
def self.build(context)
|
59
|
+
unless context.config.regional_endpoint
|
60
|
+
endpoint = context.config.endpoint.to_s
|
61
|
+
end
|
62
|
+
Aws::SSO::EndpointParameters.new(
|
63
|
+
region: context.config.region,
|
64
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
65
|
+
use_fips: context.config.use_fips_endpoint,
|
66
|
+
endpoint: endpoint,
|
67
|
+
)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::SSO
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::SSO::EndpointProvider',
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
|
+
'where `parameters` is a Struct similar to '\
|
20
|
+
'`Aws::SSO::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::SSO::EndpointProvider.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
class Handler < Seahorse::Client::Handler
|
27
|
+
def call(context)
|
28
|
+
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
|
+
unless context[:discovered_endpoint]
|
30
|
+
params = parameters_for_operation(context)
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
|
+
|
33
|
+
context.http_request.endpoint = endpoint.url
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
end
|
36
|
+
|
37
|
+
context[:endpoint_params] = params
|
38
|
+
context[:auth_scheme] =
|
39
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
|
+
|
41
|
+
@handler.call(context)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def apply_endpoint_headers(context, headers)
|
47
|
+
headers.each do |key, values|
|
48
|
+
value = values
|
49
|
+
.compact
|
50
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
51
|
+
.join(',')
|
52
|
+
|
53
|
+
context.http_request.headers[key] = value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def parameters_for_operation(context)
|
58
|
+
case context.operation_name
|
59
|
+
when :get_role_credentials
|
60
|
+
Aws::SSO::Endpoints::GetRoleCredentials.build(context)
|
61
|
+
when :list_account_roles
|
62
|
+
Aws::SSO::Endpoints::ListAccountRoles.build(context)
|
63
|
+
when :list_accounts
|
64
|
+
Aws::SSO::Endpoints::ListAccounts.build(context)
|
65
|
+
when :logout
|
66
|
+
Aws::SSO::Endpoints::Logout.build(context)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def add_handlers(handlers, _config)
|
72
|
+
handlers.add(Handler, step: :build, priority: 75)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
data/lib/aws-sdk-sso/types.rb
CHANGED
@@ -34,15 +34,6 @@ module Aws::SSO
|
|
34
34
|
include Aws::Structure
|
35
35
|
end
|
36
36
|
|
37
|
-
# @note When making an API call, you may pass GetRoleCredentialsRequest
|
38
|
-
# data as a hash:
|
39
|
-
#
|
40
|
-
# {
|
41
|
-
# role_name: "RoleNameType", # required
|
42
|
-
# account_id: "AccountIdType", # required
|
43
|
-
# access_token: "AccessTokenType", # required
|
44
|
-
# }
|
45
|
-
#
|
46
37
|
# @!attribute [rw] role_name
|
47
38
|
# The friendly name of the role that is assigned to the user.
|
48
39
|
# @return [String]
|
@@ -53,8 +44,8 @@ module Aws::SSO
|
|
53
44
|
#
|
54
45
|
# @!attribute [rw] access_token
|
55
46
|
# The token issued by the `CreateToken` API call. For more
|
56
|
-
# information, see [CreateToken][1] in the *
|
57
|
-
# Guide*.
|
47
|
+
# information, see [CreateToken][1] in the *IAM Identity Center OIDC
|
48
|
+
# API Reference Guide*.
|
58
49
|
#
|
59
50
|
#
|
60
51
|
#
|
@@ -97,16 +88,6 @@ module Aws::SSO
|
|
97
88
|
include Aws::Structure
|
98
89
|
end
|
99
90
|
|
100
|
-
# @note When making an API call, you may pass ListAccountRolesRequest
|
101
|
-
# data as a hash:
|
102
|
-
#
|
103
|
-
# {
|
104
|
-
# next_token: "NextTokenType",
|
105
|
-
# max_results: 1,
|
106
|
-
# access_token: "AccessTokenType", # required
|
107
|
-
# account_id: "AccountIdType", # required
|
108
|
-
# }
|
109
|
-
#
|
110
91
|
# @!attribute [rw] next_token
|
111
92
|
# The page token from the previous response output when you request
|
112
93
|
# subsequent pages.
|
@@ -118,8 +99,8 @@ module Aws::SSO
|
|
118
99
|
#
|
119
100
|
# @!attribute [rw] access_token
|
120
101
|
# The token issued by the `CreateToken` API call. For more
|
121
|
-
# information, see [CreateToken][1] in the *
|
122
|
-
# Guide*.
|
102
|
+
# information, see [CreateToken][1] in the *IAM Identity Center OIDC
|
103
|
+
# API Reference Guide*.
|
123
104
|
#
|
124
105
|
#
|
125
106
|
#
|
@@ -159,15 +140,6 @@ module Aws::SSO
|
|
159
140
|
include Aws::Structure
|
160
141
|
end
|
161
142
|
|
162
|
-
# @note When making an API call, you may pass ListAccountsRequest
|
163
|
-
# data as a hash:
|
164
|
-
#
|
165
|
-
# {
|
166
|
-
# next_token: "NextTokenType",
|
167
|
-
# max_results: 1,
|
168
|
-
# access_token: "AccessTokenType", # required
|
169
|
-
# }
|
170
|
-
#
|
171
143
|
# @!attribute [rw] next_token
|
172
144
|
# (Optional) When requesting subsequent pages, this is the page token
|
173
145
|
# from the previous response output.
|
@@ -179,8 +151,8 @@ module Aws::SSO
|
|
179
151
|
#
|
180
152
|
# @!attribute [rw] access_token
|
181
153
|
# The token issued by the `CreateToken` API call. For more
|
182
|
-
# information, see [CreateToken][1] in the *
|
183
|
-
# Guide*.
|
154
|
+
# information, see [CreateToken][1] in the *IAM Identity Center OIDC
|
155
|
+
# API Reference Guide*.
|
184
156
|
#
|
185
157
|
#
|
186
158
|
#
|
@@ -215,17 +187,10 @@ module Aws::SSO
|
|
215
187
|
include Aws::Structure
|
216
188
|
end
|
217
189
|
|
218
|
-
# @note When making an API call, you may pass LogoutRequest
|
219
|
-
# data as a hash:
|
220
|
-
#
|
221
|
-
# {
|
222
|
-
# access_token: "AccessTokenType", # required
|
223
|
-
# }
|
224
|
-
#
|
225
190
|
# @!attribute [rw] access_token
|
226
191
|
# The token issued by the `CreateToken` API call. For more
|
227
|
-
# information, see [CreateToken][1] in the *
|
228
|
-
# Guide*.
|
192
|
+
# information, see [CreateToken][1] in the *IAM Identity Center OIDC
|
193
|
+
# API Reference Guide*.
|
229
194
|
#
|
230
195
|
#
|
231
196
|
#
|
data/lib/aws-sdk-sso.rb
CHANGED
@@ -15,9 +15,13 @@ end
|
|
15
15
|
|
16
16
|
require_relative 'aws-sdk-sso/types'
|
17
17
|
require_relative 'aws-sdk-sso/client_api'
|
18
|
+
require_relative 'aws-sdk-sso/plugins/endpoints.rb'
|
18
19
|
require_relative 'aws-sdk-sso/client'
|
19
20
|
require_relative 'aws-sdk-sso/errors'
|
20
21
|
require_relative 'aws-sdk-sso/resource'
|
22
|
+
require_relative 'aws-sdk-sso/endpoint_parameters'
|
23
|
+
require_relative 'aws-sdk-sso/endpoint_provider'
|
24
|
+
require_relative 'aws-sdk-sso/endpoints'
|
21
25
|
require_relative 'aws-sdk-sso/customizations'
|
22
26
|
|
23
27
|
# This module provides support for AWS Single Sign-On. This module is available in the
|
@@ -50,6 +54,6 @@ require_relative 'aws-sdk-sso/customizations'
|
|
50
54
|
# @!group service
|
51
55
|
module Aws::SSO
|
52
56
|
|
53
|
-
GEM_VERSION = '3.
|
57
|
+
GEM_VERSION = '3.180.1'
|
54
58
|
|
55
59
|
end
|