aws-partitions 1.991.0 → 1.992.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 +5 -0
- data/VERSION +1 -1
- data/lib/aws-partitions/metadata.rb +32 -0
- data/lib/aws-partitions.rb +1 -1
- 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: 3f9a8e68db01ed71555c4736cc1ca7e244eb608f1c127657150e0cd45fc76998
|
4
|
+
data.tar.gz: e5e71dab518bd834fe266ca426f08989ae5338054c6b712a312f15c050767ea9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d21251b52baaf82d422a865542e6f950f9836a8b1b53725c0dd3528d9b5ce3553f28fd7c2d614001944db39545f8c48024b417d206fbd7c40d8bf7470f8ba719
|
7
|
+
data.tar.gz: bee52a350c4cbcad8153ea74f78790ce6928ffdacf264c5fdcc64ff67d170b7f274f2f0e460c597f3ea3a8b4edeaac1b438556a742ef916769059dad02ceffc5
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.992.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',
|
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.992.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-18 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
|