aws-sdk-core 3.223.0 → 3.224.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bcb0110594bec22b5593c8d4fe02b0cff59e99e40c95179b1426883318147619
4
- data.tar.gz: 47f4d6282b031eb9e610989612f062b0c23ffac6cf30568e765054b44b5dfab5
3
+ metadata.gz: 56ba5589862b40cf99f648e87923d49a121c32270c50770ed1560edef1b9c3f9
4
+ data.tar.gz: cd63b44949e52a267ff6dba2dbfeb8676a6a0f4f9b64713177d85e967ee8f3cb
5
5
  SHA512:
6
- metadata.gz: bec06ad0b3e8cb6324edf38fe91d10739dfe050ddcfffec23d0ccc55343928bc31016b3b27e87395936bfe870d13dae8a2a1adf95c8852b50d12d101cbd7269d
7
- data.tar.gz: 0f9b439811d2e4315cca0d08084f9816c396b5fe1f7057dd71ca5bfa8ad3c5e84ce5e5ab7cfe1e9d12cc3e6ac0e9ab7d05efb11335f2cb6e7676f3b1d75581f5
6
+ metadata.gz: 776326554fa8287dad3c9da9fe1cf56d8e7cf633033d2b52715f1caf841911f28f16f4719c67ec205ba841dd3ca23c7727992fd3aec840dd94777394681e0e28
7
+ data.tar.gz: dc916c4151cb13f82fb6640bc14b109cdaf6dcc5dce685477cd2adf1321041095254f886e628548a2232c62c8c76e542bf8378132216a7694d801418aaadfdac
data/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.224.0 (2025-05-12)
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 - Support `ENV['AWS_DISABLE_HOST_PREFIX_INJECTION']` and `disable_host_prefix_injection` shared config to disable host prefix injection for all services.
14
+
4
15
  3.223.0 (2025-05-01)
5
16
  ------------------
6
17
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.223.0
1
+ 3.224.0
@@ -4,62 +4,70 @@ module Aws
4
4
  module Plugins
5
5
  # @api private
6
6
  class EndpointPattern < Seahorse::Client::Plugin
7
-
8
- option(:disable_host_prefix_injection,
7
+ option(
8
+ :disable_host_prefix_injection,
9
9
  default: false,
10
10
  doc_type: 'Boolean',
11
- docstring: <<-DOCS
12
- Set to true to disable SDK automatically adding host prefix
13
- to default service endpoint when available.
14
- DOCS
15
- )
11
+ docstring: 'When `true`, the SDK will not prepend the modeled host prefix to the endpoint.'
12
+ ) do |cfg|
13
+ resolve_disable_host_prefix_injection(cfg)
14
+ end
16
15
 
17
- def add_handlers(handlers, config)
16
+ def add_handlers(handlers, _config)
18
17
  handlers.add(Handler, priority: 10)
19
18
  end
20
19
 
21
- class Handler < Seahorse::Client::Handler
20
+ class << self
21
+ private
22
+
23
+ def resolve_disable_host_prefix_injection(cfg)
24
+ value = ENV['AWS_DISABLE_HOST_PREFIX_INJECTION'] ||
25
+ Aws.shared_config.disable_host_prefix_injection(profile: cfg.profile) ||
26
+ 'false'
27
+ value = Aws::Util.str_2_bool(value)
28
+ unless [true, false].include?(value)
29
+ raise ArgumentError,
30
+ 'Must provide either `true` or `false` for '\
31
+ 'disable_host_prefix_injection profile option or for '\
32
+ 'ENV[\'AWS_DISABLE_HOST_PREFIX_INJECTION\']'
33
+ end
34
+ value
35
+ end
36
+ end
22
37
 
38
+ # @api private
39
+ class Handler < Seahorse::Client::Handler
23
40
  def call(context)
24
- if !context.config.disable_host_prefix_injection
41
+ unless context.config.disable_host_prefix_injection
25
42
  endpoint_trait = context.operation.endpoint_pattern
26
- if endpoint_trait && !endpoint_trait.empty?
27
- _apply_endpoint_trait(context, endpoint_trait)
28
- end
43
+ apply_endpoint_trait(context, endpoint_trait) if endpoint_trait && !endpoint_trait.empty?
29
44
  end
30
45
  @handler.call(context)
31
46
  end
32
47
 
33
48
  private
34
49
 
35
- def _apply_endpoint_trait(context, trait)
36
- # currently only support host pattern
37
- ori_host = context.http_request.endpoint.host
38
- if pattern = trait['hostPrefix']
39
- host_prefix = pattern.gsub(/\{.+?\}/) do |label|
40
- label = label.delete("{}")
41
- _replace_label_value(
42
- ori_host, label, context.operation.input, context.params)
43
- end
44
- context.http_request.endpoint.host = host_prefix + context.http_request.endpoint.host
50
+ def apply_endpoint_trait(context, trait)
51
+ pattern = trait['hostPrefix']
52
+ return unless pattern
53
+
54
+ host_prefix = pattern.gsub(/\{.+?}/) do |label|
55
+ label = label.delete('{}')
56
+ replace_label_value(label, context.operation.input, context.params)
45
57
  end
