aws-sdk-core 3.121.6 → 3.122.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: 2d1e4fbf8c98bc0d54f4f6ec16a185ed87bb223549e5766fc8a1b62e63f601d7
4
- data.tar.gz: 6664442786370782a056f504b193210b21b0ee5fe174c68fbd962bf37aec9407
3
+ metadata.gz: 41135e32f0e535e0205dbf19edc735e9dcbcc1098355cd95b0c1a4fc336e9176
4
+ data.tar.gz: 0e0282593133b8947242ee334661728764de5932e1e2e22b105ab4648da46128
5
5
  SHA512:
6
- metadata.gz: 512190e5152cf45e7adc39ea601302174297aee06d6c9cba16bbb91392265390e3afa300f5c3f0e0acd5f6006bac73d45344b25a0f843a22cbffdec115035eee
7
- data.tar.gz: bda1e426b67de3c684269c9bd1027ce059263b45b89c907019a26dd856421fc93f8558c3d3b3e77f6caa3d8c0a807e1d407d4d16b28e98d5fc40e547cc8c7ca1
6
+ metadata.gz: 17dafa3b644e7cf3c72283e07e6ef951490b9ab4d3a30a34a871a4431185619f906c4e63d914515a654d1ab10e40d656a3faa6786e2e25cbd76d01859a197c56
7
+ data.tar.gz: e9cc0efc4f6a4021c1d3ba497f335899444befabf8f4b645ed4fc0f1c10c8ca208cb85fe350f6f21248ca34ebbe5d313b1457502a3e06951a3b12f8437709b2a
data/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.122.0 (2021-11-04)
5
+ ------------------
6
+
7
+ * Feature - Updated Aws::STS::Client with the latest API changes.
8
+
9
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
10
+
11
+ * Issue - Fix parsing of ISO8601 timestamps with millisecond precision in headers.
12
+
13
+ * Feature - Support modeled dualstack endpoints. It can be configured with shared configuration (`use_dualstack_endpoint`), an ENV variable (`AWS_USE_DUALSTACK_ENDPOINT`), and a constructor option (`:use_dualstack_endpoint`). Requests made to services without a dualstack endpoint will fail.
14
+
15
+ * Feature - Support modeled fips endpoints. It can be configured with shared configuration (`use_fips_endpoint`), an ENV variable (`AWS_USE_FIPS_ENDPOINT`), and a constructor option (`:use_fips_endpoint`). Requests made to services without a fips endpoint will fail.
16
+
4
17
  3.121.6 (2021-11-02)
5
18
  ------------------
6
19
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.121.6
1
+ 3.122.0
@@ -24,6 +24,25 @@ a default `:region` is searched for in the following locations:
24
24
  resolve_region(cfg)
25
25
  end
26
26
 
27
+ option(:use_dualstack_endpoint,
28
+ doc_type: 'Boolean',
29
+ docstring: <<-DOCS) do |cfg|
30
+ When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
31
+ will be used if available.
32
+ DOCS
33
+ resolve_use_dualstack_endpoint(cfg)
34
+ end
35
+
36
+ option(:use_fips_endpoint,
37
+ doc_type: 'Boolean',
38
+ docstring: <<-DOCS) do |cfg|
39
+ When set to `true`, fips compatible endpoints will be used if available.
40
+ When a `fips` region is used, the region is normalized and this config
41
+ is set to `true`.
42
+ DOCS
43
+ resolve_use_fips_endpoint(cfg)
44
+ end
45
+
27
46
  option(:regional_endpoint, false)
28
47
 
29
48
  option(:endpoint, doc_type: String, docstring: <<-DOCS) do |cfg|
@@ -42,10 +61,23 @@ to test or custom endpoints. This should be a valid HTTP(S) URI.
42
61
  raise Errors::InvalidRegionError
43
62
  end
44
63
 
64
+ region = cfg.region
65
+ new_region = region.gsub('fips-', '').gsub('-fips', '')
66
+ if region != new_region
67
+ warn("Legacy region #{region} was transformed to #{new_region}."\
68
+ '`use_fips_endpoint` config was set to true.')
69
+ cfg.override_config(:use_fips_endpoint, true)
70
+ cfg.override_config(:region, new_region)
71
+ end
72
+
45
73
  Aws::Partitions::EndpointProvider.resolve(
46
74
  cfg.region,
47
75
  endpoint_prefix,
48
- sts_regional
76
+ sts_regional,
77
+ {
78
+ dualstack: cfg.use_dualstack_endpoint,
79
+ fips: cfg.use_fips_endpoint
80
+ }
49
81
  )
50
82
  end
51
83
  end
@@ -66,6 +98,20 @@ to test or custom endpoints. This should be a valid HTTP(S) URI.
66
98
  cfg_region = Aws.shared_config.region(profile: cfg.profile)
67
99
  env_region || cfg_region
68
100
  end
101
+
102
+ def resolve_use_dualstack_endpoint(cfg)
103
+ value = ENV['AWS_USE_DUALSTACK_ENDPOINT']
104
+ value ||= Aws.shared_config.use_dualstack_endpoint(
105
+ profile: cfg.profile
106
+ )
107
+ Aws::Util.str_2_bool(value) || false
108
+ end
109
+
110
+ def resolve_use_fips_endpoint(cfg)
111
+ value = ENV['AWS_USE_FIPS_ENDPOINT']
112
+ value ||= Aws.shared_config.use_fips_endpoint(profile: cfg.profile)
113
+ Aws::Util.str_2_bool(value) || false
114
+ end
69
115
  end
70
116
  end
71
117
  end
@@ -41,7 +41,7 @@ module Aws
41
41
  when FloatShape then value.to_f
42
42
  when BooleanShape then value == 'true'
43
43
  when TimestampShape
44
- if value =~ /\d+(\.\d*)/
44
+ if value =~ /^\d+(\.\d*)/
45
45
  Time.at(value.to_f)
46
46
  elsif value =~ /^\d+$/
47
47
  Time.at(value.to_i)
@@ -163,6 +163,8 @@ module Aws
163
163
  :ca_bundle,
164
164
  :credential_process,
165
165
  :endpoint_discovery_enabled,
166
+ :use_dualstack_endpoint,
167
+ :use_fips_endpoint,
166
168
  :ec2_metadata_service_endpoint,
167
169
  :ec2_metadata_service_endpoint_mode,
168
170
  :max_attempts,
data/lib/aws-sdk-core.rb CHANGED
@@ -88,6 +88,9 @@ require_relative 'aws-sdk-core/arn'
88
88
  require_relative 'aws-sdk-core/arn_parser'
89
89
  require_relative 'aws-sdk-core/ec2_metadata'
90
90
 
91
+ # plugins
92
+ # loaded through building STS or SSO ..
93
+
91
94
  # aws-sdk-sts is included to support Aws::AssumeRoleCredentials
92
95
  require_relative 'aws-sdk-sts'
93
96
 
@@ -275,6 +275,15 @@ module Aws::SSO
275
275
  # ** Please note ** When response stubbing is enabled, no HTTP
276
276
  # requests are made, and retries are disabled.
277
277
  #
278
+ # @option options [Boolean] :use_dualstack_endpoint
279
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
280
+ # will be used if available.
281
+ #
282
+ # @option options [Boolean] :use_fips_endpoint
283
+ # When set to `true`, fips compatible endpoints will be used if available.
284
+ # When a `fips` region is used, the region is normalized and this config
285
+ # is set to `true`.
286
+ #
278
287
  # @option options [Boolean] :validate_params (true)
279
288
  # When `true`, request parameters are validated before
280
289
  # sending the request.
@@ -521,7 +530,7 @@ module Aws::SSO
521
530
  params: params,
522
531
  config: config)
523
532
  context[:gem_name] = 'aws-sdk-core'
524
- context[:gem_version] = '3.121.6'
533
+ context[:gem_version] = '3.122.0'
525
534
  Seahorse::Client::Request.new(handlers, context)
526
535
  end
527
536
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -50,6 +50,6 @@ require_relative 'aws-sdk-sso/customizations'
50
50
  # @!group service
51
51
  module Aws::SSO
52
52
 
53
- GEM_VERSION = '3.121.6'
53
+ GEM_VERSION = '3.122.0'
54
54
 
55
55
  end
@@ -282,6 +282,15 @@ module Aws::STS
282
282
  # ** Please note ** When response stubbing is enabled, no HTTP
283
283
  # requests are made, and retries are disabled.
284
284
  #
285
+ # @option options [Boolean] :use_dualstack_endpoint
286
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
287
+ # will be used if available.
288
+ #
289
+ # @option options [Boolean] :use_fips_endpoint
290
+ # When set to `true`, fips compatible endpoints will be used if available.
291
+ # When a `fips` region is used, the region is normalized and this config
292
+ # is set to `true`.
293
+ #
285
294
  # @option options [Boolean] :validate_params (true)
286
295
  # When `true`, request parameters are validated before
287
296
  # sending the request.
@@ -2303,7 +2312,7 @@ module Aws::STS
2303
2312
  params: params,
2304
2313
  config: config)
2305
2314
  context[:gem_name] = 'aws-sdk-core'
2306
- context[:gem_version] = '3.121.6'
2315
+ context[:gem_version] = '3.122.0'
2307
2316
  Seahorse::Client::Request.new(handlers, context)
2308
2317
  end
2309
2318
 
@@ -53,7 +53,13 @@ module Aws
53
53
  )
54
54
 
55
55
  url = Aws::Partitions::EndpointProvider.resolve(
56
- req.context.config.region, 'sts', 'regional'
56
+ req.context.config.region,
57
+ 'sts',
58
+ req.context.config.sts_regional_endpoints,
59
+ {
60
+ dualstack: req.context.config.use_dualstack_endpoint,
61
+ fips: req.context.config.use_fips_endpoint
62
+ }
57
63
  )
58
64
  url += "/?#{param_list}"
59
65
 
data/lib/aws-sdk-sts.rb CHANGED
@@ -50,6 +50,6 @@ require_relative 'aws-sdk-sts/customizations'
50
50
  # @!group service
51
51
  module Aws::STS
52
52
 
53
- GEM_VERSION = '3.121.6'
53
+ GEM_VERSION = '3.122.0'
54
54
 
55
55
  end
@@ -195,6 +195,10 @@ module Seahorse
195
195
  @members.include?(method_name) or super
196
196
  end
197
197
 
198
+ def override_config(k, v)
199
+ @struct[k] = v
200
+ end
201
+
198
202
  private
199
203
 
200
204
  def value_at(opt_name)
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.121.6
4
+ version: 3.122.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: 2021-11-02 00:00:00.000000000 Z
11
+ date: 2021-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '1'
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 1.520.1
36
+ version: 1.525.0
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '1'
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 1.520.1
46
+ version: 1.525.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: aws-sigv4
49
49
  requirement: !ruby/object:Gem::Requirement