aws-sdk-core 3.193.0 → 3.194.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: 695fd9bb743f174c2d95150bbd990e4918a7ed369f302e76f8da7d280fc3f67a
4
- data.tar.gz: 1cde2df63d79f4a15723b62420c0e97b70e6cb42dff41e9116704c73a9793454
3
+ metadata.gz: 722f50328245a39f18cb52639414b319e70d1731ad38e555a7c57b67725e0d3a
4
+ data.tar.gz: 9fe0e1e6a73de18c19773e94e68af1afd8db7366a407bf1527932e16fa7380be
5
5
  SHA512:
6
- metadata.gz: f468ab811c2a74ab4dd844258ba6f8b5e515771c4409cd03018c5fd1a33b11cf50f03d43ea2efb5201fdf8cf4ffee83fc1cc7bec6016206a05e6b05b5dbdd160
7
- data.tar.gz: 44a637e590341dec00e23586c0c0d8881ad863aa94b73ddd75686fa08f2491e2c1d15fc8d409896cddee00e7eef0c585a98bf689249a9ae5839131f38e6d2ac9
6
+ metadata.gz: e040e52bbf5f89ca4f19658e17af770d4207c1c1ca92d377910472b99f69cd49474c7d321336315e3b9643efe18b2c4645dc0c66a1cd5bce5ea71d244c855432
7
+ data.tar.gz: 87abc4cf34f3d198a19d7a4818a3b62431dea78564adbec878177d15365209c52787a3d5ccb410506e48ea4f420f9f9bc52d5247957cf12f72f45cf7f1cc0230
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.194.0 (2024-04-30)
5
+ ------------------
6
+
7
+ * Feature - Add an API private cache for S3 Express and Access Grants.
8
+
4
9
  3.193.0 (2024-04-25)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.193.0
1
+ 3.194.0
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ # @api private
5
+ # A simple thread safe LRU cache
6
+ class LRUCache
7
+ # @param [Hash] options
8
+ # @option options [Integer] :max_entries (100) Maximum number of entries
9
+ # @option options [Integer] :expiration (nil) Expiration time in seconds
10
+ def initialize(options = {})
11
+ @max_entries = options[:max_entries] || 100
12
+ @expiration = options[:expiration]
13
+ @entries = {}
14
+ @mutex = Mutex.new
15
+ end
16
+
17
+ # @param [String] key
18
+ # @return [Object]
19
+ def [](key)
20
+ @mutex.synchronize do
21
+ value = @entries[key]
22
+ if value
23
+ @entries.delete(key)
24
+ @entries[key] = value unless value.expired?
25
+ end
26
+ @entries[key]&.value
27
+ end
28
+ end
29
+
30
+ # @param [String] key
31
+ # @param [Object] value
32
+ def []=(key, value)
33
+ @mutex.synchronize do
34
+ @entries.shift unless @entries.size < @max_entries
35
+ # delete old value if exists
36
+ @entries.delete(key)
37
+ @entries[key] = Entry.new(value: value, expiration: @expiration)
38
+ @entries[key].value
39
+ end
40
+ end
41
+
42
+ # @param [String] key
43
+ # @return [Boolean]
44
+ def key?(key)
45
+ @mutex.synchronize do
46
+ @entries.delete(key) if @entries.key?(key) && @entries[key].expired?
47
+ @entries.key?(key)
48
+ end
49
+ end
50
+
51
+ def clear
52
+ @mutex.synchronize do
53
+ @entries.clear
54
+ end
55
+ end
56
+
57
+ # @api private
58
+ class Entry
59
+ def initialize(options = {})
60
+ @value = options[:value]
61
+ @expiration = options[:expiration]
62
+ @created_time = Time.now
63
+ end
64
+
65
+ # @return [Object]
66
+ attr_reader :value
67
+
68
+ def expired?
69
+ return false unless @expiration
70
+
71
+ Time.now - @created_time > @expiration
72
+ end
73
+ end
74
+ end
75
+ end
data/lib/aws-sdk-core.rb CHANGED
@@ -96,6 +96,7 @@ require_relative 'aws-sdk-core/client_side_monitoring/publisher'
96
96
  require_relative 'aws-sdk-core/arn'
97
97
  require_relative 'aws-sdk-core/arn_parser'
98
98
  require_relative 'aws-sdk-core/ec2_metadata'
99
+ require_relative 'aws-sdk-core/lru_cache'
99
100
 
100
101
  # dynamic endpoints
101
102
  require_relative 'aws-sdk-core/endpoints'
@@ -629,7 +629,7 @@ module Aws::SSO
629
629
  params: params,
630
630
  config: config)
631
631
  context[:gem_name] = 'aws-sdk-core'
632
- context[:gem_version] = '3.193.0'
632
+ context[:gem_version] = '3.194.0'
633
633
  Seahorse::Client::Request.new(handlers, context)
634
634
  end
635
635
 
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.193.0'
57
+ GEM_VERSION = '3.194.0'
58
58
 
59
59
  end
@@ -934,7 +934,7 @@ module Aws::SSOOIDC
934
934
  params: params,
935
935
  config: config)
936
936
  context[:gem_name] = 'aws-sdk-core'
937
- context[:gem_version] = '3.193.0'
937
+ context[:gem_version] = '3.194.0'
938
938
  Seahorse::Client::Request.new(handlers, context)
939
939
  end
940
940
 
@@ -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.193.0'
57
+ GEM_VERSION = '3.194.0'
58
58
 
59
59
  end
@@ -2376,7 +2376,7 @@ module Aws::STS
2376
2376
  params: params,
2377
2377
  config: config)
2378
2378
  context[:gem_name] = 'aws-sdk-core'
2379
- context[:gem_version] = '3.193.0'
2379
+ context[:gem_version] = '3.194.0'
2380
2380
  Seahorse::Client::Request.new(handlers, context)
2381
2381
  end
2382
2382
 
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.193.0'
57
+ GEM_VERSION = '3.194.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.193.0
4
+ version: 3.194.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: 2024-04-25 00:00:00.000000000 Z
11
+ date: 2024-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -151,6 +151,7 @@ files:
151
151
  - lib/aws-sdk-core/log/handler.rb
152
152
  - lib/aws-sdk-core/log/param_filter.rb
153
153
  - lib/aws-sdk-core/log/param_formatter.rb
154
+ - lib/aws-sdk-core/lru_cache.rb
154
155
  - lib/aws-sdk-core/pageable_response.rb
155
156
  - lib/aws-sdk-core/pager.rb
156
157
  - lib/aws-sdk-core/param_converter.rb