aws-sdk-core 3.173.1 → 3.174.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/pageable_response.rb +3 -1
- data/lib/aws-sdk-core/plugins/user_agent.rb +117 -14
- data/lib/aws-sdk-core/shared_config.rb +2 -1
- data/lib/aws-sdk-core/waiters/poller.rb +3 -1
- data/lib/aws-sdk-sso/client.rb +6 -1
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +6 -1
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +6 -1
- data/lib/aws-sdk-sts.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4ecec9eaf3fee0d30bdd88558775c3553537df9dfd3fe4f62b694cba78b7991
|
4
|
+
data.tar.gz: f99bff124648f74105f216af8de264e71151357a4ec645531d5c59dcfc696ef9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2753ea337d9adde1dab3fbe9d72fbb3f31e9a8061e1a7be017f0eb48a1b56958edd03f8b84c2d634ff10254e4a7a565b40163739497420d5171affd6c880600f
|
7
|
+
data.tar.gz: 767e58ebbbf1f3e95e835f86cffda3bc4ed9ba99f5fdc663fcb65c0996f15df918f30a6f27b8cf70b2c888a4dc315c9338c717508bc98f5e75b3f3568ff7a00b
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
3.174.0 (2023-05-31)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Updated Aws::STS::Client with the latest API changes.
|
8
|
+
|
9
|
+
* Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
|
10
|
+
|
11
|
+
* Feature - Updated Aws::SSO::Client with the latest API changes.
|
12
|
+
|
13
|
+
* Feature - Improve User-Agent metrics tracking.
|
14
|
+
|
4
15
|
3.173.1 (2023-05-24)
|
5
16
|
------------------
|
6
17
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.174.0
|
@@ -201,7 +201,9 @@ module Aws
|
|
201
201
|
def next_response(params)
|
202
202
|
params = next_page_params(params)
|
203
203
|
request = context.client.build_request(context.operation_name, params)
|
204
|
-
|
204
|
+
Aws::Plugins::UserAgent.feature('paginator') do
|
205
|
+
request.send_request
|
206
|
+
end
|
205
207
|
end
|
206
208
|
|
207
209
|
def next_page_params(params)
|
@@ -4,7 +4,31 @@ module Aws
|
|
4
4
|
module Plugins
|
5
5
|
# @api private
|
6
6
|
class UserAgent < Seahorse::Client::Plugin
|
7
|
+
# @api private
|
7
8
|
option(:user_agent_suffix)
|
9
|
+
# @api private
|
10
|
+
option(:user_agent_frameworks, default: [])
|
11
|
+
|
12
|
+
option(
|
13
|
+
:sdk_ua_app_id,
|
14
|
+
doc_type: 'String',
|
15
|
+
docstring: <<-DOCS) do |cfg|
|
16
|
+
A unique and opaque application ID that is appended to the
|
17
|
+
User-Agent header as app/<sdk_ua_app_id>. It should have a
|
18
|
+
maximum length of 50.
|
19
|
+
DOCS
|
20
|
+
app_id = ENV['AWS_SDK_UA_APP_ID']
|
21
|
+
app_id ||= Aws.shared_config.sdk_ua_app_id(profile: cfg.profile)
|
22
|
+
app_id
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.feature(feature, &block)
|
26
|
+
Thread.current[:aws_sdk_core_user_agent_feature] ||= []
|
27
|
+
Thread.current[:aws_sdk_core_user_agent_feature] << "ft/#{feature}"
|
28
|
+
block.call
|
29
|
+
ensure
|
30
|
+
Thread.current[:aws_sdk_core_user_agent_feature].pop
|
31
|
+
end
|
8
32
|
|
9
33
|
# @api private
|
10
34
|
class Handler < Seahorse::Client::Handler
|
@@ -14,33 +38,112 @@ module Aws
|
|
14
38
|
end
|
15
39
|
|
16
40
|
def set_user_agent(context)
|
17
|
-
|
41
|
+
context.http_request.headers['User-Agent'] = UserAgent.new(context).to_s
|
42
|
+
end
|
43
|
+
|
44
|
+
class UserAgent
|
45
|
+
def initialize(context)
|
46
|
+
@context = context
|
47
|
+
end
|
48
|
+
|
49
|
+
def to_s
|
50
|
+
ua = "aws-sdk-ruby3/#{CORE_GEM_VERSION}"
|
51
|
+
ua += ' ua/2.0'
|
52
|
+
ua += " #{api_metadata}" if api_metadata
|
53
|
+
ua += " #{os_metadata}"
|
54
|
+
ua += " #{language_metadata}"
|
55
|
+
ua += " #{env_metadata}" if env_metadata
|
56
|
+
ua += " #{config_metadata}" if config_metadata
|
57
|
+
ua += " #{app_id}" if app_id
|
58
|
+
ua += " #{feature_metadata}" if feature_metadata
|
59
|
+
ua += " #{framework_metadata}" if framework_metadata
|
60
|
+
if @context.config.user_agent_suffix
|
61
|
+
ua += " #{@context.config.user_agent_suffix}"
|
62
|
+
end
|
63
|
+
ua.strip
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
18
67
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
68
|
+
# Used to be gem_name/gem_version
|
69
|
+
def api_metadata
|
70
|
+
service_id = @context.config.api.metadata['serviceId']
|
71
|
+
return unless service_id
|
72
|
+
|
73
|
+
service_id = service_id.gsub(' ', '_').downcase
|
74
|
+
gem_version = @context[:gem_version]
|
75
|
+
"api/#{service_id}##{gem_version}"
|
76
|
+
end
|
77
|
+
|
78
|
+
# Used to be RUBY_PLATFORM
|
79
|
+
def os_metadata
|
80
|
+
os =
|
81
|
+
case RbConfig::CONFIG['host_os']
|
82
|
+
when /mac|darwin/
|
83
|
+
'macos'
|
84
|
+
when /linux|cygwin/
|
85
|
+
'linux'
|
86
|
+
when /mingw|mswin/
|
87
|
+
'windows'
|
88
|
+
else
|
89
|
+
'other'
|
90
|
+
end
|
91
|
+
metadata = "os/#{os}"
|
92
|
+
local_version = Gem::Platform.local.version
|
93
|
+
metadata += "##{local_version}" if local_version
|
94
|
+
metadata += " md/#{RbConfig::CONFIG['host_cpu']}"
|
95
|
+
metadata
|
23
96
|
end
|
24
97
|
|
25
|
-
|
98
|
+
# Used to be RUBY_ENGINE/RUBY_VERSION
|
99
|
+
def language_metadata
|
100
|
+
"lang/#{RUBY_ENGINE}##{RUBY_ENGINE_VERSION} md/#{RUBY_VERSION}"
|
101
|
+
end
|
102
|
+
|
103
|
+
def env_metadata
|
104
|
+
return unless (execution_env = ENV['AWS_EXECUTION_ENV'])
|
105
|
+
|
106
|
+
"exec-env/#{execution_env}"
|
107
|
+
end
|
26
108
|
|
27
|
-
|
28
|
-
|
109
|
+
def config_metadata
|
110
|
+
"cfg/retry-mode##{@context.config.retry_mode}"
|
29
111
|
end
|
30
112
|
|
31
|
-
|
32
|
-
|
113
|
+
def app_id
|
114
|
+
return unless (app_id = @context.config.sdk_ua_app_id)
|
115
|
+
|
116
|
+
# Sanitize and only allow these characters
|
117
|
+
app_id = app_id.gsub(/[^!#$%&'*+\-.^_`|~0-9A-Za-z]/, '-')
|
118
|
+
"app/#{app_id}"
|
33
119
|
end
|
34
120
|
|
35
|
-
|
36
|
-
|
121
|
+
def feature_metadata
|
122
|
+
return unless Thread.current[:aws_sdk_core_user_agent_feature]
|
123
|
+
|
124
|
+
Thread.current[:aws_sdk_core_user_agent_feature].join(' ')
|
37
125
|
end
|
38
126
|
|
39
|
-
|
127
|
+
def framework_metadata
|
128
|
+
if (frameworks_cfg = @context.config.user_agent_frameworks).empty?
|
129
|
+
return
|
130
|
+
end
|
131
|
+
|
132
|
+
# Frameworks may be aws-record, aws-sdk-rails, etc.
|
133
|
+
regex = /gems\/(?<name>#{frameworks_cfg.join('|')})-(?<version>\d+\.\d+\.\d+)/.freeze
|
134
|
+
frameworks = {}
|
135
|
+
Kernel.caller.each do |line|
|
136
|
+
match = line.match(regex)
|
137
|
+
next unless match
|
138
|
+
|
139
|
+
frameworks[match[:name]] = match[:version]
|
140
|
+
end
|
141
|
+
frameworks.map { |n, v| "lib/#{n}##{v}" }.join(' ')
|
142
|
+
end
|
40
143
|
end
|
41
144
|
end
|
42
145
|
|
43
|
-
handler(Handler)
|
146
|
+
handler(Handler, priority: 1)
|
44
147
|
end
|
45
148
|
end
|
46
149
|
end
|
@@ -62,7 +62,9 @@ module Aws
|
|
62
62
|
def send_request(options)
|
63
63
|
req = options[:client].build_request(@operation_name, options[:params])
|
64
64
|
req.handlers.remove(RAISE_HANDLER)
|
65
|
-
|
65
|
+
Aws::Plugins::UserAgent.feature('waiter') do
|
66
|
+
req.send_request
|
67
|
+
end
|
66
68
|
end
|
67
69
|
|
68
70
|
def acceptor_matches?(acceptor, response)
|
data/lib/aws-sdk-sso/client.rb
CHANGED
@@ -275,6 +275,11 @@ module Aws::SSO
|
|
275
275
|
# in the future.
|
276
276
|
#
|
277
277
|
#
|
278
|
+
# @option options [String] :sdk_ua_app_id
|
279
|
+
# A unique and opaque application ID that is appended to the
|
280
|
+
# User-Agent header as app/<sdk_ua_app_id>. It should have a
|
281
|
+
# maximum length of 50.
|
282
|
+
#
|
278
283
|
# @option options [String] :secret_access_key
|
279
284
|
#
|
280
285
|
# @option options [String] :session_token
|
@@ -585,7 +590,7 @@ module Aws::SSO
|
|
585
590
|
params: params,
|
586
591
|
config: config)
|
587
592
|
context[:gem_name] = 'aws-sdk-core'
|
588
|
-
context[:gem_version] = '3.
|
593
|
+
context[:gem_version] = '3.174.0'
|
589
594
|
Seahorse::Client::Request.new(handlers, context)
|
590
595
|
end
|
591
596
|
|
data/lib/aws-sdk-sso.rb
CHANGED
@@ -275,6 +275,11 @@ module Aws::SSOOIDC
|
|
275
275
|
# in the future.
|
276
276
|
#
|
277
277
|
#
|
278
|
+
# @option options [String] :sdk_ua_app_id
|
279
|
+
# A unique and opaque application ID that is appended to the
|
280
|
+
# User-Agent header as app/<sdk_ua_app_id>. It should have a
|
281
|
+
# maximum length of 50.
|
282
|
+
#
|
278
283
|
# @option options [String] :secret_access_key
|
279
284
|
#
|
280
285
|
# @option options [String] :session_token
|
@@ -581,7 +586,7 @@ module Aws::SSOOIDC
|
|
581
586
|
params: params,
|
582
587
|
config: config)
|
583
588
|
context[:gem_name] = 'aws-sdk-core'
|
584
|
-
context[:gem_version] = '3.
|
589
|
+
context[:gem_version] = '3.174.0'
|
585
590
|
Seahorse::Client::Request.new(handlers, context)
|
586
591
|
end
|
587
592
|
|
data/lib/aws-sdk-ssooidc.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -277,6 +277,11 @@ module Aws::STS
|
|
277
277
|
# in the future.
|
278
278
|
#
|
279
279
|
#
|
280
|
+
# @option options [String] :sdk_ua_app_id
|
281
|
+
# A unique and opaque application ID that is appended to the
|
282
|
+
# User-Agent header as app/<sdk_ua_app_id>. It should have a
|
283
|
+
# maximum length of 50.
|
284
|
+
#
|
280
285
|
# @option options [String] :secret_access_key
|
281
286
|
#
|
282
287
|
# @option options [String] :session_token
|
@@ -2314,7 +2319,7 @@ module Aws::STS
|
|
2314
2319
|
params: params,
|
2315
2320
|
config: config)
|
2316
2321
|
context[:gem_name] = 'aws-sdk-core'
|
2317
|
-
context[:gem_version] = '3.
|
2322
|
+
context[:gem_version] = '3.174.0'
|
2318
2323
|
Seahorse::Client::Request.new(handlers, context)
|
2319
2324
|
end
|
2320
2325
|
|
data/lib/aws-sdk-sts.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.174.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|