aws-sdk-core 3.173.1 → 3.175.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a894a8fe85e4f69dec182fc6f18a3dae49ae5ef9ecc91eb404e555098692964
4
- data.tar.gz: 364fa57f088c9d15a450e6de2de3554e50fac98f764de451cc2d890bead5a420
3
+ metadata.gz: 00b5dd5634edc052e3a3b44da5f1d06a96c5897585de71fe994130a991bf7cee
4
+ data.tar.gz: 4aab11d507d492ed8b2eec6123bb9170c5271c40b42afb026dd844dbb082786f
5
5
  SHA512:
6
- metadata.gz: c381bf0f39f79c2dd992c4f20b4ffacd682dbe226be85fdb261cc5d654b703e9933e70eea27c1b91a16165e9a817731b1b20647bd15ca09162775035e6aea16b
7
- data.tar.gz: b72446b6983d65b96baba7248eba2dc00bca0a1a5c4ac96ad3d7c7a008fb95354d17182ae184abb59874130e96136e7bdb8ed4b9df987619761420903bce16a6
6
+ metadata.gz: e85525d950b0e7dbe029a0b8c45661edf1ed398d32f4e63b2f0641d6febbdfee370701309719146e5da98415233d2a978fc88905e4fc1073cd95dca42cd13eff
7
+ data.tar.gz: 3a9c20834b4b0f8faf9fdbc3963156cf996719f1f1051ae4b8e251f5f32ec45a7f072b9c0f007cbbeabcc6496aa6f473f840ee338d97e3f227b72217d53f2cba
data/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.175.0 (2023-06-15)
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
+ 3.174.0 (2023-05-31)
14
+ ------------------
15
+
16
+ * Feature - Updated Aws::STS::Client with the latest API changes.
17
+
18
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
19
+
20
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
21
+
22
+ * Feature - Improve User-Agent metrics tracking.
23
+
4
24
  3.173.1 (2023-05-24)
5
25
  ------------------
6
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.173.1
1
+ 3.175.0
@@ -20,7 +20,7 @@ module Aws
20
20
  # * Globally via the "AWS_DEFAULTS_MODE" environment variable.
21
21
  #
22
22
  #
23
- # @code_generation START - documentation
23
+ # #defaults START - documentation
24
24
  # The following `:default_mode` values are supported:
25
25
  #
26
26
  # * `'standard'` -
@@ -105,10 +105,10 @@ module Aws
105
105
  # [2]: https://docs.aws.amazon.com/sdkref/latest/guide/setting-global-retry_mode.html
106
106
  # [3]: https://docs.aws.amazon.com/sdkref/latest/guide/setting-global-sts_regional_endpoints.html
107
107
  #
108
- # @code_generation END - documentation
108
+ # #defaults END - documentation
109
109
  module DefaultsModeConfiguration
110
110
  # @api private
111
- # @code_generation START - configuration
111
+ # #defaults START - configuration
112
112
  SDK_DEFAULT_CONFIGURATION =
113
113
  {
114
114
  "version" => 1,
@@ -148,6 +148,6 @@ module Aws
148
148
  }
149
149
  }
150
150
  }
151
- # @code_generation END - configuration
151
+ # #defaults END - configuration
152
152
  end
153
153
  end
@@ -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
- request.send_request
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
- ua = "aws-sdk-ruby3/#{CORE_GEM_VERSION}"
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
- begin
20
- ua += " #{RUBY_ENGINE}/#{RUBY_VERSION}"
21
- rescue
22
- ua += " RUBY_ENGINE_NA/#{RUBY_VERSION}"
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
- ua += " #{RUBY_PLATFORM}"
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
- if context[:gem_name] && context[:gem_version]
28
- ua += " #{context[:gem_name]}/#{context[:gem_version]}"
109
+ def config_metadata
110
+ "cfg/retry-mode##{@context.config.retry_mode}"
29
111
  end
30
112
 
31
- if (execution_env = ENV['AWS_EXECUTION_ENV'])
32
- ua += " exec-env/#{execution_env}"
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
- if context.config.user_agent_suffix
36
- ua += " #{context.config.user_agent_suffix}"
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
- context.http_request.headers['User-Agent'] = ua.strip
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
@@ -197,7 +197,8 @@ module Aws
197
197
  :s3_use_arn_region,
198
198
  :s3_us_east_1_regional_endpoint,
199
199
  :s3_disable_multiregion_access_points,
200
- :defaults_mode
200
+ :defaults_mode,
201
+ :sdk_ua_app_id
201
202
  )
202
203
 
203
204
  private
@@ -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
- req.send_request
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)
@@ -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.173.1'
593
+ context[:gem_version] = '3.175.0'
589
594
  Seahorse::Client::Request.new(handlers, context)
590
595
  end
591
596
 
@@ -9,6 +9,7 @@
9
9
 
10
10
 
11
11
  module Aws::SSO
12
+ # @api private
12
13
  module Endpoints
13
14
 
14
15
  class GetRoleCredentials
data/lib/aws-sdk-sso.rb CHANGED
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-sso/customizations'
54
54
  # @!group service
55
55
  module Aws::SSO
56
56
 
57
- GEM_VERSION = '3.173.1'
57
+ GEM_VERSION = '3.175.0'
58
58
 
59
59
  end
@@ -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.173.1'
589
+ context[:gem_version] = '3.175.0'
585
590
  Seahorse::Client::Request.new(handlers, context)
586
591
  end
587
592
 
@@ -9,6 +9,7 @@
9
9
 
10
10
 
11
11
  module Aws::SSOOIDC
12
+ # @api private
12
13
  module Endpoints
13
14
 
14
15
  class CreateToken
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-ssooidc/customizations'
54
54
  # @!group service
55
55
  module Aws::SSOOIDC
56
56
 
57
- GEM_VERSION = '3.173.1'
57
+ GEM_VERSION = '3.175.0'
58
58
 
59
59
  end
@@ -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.173.1'
2322
+ context[:gem_version] = '3.175.0'
2318
2323
  Seahorse::Client::Request.new(handlers, context)
2319
2324
  end
2320
2325
 
@@ -9,6 +9,7 @@
9
9
 
10
10
 
11
11
  module Aws::STS
12
+ # @api private
12
13
  module Endpoints
13
14
 
14
15
  class AssumeRole
data/lib/aws-sdk-sts.rb CHANGED
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-sts/customizations'
54
54
  # @!group service
55
55
  module Aws::STS
56
56
 
57
- GEM_VERSION = '3.173.1'
57
+ GEM_VERSION = '3.175.0'
58
58
 
59
59
  end
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.173.1
4
+ version: 3.175.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-24 00:00:00.000000000 Z
11
+ date: 2023-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath