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 +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-partitions/metadata.rb +32 -0
- data/lib/aws-partitions.rb +1 -1
- data/partitions.json +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c1aa83f2d518a8095fea89c64218d98ba5ae72e219de551627d0fcc69f464ec
|
4
|
+
data.tar.gz: dc26646310d95ee473cc5153a335b8c7f1a4971084e9085a6c881a3ea71eea01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
data/lib/aws-partitions.rb
CHANGED
@@ -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
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.
|
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-
|
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
|