58
+ context.http_request.endpoint.host = host_prefix + context.http_request.endpoint.host
46
59
  end
47
60
 
48
- def _replace_label_value(ori, label, input_ref, params)
61
+ def replace_label_value(label, input_ref, params)
49
62
  name = nil
50
63
  input_ref.shape.members.each do |m_name, ref|
51
- if ref['hostLabel'] && ref['hostLabelName'] == label
52
- name = m_name
53
- end
54
- end
55
- if name.nil? || params[name].nil?
56
- raise Errors::MissingEndpointHostLabelValue.new(name)
64
+ name = m_name if ref['hostLabel'] && ref['hostLabelName'] == label
57
65
  end
66
+ raise Errors::MissingEndpointHostLabelValue, name if name.nil? || params[name].nil?
67
+
58
68
  params[name]
59
69
  end
60
-
61
70
  end
62
-
63
71
  end
64
72
  end
65
73
  end
@@ -212,6 +212,7 @@ module Aws
212
212
  :ec2_metadata_service_endpoint,
213
213
  :ec2_metadata_service_endpoint_mode,
214
214
  :ec2_metadata_v1_disabled,
215
+ :disable_host_prefix_injection,
215
216
  :max_attempts,
216
217
  :retry_mode,
217
218
  :adaptive_retry_wait_to_fill,
@@ -200,8 +200,7 @@ module Aws::SSO
200
200
  # accepted modes and the configuration defaults that are included.
201
201
  #
202
202
  # @option options [Boolean] :disable_host_prefix_injection (false)
203
- # Set to true to disable SDK automatically adding host prefix
204
- # to default service endpoint when available.
203
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
205
204
  #
206
205
  # @option options [Boolean] :disable_request_compression (false)
207
206
  # When set to 'true' the request body will not be compressed
@@ -692,7 +691,7 @@ module Aws::SSO
692
691
  tracer: tracer
693
692
  )
694
693
  context[:gem_name] = 'aws-sdk-core'
695
- context[:gem_version] = '3.223.0'
694
+ context[:gem_version] = '3.224.0'
696
695
  Seahorse::Client::Request.new(handlers, context)
697
696
  end
698
697
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::SSO
56
56
  autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sso/endpoints'
58
58
 
59
- GEM_VERSION = '3.223.0'
59
+ GEM_VERSION = '3.224.0'
60
60
 
61
61
  end
62
62
 
@@ -200,8 +200,7 @@ module Aws::SSOOIDC
200
200
  # accepted modes and the configuration defaults that are included.
201
201
  #
202
202
  # @option options [Boolean] :disable_host_prefix_injection (false)
203
- # Set to true to disable SDK automatically adding host prefix
204
- # to default service endpoint when available.
203
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
205
204
  #
206
205
  # @option options [Boolean] :disable_request_compression (false)
207
206
  # When set to 'true' the request body will not be compressed
@@ -1062,7 +1061,7 @@ module Aws::SSOOIDC
1062
1061
  tracer: tracer
1063
1062
  )
1064
1063
  context[:gem_name] = 'aws-sdk-core'
1065
- context[:gem_version] = '3.223.0'
1064
+ context[:gem_version] = '3.224.0'
1066
1065
  Seahorse::Client::Request.new(handlers, context)
1067
1066
  end
1068
1067
 
@@ -56,7 +56,7 @@ module Aws::SSOOIDC
56
56
  autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
58
58
 
59
- GEM_VERSION = '3.223.0'
59
+ GEM_VERSION = '3.224.0'
60
60
 
61
61
  end
62
62
 
@@ -202,8 +202,7 @@ module Aws::STS
202
202
  # accepted modes and the configuration defaults that are included.
203
203
  #
204
204
  # @option options [Boolean] :disable_host_prefix_injection (false)
205
- # Set to true to disable SDK automatically adding host prefix
206
- # to default service endpoint when available.
205
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
207
206
  #
208
207
  # @option options [Boolean] :disable_request_compression (false)
209
208
  # When set to 'true' the request body will not be compressed
@@ -2595,7 +2594,7 @@ module Aws::STS
2595
2594
  tracer: tracer
2596
2595
  )
2597
2596
  context[:gem_name] = 'aws-sdk-core'
2598
- context[:gem_version] = '3.223.0'
2597
+ context[:gem_version] = '3.224.0'
2599
2598
  Seahorse::Client::Request.new(handlers, context)
2600
2599
  end
2601
2600
 
data/lib/aws-sdk-sts.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::STS
56
56
  autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sts/endpoints'
58
58
 
59
- GEM_VERSION = '3.223.0'
59
+ GEM_VERSION = '3.224.0'
60
60
 
61
61
  end
62
62
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.223.0
4
+ version: 3.224.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services