aws-partitions 1.991.0 → 1.993.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: 4db62d21f0172df1af9f5707c1d912c091c5ec8e69fa6f1c1547ffb43f57f065
4
- data.tar.gz: 2e5dadb47b2c7b3022823830ac131d9710622039b023ac46aa243f6c22522ff8
3
+ metadata.gz: 5c1aa83f2d518a8095fea89c64218d98ba5ae72e219de551627d0fcc69f464ec
4
+ data.tar.gz: dc26646310d95ee473cc5153a335b8c7f1a4971084e9085a6c881a3ea71eea01
5
5
  SHA512:
6
- metadata.gz: d4e0e51f2d37940d7cbd8b97babc7bef615faf2534abec759bffb32a53231f657649d0bb5b86e920d6ab9ef8abe74f8fdbb3a0bfd394cf7724ed342823fad2b2
7
- data.tar.gz: 814949d443c93ca6fc4088bf18c968ff070edfbe4a2edcd745bf0c819655dc9d37a63e855ab0986ee5b4ad931769b778809df99e27b32856f0283c31eedee95e
6
+ metadata.gz: 31cef5a22b2bb312b98ddd2d02c96e4be1d90dfbbe052a28d3baaf40be66420c3ccc98bf2ef6f22c3f384969049debb19b6fe4966ede021fa0792942e92d408b
7
+ data.tar.gz: 0bd9d130fba5072060b5168c1357ebcf636b73c43d3ddc282f91dc4ae2c509e34d503dfbc2c8a1e7ae1cee3a77b505defa42306d0f41249426f8778b2b05bb0c
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.993.0 (2024-10-22)
5
+ ------------------
6
+
7
+ * Feature - Updated the partitions source data the determines the AWS service regions and endpoints.
8
+
9
+ 1.992.0 (2024-10-18)
10
+ ------------------
11
+
12
+ * Feature - Add partition metadata module, allowing access without loading entire partitions.json.
13
+
4
14
  1.991.0 (2024-10-15)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.991.0
1
+ 1.993.0
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ module Partitions
5
+ # @api private
6
+ module Metadata
7
+ class << self
8
+
9
+ # aws.partition(region: string) Option<Partition>
10
+ def partition(region)
11
+ partition =
12
+ partitions.find { |p| p['regions']&.fetch(region, nil) } ||
13
+ partitions.find { |p| region.match(p['regionRegex']) } ||
14
+ partitions.find { |p| p['id'] == 'aws' }
15
+
16
+ return nil unless partition
17
+
18
+ partition['outputs']
19
+ end
20
+
21
+ def partitions
22
+ @partitions ||= default_partition_metadata
23
+ end
24
+
25
+ def default_partition_metadata
26
+ path = File.expand_path('../../../partitions-metadata.json', __FILE__)
27
+ JSON.parse(File.read(path), freeze: true)['partitions']
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -5,6 +5,7 @@ require_relative 'aws-partitions/partition'
5
5
  require_relative 'aws-partitions/partition_list'
6
6
  require_relative 'aws-partitions/region'
7
7
  require_relative 'aws-partitions/service'
8
+ require_relative 'aws-partitions/metadata'
8
9
 
9
10
  require 'json'
10
11
 
@@ -501,7 +502,6 @@ module Aws
501
502
  'NetworkFirewall' => 'network-firewall',
502
503
  'NetworkManager' => 'networkmanager',
503
504
  'NetworkMonitor' => 'networkmonitor',
504
- 'NimbleStudio' => 'nimble',
505
505
  'OAM' => 'oam',
506
506
  'OSIS' => 'osis',
507
507
  'Omics' => 'omics',
data/partitions.json CHANGED
@@ -4979,6 +4979,7 @@
4979
4979
  "ap-southeast-2" : { },
4980
4980
  "ap-southeast-3" : { },
4981
4981
  "ap-southeast-4" : { },
4982
+ "ap-southeast-5" : { },
4982
4983
  "ca-central-1" : {
4983
4984
  "variants" : [ {
4984
4985
  "hostname" : "controltower-fips.ca-central-1.amazonaws.com",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-partitions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.991.0
4
+ version: 1.993.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-10-15 00:00:00.000000000 Z
11
+ date: 2024-10-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Provides interfaces to enumerate AWS partitions, regions, and services.
14
14
  email:
@@ -21,6 +21,7 @@ files:
21
21
  - VERSION
22
22
  - lib/aws-partitions.rb
23
23
  - lib/aws-partitions/endpoint_provider.rb
24
+ - lib/aws-partitions/metadata.rb
24
25
  - lib/aws-partitions/partition.rb
25
26
  - lib/aws-partitions/partition_list.rb
26
27
  - lib/aws-partitions/region.rb