aws-sdk-core 3.202.2 → 3.209.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 +81 -0
- data/VERSION +1 -1
- data/lib/aws-defaults.rb +4 -1
- data/lib/aws-sdk-core/assume_role_credentials.rb +12 -5
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +13 -7
- data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
- data/lib/aws-sdk-core/credential_provider_chain.rb +9 -2
- data/lib/aws-sdk-core/credentials.rb +13 -6
- data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
- data/lib/aws-sdk-core/endpoints.rb +6 -3
- data/lib/aws-sdk-core/log.rb +10 -0
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +7 -3
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +1 -0
- data/lib/aws-sdk-core/plugins/stub_responses.rb +29 -2
- data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
- data/lib/aws-sdk-core/plugins/user_agent.rb +17 -8
- data/lib/aws-sdk-core/plugins.rb +39 -0
- data/lib/aws-sdk-core/process_credentials.rb +2 -1
- data/lib/aws-sdk-core/resources.rb +8 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +5 -1
- data/lib/aws-sdk-core/shared_config.rb +3 -1
- data/lib/aws-sdk-core/shared_credentials.rb +0 -7
- data/lib/aws-sdk-core/sso_credentials.rb +2 -1
- data/lib/aws-sdk-core/stubbing.rb +22 -0
- data/lib/aws-sdk-core/telemetry/base.rb +177 -0
- data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
- data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
- data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
- data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
- data/lib/aws-sdk-core/telemetry.rb +78 -0
- data/lib/aws-sdk-core.rb +82 -112
- data/lib/aws-sdk-sso/client.rb +35 -8
- data/lib/aws-sdk-sso/client_api.rb +1 -0
- data/lib/aws-sdk-sso/endpoints.rb +4 -16
- data/lib/aws-sdk-sso/plugins/endpoints.rb +18 -6
- data/lib/aws-sdk-sso/types.rb +1 -0
- data/lib/aws-sdk-sso.rb +15 -11
- data/lib/aws-sdk-ssooidc/client.rb +35 -8
- data/lib/aws-sdk-ssooidc/client_api.rb +1 -0
- data/lib/aws-sdk-ssooidc/endpoints.rb +4 -16
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +18 -6
- data/lib/aws-sdk-ssooidc/types.rb +1 -0
- data/lib/aws-sdk-ssooidc.rb +15 -11
- data/lib/aws-sdk-sts/client.rb +35 -8
- data/lib/aws-sdk-sts/client_api.rb +1 -0
- data/lib/aws-sdk-sts/customizations.rb +5 -1
- data/lib/aws-sdk-sts/endpoints.rb +8 -32
- data/lib/aws-sdk-sts/plugins/endpoints.rb +18 -6
- data/lib/aws-sdk-sts/types.rb +1 -0
- data/lib/aws-sdk-sts.rb +15 -11
- data/lib/seahorse/client/h2/handler.rb +13 -3
- data/lib/seahorse/client/net_http/connection_pool.rb +8 -2
- data/lib/seahorse/client/net_http/handler.rb +18 -1
- data/lib/seahorse/client/plugins/net_http.rb +9 -0
- data/lib/seahorse/client/request_context.rb +8 -1
- data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
- data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
- data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
- data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
- metadata +18 -2
data/lib/aws-sdk-core.rb
CHANGED
@@ -3,125 +3,80 @@
|
|
3
3
|
require 'aws-partitions'
|
4
4
|
require 'seahorse'
|
5
5
|
require 'jmespath'
|
6
|
+
require 'aws-sigv4'
|
6
7
|
|
7
8
|
require_relative 'aws-sdk-core/deprecations'
|
8
|
-
|
9
|
-
# credential providers
|
10
|
-
|
11
|
-
require_relative 'aws-sdk-core/credential_provider'
|
12
|
-
require_relative 'aws-sdk-core/refreshing_credentials'
|
13
|
-
require_relative 'aws-sdk-core/assume_role_credentials'
|
14
|
-
require_relative 'aws-sdk-core/assume_role_web_identity_credentials'
|
15
|
-
require_relative 'aws-sdk-core/credentials'
|
16
|
-
require_relative 'aws-sdk-core/credential_provider_chain'
|
17
|
-
require_relative 'aws-sdk-core/ecs_credentials'
|
18
|
-
require_relative 'aws-sdk-core/instance_profile_credentials'
|
19
|
-
require_relative 'aws-sdk-core/shared_credentials'
|
20
|
-
require_relative 'aws-sdk-core/process_credentials'
|
21
|
-
require_relative 'aws-sdk-core/sso_credentials'
|
22
|
-
|
23
|
-
# tokens and token providers
|
24
|
-
require_relative 'aws-sdk-core/token'
|
25
|
-
require_relative 'aws-sdk-core/token_provider'
|
26
|
-
require_relative 'aws-sdk-core/static_token_provider'
|
27
|
-
require_relative 'aws-sdk-core/refreshing_token'
|
28
|
-
require_relative 'aws-sdk-core/sso_token_provider'
|
29
|
-
require_relative 'aws-sdk-core/token_provider_chain'
|
30
|
-
require_relative 'aws-sdk-core/plugins/bearer_authorization'
|
31
|
-
|
32
|
-
# client modules
|
33
|
-
|
34
|
-
require_relative 'aws-sdk-core/client_stubs'
|
35
|
-
require_relative 'aws-sdk-core/async_client_stubs'
|
36
|
-
require_relative 'aws-sdk-core/eager_loader'
|
37
|
-
require_relative 'aws-sdk-core/errors'
|
38
|
-
require_relative 'aws-sdk-core/pageable_response'
|
39
|
-
require_relative 'aws-sdk-core/pager'
|
40
|
-
require_relative 'aws-sdk-core/param_converter'
|
41
|
-
require_relative 'aws-sdk-core/param_validator'
|
42
|
-
require_relative 'aws-sdk-core/shared_config'
|
43
|
-
require_relative 'aws-sdk-core/structure'
|
44
|
-
require_relative 'aws-sdk-core/type_builder'
|
45
|
-
require_relative 'aws-sdk-core/util'
|
46
|
-
|
47
|
-
# resource classes
|
48
|
-
|
49
|
-
require_relative 'aws-sdk-core/resources/collection'
|
50
|
-
|
51
|
-
# logging
|
52
|
-
|
53
|
-
require_relative 'aws-sdk-core/log/formatter'
|
54
|
-
require_relative 'aws-sdk-core/log/param_filter'
|
55
|
-
require_relative 'aws-sdk-core/log/param_formatter'
|
56
|
-
|
57
|
-
# stubbing
|
58
|
-
|
59
|
-
require_relative 'aws-sdk-core/stubbing/empty_stub'
|
60
|
-
require_relative 'aws-sdk-core/stubbing/data_applicator'
|
61
|
-
require_relative 'aws-sdk-core/stubbing/stub_data'
|
62
|
-
require_relative 'aws-sdk-core/stubbing/xml_error'
|
63
|
-
|
64
|
-
# stubbing protocols
|
65
|
-
|
66
|
-
require_relative 'aws-sdk-core/stubbing/protocols/json'
|
67
|
-
require_relative 'aws-sdk-core/stubbing/protocols/rest'
|
68
|
-
require_relative 'aws-sdk-core/stubbing/protocols/rest_json'
|
69
|
-
require_relative 'aws-sdk-core/stubbing/protocols/rest_xml'
|
70
|
-
require_relative 'aws-sdk-core/stubbing/protocols/query'
|
71
|
-
require_relative 'aws-sdk-core/stubbing/protocols/ec2'
|
72
|
-
require_relative 'aws-sdk-core/stubbing/protocols/rpc_v2'
|
73
|
-
require_relative 'aws-sdk-core/stubbing/protocols/api_gateway'
|
74
|
-
|
75
|
-
# protocols
|
76
|
-
|
77
|
-
require_relative 'aws-sdk-core/error_handler'
|
78
|
-
require_relative 'aws-sdk-core/rest'
|
79
|
-
require_relative 'aws-sdk-core/xml'
|
80
|
-
require_relative 'aws-sdk-core/json'
|
81
|
-
require_relative 'aws-sdk-core/query'
|
82
|
-
require_relative 'aws-sdk-core/rpc_v2'
|
83
|
-
|
84
|
-
# event stream
|
85
|
-
|
86
|
-
require_relative 'aws-sdk-core/binary'
|
87
|
-
require_relative 'aws-sdk-core/event_emitter'
|
88
|
-
|
89
|
-
# endpoint discovery
|
90
|
-
|
91
|
-
require_relative 'aws-sdk-core/endpoint_cache'
|
92
|
-
|
93
|
-
# client metrics
|
94
|
-
|
95
|
-
require_relative 'aws-sdk-core/client_side_monitoring/request_metrics'
|
96
|
-
require_relative 'aws-sdk-core/client_side_monitoring/publisher'
|
97
|
-
|
98
|
-
# utilities
|
99
|
-
|
100
|
-
require_relative 'aws-sdk-core/arn'
|
101
|
-
require_relative 'aws-sdk-core/arn_parser'
|
102
|
-
require_relative 'aws-sdk-core/ec2_metadata'
|
103
|
-
require_relative 'aws-sdk-core/lru_cache'
|
104
|
-
|
105
|
-
# dynamic endpoints
|
106
|
-
require_relative 'aws-sdk-core/endpoints'
|
107
|
-
require_relative 'aws-sdk-core/plugins/signature_v4'
|
108
|
-
|
109
9
|
# defaults
|
110
10
|
require_relative 'aws-defaults'
|
111
11
|
|
112
|
-
# plugins
|
113
|
-
# loaded through building STS or SSO ..
|
114
|
-
|
115
|
-
# aws-sdk-sts is included to support Aws::AssumeRoleCredentials
|
116
|
-
require_relative 'aws-sdk-sts'
|
117
|
-
|
118
|
-
# aws-sdk-sso is included to support Aws::SSOCredentials
|
119
|
-
require_relative 'aws-sdk-sso'
|
120
|
-
require_relative 'aws-sdk-ssooidc'
|
121
|
-
|
122
12
|
module Aws
|
123
13
|
|
124
|
-
|
14
|
+
autoload :IniParser, 'aws-sdk-core/ini_parser'
|
15
|
+
|
16
|
+
# Credentials and credentials providers
|
17
|
+
autoload :Credentials, 'aws-sdk-core/credentials'
|
18
|
+
autoload :CredentialProvider, 'aws-sdk-core/credential_provider'
|
19
|
+
autoload :RefreshingCredentials, 'aws-sdk-core/refreshing_credentials'
|
20
|
+
autoload :AssumeRoleCredentials, 'aws-sdk-core/assume_role_credentials'
|
21
|
+
autoload :AssumeRoleWebIdentityCredentials, 'aws-sdk-core/assume_role_web_identity_credentials'
|
22
|
+
autoload :CredentialProviderChain, 'aws-sdk-core/credential_provider_chain'
|
23
|
+
autoload :ECSCredentials, 'aws-sdk-core/ecs_credentials'
|
24
|
+
autoload :InstanceProfileCredentials, 'aws-sdk-core/instance_profile_credentials'
|
25
|
+
autoload :SharedCredentials, 'aws-sdk-core/shared_credentials'
|
26
|
+
autoload :ProcessCredentials, 'aws-sdk-core/process_credentials'
|
27
|
+
autoload :SSOCredentials, 'aws-sdk-core/sso_credentials'
|
28
|
+
|
29
|
+
|
30
|
+
# tokens and token providers
|
31
|
+
autoload :Token, 'aws-sdk-core/token'
|
32
|
+
autoload :TokenProvider, 'aws-sdk-core/token_provider'
|
33
|
+
autoload :StaticTokenProvider, 'aws-sdk-core/static_token_provider'
|
34
|
+
autoload :RefreshingToken, 'aws-sdk-core/refreshing_token'
|
35
|
+
autoload :SSOTokenProvider, 'aws-sdk-core/sso_token_provider'
|
36
|
+
autoload :TokenProviderChain, 'aws-sdk-core/token_provider_chain'
|
37
|
+
|
38
|
+
# client modules
|
39
|
+
autoload :ClientStubs, 'aws-sdk-core/client_stubs'
|
40
|
+
autoload :AsyncClientStubs, 'aws-sdk-core/async_client_stubs'
|
41
|
+
autoload :EagerLoader, 'aws-sdk-core/eager_loader'
|
42
|
+
autoload :Errors, 'aws-sdk-core/errors'
|
43
|
+
autoload :PageableResponse, 'aws-sdk-core/pageable_response'
|
44
|
+
autoload :Pager, 'aws-sdk-core/pager'
|
45
|
+
autoload :ParamConverter, 'aws-sdk-core/param_converter'
|
46
|
+
autoload :ParamValidator, 'aws-sdk-core/param_validator'
|
47
|
+
autoload :SharedConfig, 'aws-sdk-core/shared_config'
|
48
|
+
autoload :Structure, 'aws-sdk-core/structure'
|
49
|
+
autoload :EmptyStructure, 'aws-sdk-core/structure'
|
50
|
+
autoload :TypeBuilder, 'aws-sdk-core/type_builder'
|
51
|
+
autoload :Util, 'aws-sdk-core/util'
|
52
|
+
|
53
|
+
# protocols
|
54
|
+
autoload :ErrorHandler, 'aws-sdk-core/error_handler'
|
55
|
+
autoload :Rest, 'aws-sdk-core/rest'
|
56
|
+
autoload :Xml, 'aws-sdk-core/xml'
|
57
|
+
autoload :Json, 'aws-sdk-core/json'
|
58
|
+
autoload :Query, 'aws-sdk-core/query'
|
59
|
+
autoload :RpcV2, 'aws-sdk-core/rpc_v2'
|
60
|
+
|
61
|
+
# event stream
|
62
|
+
autoload :Binary, 'aws-sdk-core/binary'
|
63
|
+
autoload :EventEmitter, 'aws-sdk-core/event_emitter'
|
64
|
+
|
65
|
+
# endpoint discovery
|
66
|
+
autoload :EndpointCache, 'aws-sdk-core/endpoint_cache'
|
67
|
+
|
68
|
+
autoload :Telemetry, 'aws-sdk-core/telemetry'
|
69
|
+
|
70
|
+
# utilities
|
71
|
+
autoload :ARN, 'aws-sdk-core/arn'
|
72
|
+
autoload :ARNParser, 'aws-sdk-core/arn_parser'
|
73
|
+
autoload :EC2Metadata, 'aws-sdk-core/ec2_metadata'
|
74
|
+
autoload :LRUCache, 'aws-sdk-core/lru_cache'
|
75
|
+
|
76
|
+
# dynamic endpoints
|
77
|
+
autoload :Endpoints, 'aws-sdk-core/endpoints'
|
78
|
+
|
79
|
+
CORE_GEM_VERSION = File.read(File.expand_path('../VERSION', __dir__)).strip
|
125
80
|
|
126
81
|
@config = {}
|
127
82
|
|
@@ -205,3 +160,18 @@ module Aws
|
|
205
160
|
|
206
161
|
end
|
207
162
|
end
|
163
|
+
|
164
|
+
# Setup additional autoloads/modules
|
165
|
+
require_relative 'aws-sdk-core/client_side_monitoring'
|
166
|
+
require_relative 'aws-sdk-core/log'
|
167
|
+
require_relative 'aws-sdk-core/plugins'
|
168
|
+
require_relative 'aws-sdk-core/resources'
|
169
|
+
require_relative 'aws-sdk-core/stubbing'
|
170
|
+
require_relative 'aws-sdk-core/waiters'
|
171
|
+
|
172
|
+
# aws-sdk-sts is included to support Aws::AssumeRoleCredentials
|
173
|
+
require_relative 'aws-sdk-sts'
|
174
|
+
|
175
|
+
# aws-sdk-sso is included to support Aws::SSOCredentials
|
176
|
+
require_relative 'aws-sdk-sso'
|
177
|
+
require_relative 'aws-sdk-ssooidc'
|
data/lib/aws-sdk-sso/client.rb
CHANGED
@@ -32,11 +32,10 @@ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
|
32
32
|
require 'aws-sdk-core/plugins/request_compression.rb'
|
33
33
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
34
34
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
35
|
+
require 'aws-sdk-core/plugins/telemetry.rb'
|
35
36
|
require 'aws-sdk-core/plugins/sign.rb'
|
36
37
|
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
37
38
|
|
38
|
-
Aws::Plugins::GlobalConfiguration.add_identifier(:sso)
|
39
|
-
|
40
39
|
module Aws::SSO
|
41
40
|
# An API client for SSO. To construct a client, you need to configure a `:region` and `:credentials`.
|
42
41
|
#
|
@@ -83,6 +82,7 @@ module Aws::SSO
|
|
83
82
|
add_plugin(Aws::Plugins::RequestCompression)
|
84
83
|
add_plugin(Aws::Plugins::DefaultsMode)
|
85
84
|
add_plugin(Aws::Plugins::RecursionDetection)
|
85
|
+
add_plugin(Aws::Plugins::Telemetry)
|
86
86
|
add_plugin(Aws::Plugins::Sign)
|
87
87
|
add_plugin(Aws::Plugins::Protocols::RestJson)
|
88
88
|
add_plugin(Aws::SSO::Plugins::Endpoints)
|
@@ -128,13 +128,15 @@ module Aws::SSO
|
|
128
128
|
# locations will be searched for credentials:
|
129
129
|
#
|
130
130
|
# * `Aws.config[:credentials]`
|
131
|
-
# * The `:access_key_id`, `:secret_access_key`,
|
132
|
-
#
|
131
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
132
|
+
# `:account_id` options.
|
133
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
|
134
|
+
# ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
|
133
135
|
# * `~/.aws/credentials`
|
134
136
|
# * `~/.aws/config`
|
135
137
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
136
138
|
# are very aggressive. Construct and pass an instance of
|
137
|
-
# `Aws::
|
139
|
+
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
138
140
|
# enable retries and extended timeouts. Instance profile credential
|
139
141
|
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
140
142
|
# to true.
|
@@ -153,6 +155,8 @@ module Aws::SSO
|
|
153
155
|
#
|
154
156
|
# @option options [String] :access_key_id
|
155
157
|
#
|
158
|
+
# @option options [String] :account_id
|
159
|
+
#
|
156
160
|
# @option options [Boolean] :active_endpoint_cache (false)
|
157
161
|
# When set to `true`, a thread polling for endpoints will be running in
|
158
162
|
# the background every 60 secs (default). Defaults to `false`.
|
@@ -330,6 +334,16 @@ module Aws::SSO
|
|
330
334
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
331
335
|
# requests are made, and retries are disabled.
|
332
336
|
#
|
337
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
338
|
+
# Allows you to provide a telemetry provider, which is used to
|
339
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
340
|
+
# will not record or emit any telemetry data. The SDK supports the
|
341
|
+
# following telemetry providers:
|
342
|
+
#
|
343
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
344
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
345
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
346
|
+
#
|
333
347
|
# @option options [Aws::TokenProvider] :token_provider
|
334
348
|
# A Bearer Token Provider. This can be an instance of any one of the
|
335
349
|
# following classes:
|
@@ -357,7 +371,9 @@ module Aws::SSO
|
|
357
371
|
# sending the request.
|
358
372
|
#
|
359
373
|
# @option options [Aws::SSO::EndpointProvider] :endpoint_provider
|
360
|
-
# The endpoint provider used to resolve endpoints. Any object that responds to
|
374
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
375
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
376
|
+
# `Aws::SSO::EndpointParameters`.
|
361
377
|
#
|
362
378
|
# @option options [Float] :http_continue_timeout (1)
|
363
379
|
# The number of seconds to wait for a 100-continue response before sending the
|
@@ -413,6 +429,12 @@ module Aws::SSO
|
|
413
429
|
# @option options [String] :ssl_ca_store
|
414
430
|
# Sets the X509::Store to verify peer certificate.
|
415
431
|
#
|
432
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
433
|
+
# Sets a client certificate when creating http connections.
|
434
|
+
#
|
435
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
436
|
+
# Sets a client key when creating http connections.
|
437
|
+
#
|
416
438
|
# @option options [Float] :ssl_timeout
|
417
439
|
# Sets the SSL timeout in seconds
|
418
440
|
#
|
@@ -635,14 +657,19 @@ module Aws::SSO
|
|
635
657
|
# @api private
|
636
658
|
def build_request(operation_name, params = {})
|
637
659
|
handlers = @handlers.for(operation_name)
|
660
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
661
|
+
Aws::Telemetry.module_to_tracer_name('Aws::SSO')
|
662
|
+
)
|
638
663
|
context = Seahorse::Client::RequestContext.new(
|
639
664
|
operation_name: operation_name,
|
640
665
|
operation: config.api.operation(operation_name),
|
641
666
|
client: self,
|
642
667
|
params: params,
|
643
|
-
config: config
|
668
|
+
config: config,
|
669
|
+
tracer: tracer
|
670
|
+
)
|
644
671
|
context[:gem_name] = 'aws-sdk-core'
|
645
|
-
context[:gem_version] = '3.
|
672
|
+
context[:gem_version] = '3.209.1'
|
646
673
|
Seahorse::Client::Request.new(handlers, context)
|
647
674
|
end
|
648
675
|
|
@@ -14,56 +14,44 @@ module Aws::SSO
|
|
14
14
|
|
15
15
|
class GetRoleCredentials
|
16
16
|
def self.build(context)
|
17
|
-
unless context.config.regional_endpoint
|
18
|
-
endpoint = context.config.endpoint.to_s
|
19
|
-
end
|
20
17
|
Aws::SSO::EndpointParameters.new(
|
21
18
|
region: context.config.region,
|
22
19
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
23
20
|
use_fips: context.config.use_fips_endpoint,
|
24
|
-
endpoint: endpoint,
|
21
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
25
22
|
)
|
26
23
|
end
|
27
24
|
end
|
28
25
|
|
29
26
|
class ListAccountRoles
|
30
27
|
def self.build(context)
|
31
|
-
unless context.config.regional_endpoint
|
32
|
-
endpoint = context.config.endpoint.to_s
|
33
|
-
end
|
34
28
|
Aws::SSO::EndpointParameters.new(
|
35
29
|
region: context.config.region,
|
36
30
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
37
31
|
use_fips: context.config.use_fips_endpoint,
|
38
|
-
endpoint: endpoint,
|
32
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
39
33
|
)
|
40
34
|
end
|
41
35
|
end
|
42
36
|
|
43
37
|
class ListAccounts
|
44
38
|
def self.build(context)
|
45
|
-
unless context.config.regional_endpoint
|
46
|
-
endpoint = context.config.endpoint.to_s
|
47
|
-
end
|
48
39
|
Aws::SSO::EndpointParameters.new(
|
49
40
|
region: context.config.region,
|
50
41
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
51
42
|
use_fips: context.config.use_fips_endpoint,
|
52
|
-
endpoint: endpoint,
|
43
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
53
44
|
)
|
54
45
|
end
|
55
46
|
end
|
56
47
|
|
57
48
|
class Logout
|
58
49
|
def self.build(context)
|
59
|
-
unless context.config.regional_endpoint
|
60
|
-
endpoint = context.config.endpoint.to_s
|
61
|
-
end
|
62
50
|
Aws::SSO::EndpointParameters.new(
|
63
51
|
region: context.config.region,
|
64
52
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
65
53
|
use_fips: context.config.use_fips_endpoint,
|
66
|
-
endpoint: endpoint,
|
54
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
67
55
|
)
|
68
56
|
end
|
69
57
|
end
|
@@ -15,11 +15,11 @@ module Aws::SSO
|
|
15
15
|
:endpoint_provider,
|
16
16
|
doc_type: 'Aws::SSO::EndpointProvider',
|
17
17
|
rbs_type: 'untyped',
|
18
|
-
docstring:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
docstring: <<~DOCS) do |_cfg|
|
19
|
+
The endpoint provider used to resolve endpoints. Any object that responds to
|
20
|
+
`#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
21
|
+
`Aws::SSO::EndpointParameters`.
|
22
|
+
DOCS
|
23
23
|
Aws::SSO::EndpointProvider.new
|
24
24
|
end
|
25
25
|
|
@@ -40,11 +40,23 @@ module Aws::SSO
|
|
40
40
|
context[:auth_scheme] =
|
41
41
|
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
42
42
|
|
43
|
-
@handler.call(context)
|
43
|
+
with_metrics(context) { @handler.call(context) }
|
44
44
|
end
|
45
45
|
|
46
46
|
private
|
47
47
|
|
48
|
+
def with_metrics(context, &block)
|
49
|
+
metrics = []
|
50
|
+
metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
|
51
|
+
if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
|
52
|
+
metrics << 'SIGV4A_SIGNING'
|
53
|
+
end
|
54
|
+
if context.config.credentials&.credentials&.account_id
|
55
|
+
metrics << 'RESOLVED_ACCOUNT_ID'
|
56
|
+
end
|
57
|
+
Aws::Plugins::UserAgent.metric(*metrics, &block)
|
58
|
+
end
|
59
|
+
|
48
60
|
def apply_endpoint_headers(context, headers)
|
49
61
|
headers.each do |key, values|
|
50
62
|
value = values
|
data/lib/aws-sdk-sso/types.rb
CHANGED
data/lib/aws-sdk-sso.rb
CHANGED
@@ -13,16 +13,7 @@ unless Module.const_defined?(:Aws)
|
|
13
13
|
require 'aws-sigv4'
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
|
-
require_relative 'aws-sdk-sso/client_api'
|
18
|
-
require_relative 'aws-sdk-sso/plugins/endpoints.rb'
|
19
|
-
require_relative 'aws-sdk-sso/client'
|
20
|
-
require_relative 'aws-sdk-sso/errors'
|
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'
|
25
|
-
require_relative 'aws-sdk-sso/customizations'
|
16
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:sso)
|
26
17
|
|
27
18
|
# This module provides support for AWS Single Sign-On. This module is available in the
|
28
19
|
# `aws-sdk-core` gem.
|
@@ -53,7 +44,20 @@ require_relative 'aws-sdk-sso/customizations'
|
|
53
44
|
#
|
54
45
|
# @!group service
|
55
46
|
module Aws::SSO
|
47
|
+
autoload :Types, 'aws-sdk-sso/types'
|
48
|
+
autoload :ClientApi, 'aws-sdk-sso/client_api'
|
49
|
+
module Plugins
|
50
|
+
autoload :Endpoints, 'aws-sdk-sso/plugins/endpoints.rb'
|
51
|
+
end
|
52
|
+
autoload :Client, 'aws-sdk-sso/client'
|
53
|
+
autoload :Errors, 'aws-sdk-sso/errors'
|
54
|
+
autoload :Resource, 'aws-sdk-sso/resource'
|
55
|
+
autoload :EndpointParameters, 'aws-sdk-sso/endpoint_parameters'
|
56
|
+
autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
|
57
|
+
autoload :Endpoints, 'aws-sdk-sso/endpoints'
|
56
58
|
|
57
|
-
GEM_VERSION = '3.
|
59
|
+
GEM_VERSION = '3.209.1'
|
58
60
|
|
59
61
|
end
|
62
|
+
|
63
|
+
require_relative 'aws-sdk-sso/customizations'
|
@@ -32,11 +32,10 @@ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
|
32
32
|
require 'aws-sdk-core/plugins/request_compression.rb'
|
33
33
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
34
34
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
35
|
+
require 'aws-sdk-core/plugins/telemetry.rb'
|
35
36
|
require 'aws-sdk-core/plugins/sign.rb'
|
36
37
|
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
37
38
|
|
38
|
-
Aws::Plugins::GlobalConfiguration.add_identifier(:ssooidc)
|
39
|
-
|
40
39
|
module Aws::SSOOIDC
|
41
40
|
# An API client for SSOOIDC. To construct a client, you need to configure a `:region` and `:credentials`.
|
42
41
|
#
|
@@ -83,6 +82,7 @@ module Aws::SSOOIDC
|
|
83
82
|
add_plugin(Aws::Plugins::RequestCompression)
|
84
83
|
add_plugin(Aws::Plugins::DefaultsMode)
|
85
84
|
add_plugin(Aws::Plugins::RecursionDetection)
|
85
|
+
add_plugin(Aws::Plugins::Telemetry)
|
86
86
|
add_plugin(Aws::Plugins::Sign)
|
87
87
|
add_plugin(Aws::Plugins::Protocols::RestJson)
|
88
88
|
add_plugin(Aws::SSOOIDC::Plugins::Endpoints)
|
@@ -128,13 +128,15 @@ module Aws::SSOOIDC
|
|
128
128
|
# locations will be searched for credentials:
|
129
129
|
#
|
130
130
|
# * `Aws.config[:credentials]`
|
131
|
-
# * The `:access_key_id`, `:secret_access_key`,
|
132
|
-
#
|
131
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
132
|
+
# `:account_id` options.
|
133
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
|
134
|
+
# ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
|
133
135
|
# * `~/.aws/credentials`
|
134
136
|
# * `~/.aws/config`
|
135
137
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
136
138
|
# are very aggressive. Construct and pass an instance of
|
137
|
-
# `Aws::
|
139
|
+
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
138
140
|
# enable retries and extended timeouts. Instance profile credential
|
139
141
|
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
140
142
|
# to true.
|
@@ -153,6 +155,8 @@ module Aws::SSOOIDC
|
|
153
155
|
#
|
154
156
|
# @option options [String] :access_key_id
|
155
157
|
#
|
158
|
+
# @option options [String] :account_id
|
159
|
+
#
|
156
160
|
# @option options [Boolean] :active_endpoint_cache (false)
|
157
161
|
# When set to `true`, a thread polling for endpoints will be running in
|
158
162
|
# the background every 60 secs (default). Defaults to `false`.
|
@@ -330,6 +334,16 @@ module Aws::SSOOIDC
|
|
330
334
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
331
335
|
# requests are made, and retries are disabled.
|
332
336
|
#
|
337
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
338
|
+
# Allows you to provide a telemetry provider, which is used to
|
339
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
340
|
+
# will not record or emit any telemetry data. The SDK supports the
|
341
|
+
# following telemetry providers:
|
342
|
+
#
|
343
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
344
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
345
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
346
|
+
#
|
333
347
|
# @option options [Aws::TokenProvider] :token_provider
|
334
348
|
# A Bearer Token Provider. This can be an instance of any one of the
|
335
349
|
# following classes:
|
@@ -357,7 +371,9 @@ module Aws::SSOOIDC
|
|
357
371
|
# sending the request.
|
358
372
|
#
|
359
373
|
# @option options [Aws::SSOOIDC::EndpointProvider] :endpoint_provider
|
360
|
-
# The endpoint provider used to resolve endpoints. Any object that responds to
|
374
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
375
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
376
|
+
# `Aws::SSOOIDC::EndpointParameters`.
|
361
377
|
#
|
362
378
|
# @option options [Float] :http_continue_timeout (1)
|
363
379
|
# The number of seconds to wait for a 100-continue response before sending the
|
@@ -413,6 +429,12 @@ module Aws::SSOOIDC
|
|
413
429
|
# @option options [String] :ssl_ca_store
|
414
430
|
# Sets the X509::Store to verify peer certificate.
|
415
431
|
#
|
432
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
433
|
+
# Sets a client certificate when creating http connections.
|
434
|
+
#
|
435
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
436
|
+
# Sets a client key when creating http connections.
|
437
|
+
#
|
416
438
|
# @option options [Float] :ssl_timeout
|
417
439
|
# Sets the SSL timeout in seconds
|
418
440
|
#
|
@@ -988,14 +1010,19 @@ module Aws::SSOOIDC
|
|
988
1010
|
# @api private
|
989
1011
|
def build_request(operation_name, params = {})
|
990
1012
|
handlers = @handlers.for(operation_name)
|
1013
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
1014
|
+
Aws::Telemetry.module_to_tracer_name('Aws::SSOOIDC')
|
1015
|
+
)
|
991
1016
|
context = Seahorse::Client::RequestContext.new(
|
992
1017
|
operation_name: operation_name,
|
993
1018
|
operation: config.api.operation(operation_name),
|
994
1019
|
client: self,
|
995
1020
|
params: params,
|
996
|
-
config: config
|
1021
|
+
config: config,
|
1022
|
+
tracer: tracer
|
1023
|
+
)
|
997
1024
|
context[:gem_name] = 'aws-sdk-core'
|
998
|
-
context[:gem_version] = '3.
|
1025
|
+
context[:gem_version] = '3.209.1'
|
999
1026
|
Seahorse::Client::Request.new(handlers, context)
|
1000
1027
|
end
|
1001
1028
|
|
@@ -14,56 +14,44 @@ module Aws::SSOOIDC
|
|
14
14
|
|
15
15
|
class CreateToken
|
16
16
|
def self.build(context)
|
17
|
-
unless context.config.regional_endpoint
|
18
|
-
endpoint = context.config.endpoint.to_s
|
19
|
-
end
|
20
17
|
Aws::SSOOIDC::EndpointParameters.new(
|
21
18
|
region: context.config.region,
|
22
19
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
23
20
|
use_fips: context.config.use_fips_endpoint,
|
24
|
-
endpoint: endpoint,
|
21
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
25
22
|
)
|
26
23
|
end
|
27
24
|
end
|
28
25
|
|
29
26
|
class CreateTokenWithIAM
|
30
27
|
def self.build(context)
|
31
|
-
unless context.config.regional_endpoint
|
32
|
-
endpoint = context.config.endpoint.to_s
|
33
|
-
end
|
34
28
|
Aws::SSOOIDC::EndpointParameters.new(
|
35
29
|
region: context.config.region,
|
36
30
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
37
31
|
use_fips: context.config.use_fips_endpoint,
|
38
|
-
endpoint: endpoint,
|
32
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
39
33
|
)
|
40
34
|
end
|
41
35
|
end
|
42
36
|
|
43
37
|
class RegisterClient
|
44
38
|
def self.build(context)
|
45
|
-
unless context.config.regional_endpoint
|
46
|
-
endpoint = context.config.endpoint.to_s
|
47
|
-
end
|
48
39
|
Aws::SSOOIDC::EndpointParameters.new(
|
49
40
|
region: context.config.region,
|
50
41
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
51
42
|
use_fips: context.config.use_fips_endpoint,
|
52
|
-
endpoint: endpoint,
|
43
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
53
44
|
)
|
54
45
|
end
|
55
46
|
end
|
56
47
|
|
57
48
|
class StartDeviceAuthorization
|
58
49
|
def self.build(context)
|
59
|
-
unless context.config.regional_endpoint
|
60
|
-
endpoint = context.config.endpoint.to_s
|
61
|
-
end
|
62
50
|
Aws::SSOOIDC::EndpointParameters.new(
|
63
51
|
region: context.config.region,
|
64
52
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
65
53
|
use_fips: context.config.use_fips_endpoint,
|
66
|
-
endpoint: endpoint,
|
54
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
67
55
|
)
|
68
56
|
end
|
69
57
|
end
|