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
@@ -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
|
@@ -34,7 +34,9 @@ module Seahorse
|
|
34
34
|
ssl_ca_bundle: nil,
|
35
35
|
ssl_ca_directory: nil,
|
36
36
|
ssl_ca_store: nil,
|
37
|
-
ssl_timeout: nil
|
37
|
+
ssl_timeout: nil,
|
38
|
+
ssl_cert: nil,
|
39
|
+
ssl_key: nil
|
38
40
|
}
|
39
41
|
|
40
42
|
# @api private
|
@@ -246,7 +248,9 @@ module Seahorse
|
|
246
248
|
:ssl_ca_bundle => options[:ssl_ca_bundle],
|
247
249
|
:ssl_ca_directory => options[:ssl_ca_directory],
|
248
250
|
:ssl_ca_store => options[:ssl_ca_store],
|
249
|
-
:ssl_timeout => options[:ssl_timeout]
|
251
|
+
:ssl_timeout => options[:ssl_timeout],
|
252
|
+
:ssl_cert => options[:ssl_cert],
|
253
|
+
:ssl_key => options[:ssl_key]
|
250
254
|
}
|
251
255
|
end
|
252
256
|
|
@@ -291,6 +295,8 @@ module Seahorse
|
|
291
295
|
http.ca_file = ssl_ca_bundle if ssl_ca_bundle
|
292
296
|
http.ca_path = ssl_ca_directory if ssl_ca_directory
|
293
297
|
http.cert_store = ssl_ca_store if ssl_ca_store
|
298
|
+
http.cert = ssl_cert if ssl_cert
|
299
|
+
http.key = ssl_key if ssl_key
|
294
300
|
else
|
295
301
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
296
302
|
end
|
@@ -42,7 +42,13 @@ module Seahorse
|
|
42
42
|
# @param [RequestContext] context
|
43
43
|
# @return [Response]
|
44
44
|
def call(context)
|
45
|
-
|
45
|
+
span_wrapper(context) do
|
46
|
+
transmit(
|
47
|
+
context.config,
|
48
|
+
context.http_request,
|
49
|
+
context.http_response
|
50
|
+
)
|
51
|
+
end
|
46
52
|
Response.new(context: context)
|
47
53
|
end
|
48
54
|
|
@@ -192,6 +198,17 @@ module Seahorse
|
|
192
198
|
end
|
193
199
|
end
|
194
200
|
|
201
|
+
def span_wrapper(context, &block)
|
202
|
+
context.tracer.in_span(
|
203
|
+
'Handler.NetHttp',
|
204
|
+
attributes: Aws::Telemetry.http_request_attrs(context)
|
205
|
+
) do |span|
|
206
|
+
block.call
|
207
|
+
span.add_attributes(
|
208
|
+
Aws::Telemetry.http_response_attrs(context)
|
209
|
+
)
|
210
|
+
end
|
211
|
+
end
|
195
212
|
end
|
196
213
|
end
|
197
214
|
end
|
@@ -70,6 +70,15 @@ Sets the X509::Store to verify peer certificate.
|
|
70
70
|
resolve_ssl_timeout(cfg)
|
71
71
|
end
|
72
72
|
|
73
|
+
option(:ssl_cert, default: nil, doc_type: OpenSSL::X509::Certificate, docstring: <<-DOCS)
|
74
|
+
Sets a client certificate when creating http connections.
|
75
|
+
DOCS
|
76
|
+
|
77
|
+
|
78
|
+
option(:ssl_key, default: nil, doc_type: OpenSSL::PKey, docstring: <<-DOCS)
|
79
|
+
Sets a client key when creating http connections.
|
80
|
+
DOCS
|
81
|
+
|
73
82
|
option(:logger) # for backwards compat
|
74
83
|
|
75
84
|
handler(Client::NetHttp::Handler, step: :send)
|
@@ -9,11 +9,14 @@ module Seahorse
|
|
9
9
|
# @option options [required,Symbol] :operation_name (nil)
|
10
10
|
# @option options [required,Model::Operation] :operation (nil)
|
11
11
|
# @option options [Model::Authorizer] :authorizer (nil)
|
12
|
+
# @option options [Client] :client (nil)
|
12
13
|
# @option options [Hash] :params ({})
|
13
14
|
# @option options [Configuration] :config (nil)
|
14
15
|
# @option options [Http::Request] :http_request (Http::Request.new)
|
15
16
|
# @option options [Http::Response] :http_response (Http::Response.new)
|
16
|
-
#
|
17
|
+
# @option options [Integer] :retries (0)
|
18
|
+
# @option options [Aws::Telemetry::TracerBase] :tracer (Aws::Telemetry::NoOpTracer.new)
|
19
|
+
# @options options [Hash] :metadata ({})
|
17
20
|
def initialize(options = {})
|
18
21
|
@operation_name = options[:operation_name]
|
19
22
|
@operation = options[:operation]
|
@@ -24,6 +27,7 @@ module Seahorse
|
|
24
27
|
@http_request = options[:http_request] || Http::Request.new
|
25
28
|
@http_response = options[:http_response] || Http::Response.new
|
26
29
|
@retries = 0
|
30
|
+
@tracer = options[:tracer] || Aws::Telemetry::NoOpTracer.new
|
27
31
|
@metadata = {}
|
28
32
|
end
|
29
33
|
|
@@ -54,6 +58,9 @@ module Seahorse
|
|
54
58
|
# @return [Integer]
|
55
59
|
attr_accessor :retries
|
56
60
|
|
61
|
+
# @return [Tracer]
|
62
|
+
attr_accessor :tracer
|
63
|
+
|
57
64
|
# @return [Hash]
|
58
65
|
attr_reader :metadata
|
59
66
|
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Aws
|
2
|
+
module Telemetry
|
3
|
+
class TelemetryProviderBase
|
4
|
+
def initialize: (?tracer_provider: TracerProviderBase, ?context_manager: ContextManagerBase) -> void
|
5
|
+
attr_reader tracer_provider: TracerProviderBase
|
6
|
+
|
7
|
+
attr_reader context_manager: ContextManagerBase
|
8
|
+
end
|
9
|
+
|
10
|
+
class TracerProviderBase
|
11
|
+
def tracer: (?String name) -> TracerBase
|
12
|
+
end
|
13
|
+
|
14
|
+
class TracerBase
|
15
|
+
def start_span: (String name, ?untyped with_parent, ?Hash[String, untyped] attributes, ?SpanKind kind) -> SpanBase
|
16
|
+
|
17
|
+
def in_span: (String name, ?Hash[String, untyped] attributes, ?SpanKind kind) -> SpanBase
|
18
|
+
|
19
|
+
def current_span: () -> SpanBase
|
20
|
+
end
|
21
|
+
|
22
|
+
class SpanBase
|
23
|
+
def set_attribute: (String key, untyped value) -> self
|
24
|
+
alias []= set_attribute
|
25
|
+
|
26
|
+
def add_attributes: (Hash[String, untyped] attributes) -> self
|
27
|
+
|
28
|
+
def add_event: (String name, ?Hash[String, untyped] attributes) -> self
|
29
|
+
|
30
|
+
def status=: (SpanStatus status) -> void
|
31
|
+
|
32
|
+
def finish: (?Time end_timestamp) -> self
|
33
|
+
|
34
|
+
def record_exception: (untyped exception, ?Hash[String, untyped] attributes) -> void
|
35
|
+
end
|
36
|
+
|
37
|
+
class ContextManagerBase
|
38
|
+
def current: () -> untyped
|
39
|
+
|
40
|
+
def attach: (untyped context) -> untyped
|
41
|
+
|
42
|
+
def detach: (untyped token) -> bool
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Aws
|
2
|
+
module Telemetry
|
3
|
+
class OTelProvider < TelemetryProviderBase
|
4
|
+
def initialize: () -> void
|
5
|
+
end
|
6
|
+
|
7
|
+
class OTelTracerProvider < TracerProviderBase
|
8
|
+
def initialize: () -> void
|
9
|
+
end
|
10
|
+
|
11
|
+
class OTelTracer < TracerBase
|
12
|
+
def initialize: (untyped tracer) -> void
|
13
|
+
end
|
14
|
+
|
15
|
+
class OTelSpan < SpanBase
|
16
|
+
def initialize: (untyped span) -> void
|
17
|
+
end
|
18
|
+
|
19
|
+
class OTelContextManager < ContextManagerBase
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|