aws-sdk-core 3.201.3 → 3.209.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +113 -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/sign.rb +2 -3
- 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/waiters/poller.rb +9 -4
- 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 +21 -9
- 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 +20 -4
@@ -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
|
@@ -15,11 +15,11 @@ module Aws::SSOOIDC
|
|
15
15
|
:endpoint_provider,
|
16
16
|
doc_type: 'Aws::SSOOIDC::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::SSOOIDC::EndpointParameters`.
|
22
|
+
DOCS
|
23
23
|
Aws::SSOOIDC::EndpointProvider.new
|
24
24
|
end
|
25
25
|
|
@@ -40,11 +40,23 @@ module Aws::SSOOIDC
|
|
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-ssooidc.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-ssooidc/client_api'
|
18
|
-
require_relative 'aws-sdk-ssooidc/plugins/endpoints.rb'
|
19
|
-
require_relative 'aws-sdk-ssooidc/client'
|
20
|
-
require_relative 'aws-sdk-ssooidc/errors'
|
21
|
-
require_relative 'aws-sdk-ssooidc/resource'
|
22
|
-
require_relative 'aws-sdk-ssooidc/endpoint_parameters'
|
23
|
-
require_relative 'aws-sdk-ssooidc/endpoint_provider'
|
24
|
-
require_relative 'aws-sdk-ssooidc/endpoints'
|
25
|
-
require_relative 'aws-sdk-ssooidc/customizations'
|
16
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:ssooidc)
|
26
17
|
|
27
18
|
# This module provides support for AWS SSO OIDC. This module is available in the
|
28
19
|
# `aws-sdk-core` gem.
|
@@ -53,7 +44,20 @@ require_relative 'aws-sdk-ssooidc/customizations'
|
|
53
44
|
#
|
54
45
|
# @!group service
|
55
46
|
module Aws::SSOOIDC
|
47
|
+
autoload :Types, 'aws-sdk-ssooidc/types'
|
48
|
+
autoload :ClientApi, 'aws-sdk-ssooidc/client_api'
|
49
|
+
module Plugins
|
50
|
+
autoload :Endpoints, 'aws-sdk-ssooidc/plugins/endpoints.rb'
|
51
|
+
end
|
52
|
+
autoload :Client, 'aws-sdk-ssooidc/client'
|
53
|
+
autoload :Errors, 'aws-sdk-ssooidc/errors'
|
54
|
+
autoload :Resource, 'aws-sdk-ssooidc/resource'
|
55
|
+
autoload :EndpointParameters, 'aws-sdk-ssooidc/endpoint_parameters'
|
56
|
+
autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
|
57
|
+
autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
|
56
58
|
|
57
|
-
GEM_VERSION = '3.
|
59
|
+
GEM_VERSION = '3.209.1'
|
58
60
|
|
59
61
|
end
|
62
|
+
|
63
|
+
require_relative 'aws-sdk-ssooidc/customizations'
|
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -32,12 +32,11 @@ 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/query.rb'
|
37
38
|
require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
|
38
39
|
|
39
|
-
Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
|
40
|
-
|
41
40
|
module Aws::STS
|
42
41
|
# An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
|
43
42
|
#
|
@@ -84,6 +83,7 @@ module Aws::STS
|
|
84
83
|
add_plugin(Aws::Plugins::RequestCompression)
|
85
84
|
add_plugin(Aws::Plugins::DefaultsMode)
|
86
85
|
add_plugin(Aws::Plugins::RecursionDetection)
|
86
|
+
add_plugin(Aws::Plugins::Telemetry)
|
87
87
|
add_plugin(Aws::Plugins::Sign)
|
88
88
|
add_plugin(Aws::Plugins::Protocols::Query)
|
89
89
|
add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
|
@@ -130,13 +130,15 @@ module Aws::STS
|
|
130
130
|
# locations will be searched for credentials:
|
131
131
|
#
|
132
132
|
# * `Aws.config[:credentials]`
|
133
|
-
# * The `:access_key_id`, `:secret_access_key`,
|
134
|
-
#
|
133
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
134
|
+
# `:account_id` options.
|
135
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
|
136
|
+
# ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
|
135
137
|
# * `~/.aws/credentials`
|
136
138
|
# * `~/.aws/config`
|
137
139
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
138
140
|
# are very aggressive. Construct and pass an instance of
|
139
|
-
# `Aws::
|
141
|
+
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
140
142
|
# enable retries and extended timeouts. Instance profile credential
|
141
143
|
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
142
144
|
# to true.
|
@@ -155,6 +157,8 @@ module Aws::STS
|
|
155
157
|
#
|
156
158
|
# @option options [String] :access_key_id
|
157
159
|
#
|
160
|
+
# @option options [String] :account_id
|
161
|
+
#
|
158
162
|
# @option options [Boolean] :active_endpoint_cache (false)
|
159
163
|
# When set to `true`, a thread polling for endpoints will be running in
|
160
164
|
# the background every 60 secs (default). Defaults to `false`.
|
@@ -337,6 +341,16 @@ module Aws::STS
|
|
337
341
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
338
342
|
# requests are made, and retries are disabled.
|
339
343
|
#
|
344
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
345
|
+
# Allows you to provide a telemetry provider, which is used to
|
346
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
347
|
+
# will not record or emit any telemetry data. The SDK supports the
|
348
|
+
# following telemetry providers:
|
349
|
+
#
|
350
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
351
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
352
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
353
|
+
#
|
340
354
|
# @option options [Aws::TokenProvider] :token_provider
|
341
355
|
# A Bearer Token Provider. This can be an instance of any one of the
|
342
356
|
# following classes:
|
@@ -364,7 +378,9 @@ module Aws::STS
|
|
364
378
|
# sending the request.
|
365
379
|
#
|
366
380
|
# @option options [Aws::STS::EndpointProvider] :endpoint_provider
|
367
|
-
# The endpoint provider used to resolve endpoints. Any object that responds to
|
381
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
382
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
383
|
+
# `Aws::STS::EndpointParameters`.
|
368
384
|
#
|
369
385
|
# @option options [Float] :http_continue_timeout (1)
|
370
386
|
# The number of seconds to wait for a 100-continue response before sending the
|
@@ -420,6 +436,12 @@ module Aws::STS
|
|
420
436
|
# @option options [String] :ssl_ca_store
|
421
437
|
# Sets the X509::Store to verify peer certificate.
|
422
438
|
#
|
439
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
440
|
+
# Sets a client certificate when creating http connections.
|
441
|
+
#
|
442
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
443
|
+
# Sets a client key when creating http connections.
|
444
|
+
#
|
423
445
|
# @option options [Float] :ssl_timeout
|
424
446
|
# Sets the SSL timeout in seconds
|
425
447
|
#
|
@@ -2382,14 +2404,19 @@ module Aws::STS
|
|
2382
2404
|
# @api private
|
2383
2405
|
def build_request(operation_name, params = {})
|
2384
2406
|
handlers = @handlers.for(operation_name)
|
2407
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
2408
|
+
Aws::Telemetry.module_to_tracer_name('Aws::STS')
|
2409
|
+
)
|
2385
2410
|
context = Seahorse::Client::RequestContext.new(
|
2386
2411
|
operation_name: operation_name,
|
2387
2412
|
operation: config.api.operation(operation_name),
|
2388
2413
|
client: self,
|
2389
2414
|
params: params,
|
2390
|
-
config: config
|
2415
|
+
config: config,
|
2416
|
+
tracer: tracer
|
2417
|
+
)
|
2391
2418
|
context[:gem_name] = 'aws-sdk-core'
|
2392
|
-
context[:gem_version] = '3.
|
2419
|
+
context[:gem_version] = '3.209.1'
|
2393
2420
|
Seahorse::Client::Request.new(handlers, context)
|
2394
2421
|
end
|
2395
2422
|
|
@@ -14,14 +14,11 @@ module Aws::STS
|
|
14
14
|
|
15
15
|
class AssumeRole
|
16
16
|
def self.build(context)
|
17
|
-
unless context.config.regional_endpoint
|
18
|
-
endpoint = context.config.endpoint.to_s
|
19
|
-
end
|
20
17
|
Aws::STS::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
|
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
26
23
|
)
|
27
24
|
end
|
@@ -29,14 +26,11 @@ module Aws::STS
|
|
29
26
|
|
30
27
|
class AssumeRoleWithSAML
|
31
28
|
def self.build(context)
|
32
|
-
unless context.config.regional_endpoint
|
33
|
-
endpoint = context.config.endpoint.to_s
|
34
|
-
end
|
35
29
|
Aws::STS::EndpointParameters.new(
|
36
30
|
region: context.config.region,
|
37
31
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
38
32
|
use_fips: context.config.use_fips_endpoint,
|
39
|
-
endpoint: endpoint,
|
33
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
40
34
|
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
41
35
|
)
|
42
36
|
end
|
@@ -44,14 +38,11 @@ module Aws::STS
|
|
44
38
|
|
45
39
|
class AssumeRoleWithWebIdentity
|
46
40
|
def self.build(context)
|
47
|
-
unless context.config.regional_endpoint
|
48
|
-
endpoint = context.config.endpoint.to_s
|
49
|
-
end
|
50
41
|
Aws::STS::EndpointParameters.new(
|
51
42
|
region: context.config.region,
|
52
43
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
53
44
|
use_fips: context.config.use_fips_endpoint,
|
54
|
-
endpoint: endpoint,
|
45
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
55
46
|
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
56
47
|
)
|
57
48
|
end
|
@@ -59,14 +50,11 @@ module Aws::STS
|
|
59
50
|
|
60
51
|
class DecodeAuthorizationMessage
|
61
52
|
def self.build(context)
|
62
|
-
unless context.config.regional_endpoint
|
63
|
-
endpoint = context.config.endpoint.to_s
|
64
|
-
end
|
65
53
|
Aws::STS::EndpointParameters.new(
|
66
54
|
region: context.config.region,
|
67
55
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
68
56
|
use_fips: context.config.use_fips_endpoint,
|
69
|
-
endpoint: endpoint,
|
57
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
70
58
|
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
71
59
|
)
|
72
60
|
end
|
@@ -74,14 +62,11 @@ module Aws::STS
|
|
74
62
|
|
75
63
|
class GetAccessKeyInfo
|
76
64
|
def self.build(context)
|
77
|
-
unless context.config.regional_endpoint
|
78
|
-
endpoint = context.config.endpoint.to_s
|
79
|
-
end
|
80
65
|
Aws::STS::EndpointParameters.new(
|
81
66
|
region: context.config.region,
|
82
67
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
83
68
|
use_fips: context.config.use_fips_endpoint,
|
84
|
-
endpoint: endpoint,
|
69
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
85
70
|
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
86
71
|
)
|
87
72
|
end
|
@@ -89,14 +74,11 @@ module Aws::STS
|
|
89
74
|
|
90
75
|
class GetCallerIdentity
|
91
76
|
def self.build(context)
|
92
|
-
unless context.config.regional_endpoint
|
93
|
-
endpoint = context.config.endpoint.to_s
|
94
|
-
end
|
95
77
|
Aws::STS::EndpointParameters.new(
|
96
78
|
region: context.config.region,
|
97
79
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
98
80
|
use_fips: context.config.use_fips_endpoint,
|
99
|
-
endpoint: endpoint,
|
81
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
100
82
|
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
101
83
|
)
|
102
84
|
end
|
@@ -104,14 +86,11 @@ module Aws::STS
|
|
104
86
|
|
105
87
|
class GetFederationToken
|
106
88
|
def self.build(context)
|
107
|
-
unless context.config.regional_endpoint
|
108
|
-
endpoint = context.config.endpoint.to_s
|
109
|
-
end
|
110
89
|
Aws::STS::EndpointParameters.new(
|
111
90
|
region: context.config.region,
|
112
91
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
113
92
|
use_fips: context.config.use_fips_endpoint,
|
114
|
-
endpoint: endpoint,
|
93
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
115
94
|
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
116
95
|
)
|
117
96
|
end
|
@@ -119,14 +98,11 @@ module Aws::STS
|
|
119
98
|
|
120
99
|
class GetSessionToken
|
121
100
|
def self.build(context)
|
122
|
-
unless context.config.regional_endpoint
|
123
|
-
endpoint = context.config.endpoint.to_s
|
124
|
-
end
|
125
101
|
Aws::STS::EndpointParameters.new(
|
126
102
|
region: context.config.region,
|
127
103
|
use_dual_stack: context.config.use_dualstack_endpoint,
|
128
104
|
use_fips: context.config.use_fips_endpoint,
|
129
|
-
endpoint: endpoint,
|
105
|
+
endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
|
130
106
|
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
131
107
|
)
|
132
108
|
end
|
@@ -15,11 +15,11 @@ module Aws::STS
|
|
15
15
|
:endpoint_provider,
|
16
16
|
doc_type: 'Aws::STS::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::STS::EndpointParameters`.
|
22
|
+
DOCS
|
23
23
|
Aws::STS::EndpointProvider.new
|
24
24
|
end
|
25
25
|
|
@@ -40,11 +40,23 @@ module Aws::STS
|
|
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-sts/types.rb
CHANGED
data/lib/aws-sdk-sts.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-sts/client_api'
|
18
|
-
require_relative 'aws-sdk-sts/plugins/endpoints.rb'
|
19
|
-
require_relative 'aws-sdk-sts/client'
|
20
|
-
require_relative 'aws-sdk-sts/errors'
|
21
|
-
require_relative 'aws-sdk-sts/resource'
|
22
|
-
require_relative 'aws-sdk-sts/endpoint_parameters'
|
23
|
-
require_relative 'aws-sdk-sts/endpoint_provider'
|
24
|
-
require_relative 'aws-sdk-sts/endpoints'
|
25
|
-
require_relative 'aws-sdk-sts/customizations'
|
16
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
|
26
17
|
|
27
18
|
# This module provides support for AWS Security Token Service. This module is available in the
|
28
19
|
# `aws-sdk-core` gem.
|
@@ -53,7 +44,20 @@ require_relative 'aws-sdk-sts/customizations'
|
|
53
44
|
#
|
54
45
|
# @!group service
|
55
46
|
module Aws::STS
|
47
|
+
autoload :Types, 'aws-sdk-sts/types'
|
48
|
+
autoload :ClientApi, 'aws-sdk-sts/client_api'
|
49
|
+
module Plugins
|
50
|
+
autoload :Endpoints, 'aws-sdk-sts/plugins/endpoints.rb'
|
51
|
+
end
|
52
|
+
autoload :Client, 'aws-sdk-sts/client'
|
53
|
+
autoload :Errors, 'aws-sdk-sts/errors'
|
54
|
+
autoload :Resource, 'aws-sdk-sts/resource'
|
55
|
+
autoload :EndpointParameters, 'aws-sdk-sts/endpoint_parameters'
|
56
|
+
autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
|
57
|
+
autoload :Endpoints, 'aws-sdk-sts/endpoints'
|
56
58
|
|
57
|
-
GEM_VERSION = '3.
|
59
|
+
GEM_VERSION = '3.209.1'
|
58
60
|
|
59
61
|
end
|
62
|
+
|
63
|
+
require_relative 'aws-sdk-sts/customizations'
|
@@ -27,6 +27,12 @@ module Seahorse
|
|
27
27
|
class Handler < Client::Handler
|
28
28
|
|
29
29
|
def call(context)
|
30
|
+
span_wrapper(context) { _call(context) }
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def _call(context)
|
30
36
|
stream = nil
|
31
37
|
begin
|
32
38
|
conn = context.client.connection
|
@@ -80,8 +86,6 @@ module Seahorse
|
|
80
86
|
)
|
81
87
|
end
|
82
88
|
|
83
|
-
private
|
84
|
-
|
85
89
|
def _register_callbacks(resp, stream, stream_mutex, close_condition, sync_queue)
|
86
90
|
stream.on(:headers) do |headers|
|
87
91
|
resp.signal_headers(headers)
|
@@ -146,8 +150,14 @@ module Seahorse
|
|
146
150
|
end
|
147
151
|
end
|
148
152
|
|
153
|
+
def span_wrapper(context, &block)
|
154
|
+
context.tracer.in_span(
|
155
|
+
'Handler.H2',
|
156
|
+
attributes: Aws::Telemetry.http_request_attrs(context),
|
157
|
+
&block
|
158
|
+
)
|
159
|
+
end
|
149
160
|
end
|
150
|
-
|
151
161
|
end
|
152
162
|
end
|
153
163
|
end
|