aws-partitions 1.650.0 → 1.652.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 +4 -4
- data/CHANGELOG.md +12 -0
- data/VERSION +1 -1
- data/lib/aws-partitions/partition.rb +10 -2
- data/lib/aws-partitions/partition_list.rb +50 -0
- data/lib/aws-partitions.rb +21 -1
- data/partitions-metadata.json +101 -0
- data/partitions.json +12 -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: 1cc02bb0a86234b31a12251bbe27f0e63397bd9180e76048fd1b4c2381600313
|
|
4
|
+
data.tar.gz: 338c887a4ce2a38173d318724082b711d2a52d937f0c9e85a4742a8bc9f9a105
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cca5d139688ec025e1dc59a1bbcb2e377e3ce3389e95779e3c5c5f78401b68542493c8413237c1140f0e8a05e927c87e82d8a3002728bfcc40ed06b335f0e6b1
|
|
7
|
+
data.tar.gz: 7d57625c5e46a7febf9e3777fa79e50a839955f7e6e572a3be7889a0a6258a1b61c27126deaa3a7cecfb21e8d401d09def1b97815e86127f48c791ebda905a2f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
Unreleased Changes
|
|
2
2
|
------------------
|
|
3
3
|
|
|
4
|
+
1.652.0 (2022-10-27)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
* Feature - Updated the partitions source data the determines the AWS service regions and endpoints.
|
|
8
|
+
|
|
9
|
+
1.651.0 (2022-10-25)
|
|
10
|
+
------------------
|
|
11
|
+
|
|
12
|
+
* Feature - Updated the partitions source data the determines the AWS service regions and endpoints.
|
|
13
|
+
|
|
14
|
+
* Feature - Add a metadata method to `Partition` to supplement endpoint generation in service gems.
|
|
15
|
+
|
|
4
16
|
1.650.0 (2022-10-24)
|
|
5
17
|
------------------
|
|
6
18
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.652.0
|
|
@@ -10,12 +10,20 @@ module Aws
|
|
|
10
10
|
def initialize(options = {})
|
|
11
11
|
@name = options[:name]
|
|
12
12
|
@regions = options[:regions]
|
|
13
|
+
@region_regex = options[:region_regex]
|
|
13
14
|
@services = options[:services]
|
|
15
|
+
@metadata = options[:metadata]
|
|
14
16
|
end
|
|
15
17
|
|
|
16
18
|
# @return [String] The partition name, e.g. "aws", "aws-cn", "aws-us-gov".
|
|
17
19
|
attr_reader :name
|
|
18
20
|
|
|
21
|
+
# @return [String] The regex representing the region format.
|
|
22
|
+
attr_reader :region_regex
|
|
23
|
+
|
|
24
|
+
# @return [Metadata] The metadata for the partition.
|
|
25
|
+
attr_reader :metadata
|
|
26
|
+
|
|
19
27
|
# @param [String] region_name The name of the region, e.g. "us-east-1".
|
|
20
28
|
# @return [Region]
|
|
21
29
|
# @raise [ArgumentError] Raises `ArgumentError` for unknown region name.
|
|
@@ -70,6 +78,7 @@ module Aws
|
|
|
70
78
|
Partition.new(
|
|
71
79
|
name: partition['partition'],
|
|
72
80
|
regions: build_regions(partition),
|
|
81
|
+
region_regex: partition['regionRegex'],
|
|
73
82
|
services: build_services(partition)
|
|
74
83
|
)
|
|
75
84
|
end
|
|
@@ -79,8 +88,7 @@ module Aws
|
|
|
79
88
|
# @param [Hash] partition
|
|
80
89
|
# @return [Hash<String,Region>]
|
|
81
90
|
def build_regions(partition)
|
|
82
|
-
partition['regions'].each_with_object({}) do
|
|
83
|
-
|(region_name, region), regions|
|
|
91
|
+
partition['regions'].each_with_object({}) do |(region_name, region), regions|
|
|
84
92
|
next if region_name == "#{partition['partition']}-global"
|
|
85
93
|
|
|
86
94
|
regions[region_name] = Region.build(
|
|
@@ -42,12 +42,62 @@ module Aws
|
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
+
# @param [Partition] partition
|
|
46
|
+
# @api private
|
|
47
|
+
def merge_metadata(partitions_metadata)
|
|
48
|
+
partitions_metadata['partitions'].each do |partition_metadata|
|
|
49
|
+
outputs = partition_metadata['outputs']
|
|
50
|
+
|
|
51
|
+
if existing = @partitions[partition_metadata['id']]
|
|
52
|
+
@partitions[partition_metadata['id']] = Partition.new(
|
|
53
|
+
name: existing.name,
|
|
54
|
+
regions: build_metadata_regions(
|
|
55
|
+
partition_metadata['id'],
|
|
56
|
+
partition_metadata['regions'],
|
|
57
|
+
existing),
|
|
58
|
+
region_regex: partition_metadata['regionRegex'],
|
|
59
|
+
services: existing.services.each_with_object({}) do |s, services|
|
|
60
|
+
services[s.name] = s
|
|
61
|
+
end,
|
|
62
|
+
metadata: outputs
|
|
63
|
+
)
|
|
64
|
+
else
|
|
65
|
+
@partitions[partition_metadata['id']] = Partition.new(
|
|
66
|
+
name: partition_metadata['id'],
|
|
67
|
+
regions: build_metadata_regions(
|
|
68
|
+
partition_metadata['id'], partition_metadata['regions']
|
|
69
|
+
),
|
|
70
|
+
region_regex: partition_metadata['regionRegex'],
|
|
71
|
+
services: {},
|
|
72
|
+
metadata: outputs
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
45
78
|
# Removed all partitions.
|
|
46
79
|
# @api private
|
|
47
80
|
def clear
|
|
48
81
|
@partitions = {}
|
|
49
82
|
end
|
|
50
83
|
|
|
84
|
+
private
|
|
85
|
+
|
|
86
|
+
def build_metadata_regions(partition_name, metadata_regions, existing = nil)
|
|
87
|
+
metadata_regions.each_with_object({}) do |(region_name, region), regions|
|
|
88
|
+
if existing && existing.region?(region_name)
|
|
89
|
+
regions[region_name] = existing.region(region_name)
|
|
90
|
+
else
|
|
91
|
+
regions[region_name] = Region.new(
|
|
92
|
+
name: region_name,
|
|
93
|
+
description: region['description'],
|
|
94
|
+
partition_name: partition_name,
|
|
95
|
+
services: Set.new
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
51
101
|
class << self
|
|
52
102
|
|
|
53
103
|
# @api private
|
data/lib/aws-partitions.rb
CHANGED
|
@@ -195,6 +195,12 @@ module Aws
|
|
|
195
195
|
end
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
+
# @param [Hash] partition metadata
|
|
199
|
+
# @api private For Internal use only
|
|
200
|
+
def merge_metadata(partition_metadata)
|
|
201
|
+
default_partition_list.merge_metadata(partition_metadata)
|
|
202
|
+
end
|
|
203
|
+
|
|
198
204
|
# @api private For internal use only.
|
|
199
205
|
def clear
|
|
200
206
|
default_partition_list.clear
|
|
@@ -204,7 +210,11 @@ module Aws
|
|
|
204
210
|
# @return [PartitionList]
|
|
205
211
|
# @api private
|
|
206
212
|
def default_partition_list
|
|
207
|
-
@default_partition_list ||=
|
|
213
|
+
@default_partition_list ||= begin
|
|
214
|
+
partitions = PartitionList.build(defaults)
|
|
215
|
+
partitions.merge_metadata(default_metadata)
|
|
216
|
+
partitions
|
|
217
|
+
end
|
|
208
218
|
end
|
|
209
219
|
|
|
210
220
|
# @return [Hash]
|
|
@@ -217,6 +227,16 @@ module Aws
|
|
|
217
227
|
end
|
|
218
228
|
end
|
|
219
229
|
|
|
230
|
+
# @return [Hash]
|
|
231
|
+
# @api private
|
|
232
|
+
def default_metadata
|
|
233
|
+
@default_metadata ||= begin
|
|
234
|
+
path = File.expand_path('../../partitions-metadata.json', __FILE__)
|
|
235
|
+
defaults = JSON.parse(File.read(path), freeze: true)
|
|
236
|
+
defaults.merge('partitions' => defaults['partitions'].dup)
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
220
240
|
# @return [Hash<String,String>] Returns a map of service module names
|
|
221
241
|
# to their id as used in the endpoints.json document.
|
|
222
242
|
# @api private For internal use only.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.1",
|
|
3
|
+
"partitions": [
|
|
4
|
+
{
|
|
5
|
+
"id": "aws",
|
|
6
|
+
"regionRegex": "^(us|eu|ap|sa|ca|me|af)-\\w+-\\d+$",
|
|
7
|
+
"regions": {
|
|
8
|
+
"af-south-1": {},
|
|
9
|
+
"af-east-1": {},
|
|
10
|
+
"ap-northeast-1": {},
|
|
11
|
+
"ap-northeast-2": {},
|
|
12
|
+
"ap-northeast-3": {},
|
|
13
|
+
"ap-south-1": {},
|
|
14
|
+
"ap-southeast-1": {},
|
|
15
|
+
"ap-southeast-2": {},
|
|
16
|
+
"ap-southeast-3": {},
|
|
17
|
+
"ca-central-1": {},
|
|
18
|
+
"eu-central-1": {},
|
|
19
|
+
"eu-north-1": {},
|
|
20
|
+
"eu-south-1": {},
|
|
21
|
+
"eu-west-1": {},
|
|
22
|
+
"eu-west-2": {},
|
|
23
|
+
"eu-west-3": {},
|
|
24
|
+
"me-south-1": {},
|
|
25
|
+
"sa-east-1": {},
|
|
26
|
+
"us-east-1": {},
|
|
27
|
+
"us-east-2": {},
|
|
28
|
+
"us-west-1": {},
|
|
29
|
+
"us-west-2": {},
|
|
30
|
+
"aws-global": {}
|
|
31
|
+
},
|
|
32
|
+
"outputs": {
|
|
33
|
+
"name": "aws",
|
|
34
|
+
"dnsSuffix": "amazonaws.com",
|
|
35
|
+
"dualStackDnsSuffix": "api.aws",
|
|
36
|
+
"supportsFIPS": true,
|
|
37
|
+
"supportsDualStack": true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "aws-us-gov",
|
|
42
|
+
"regionRegex": "^us\\-gov\\-\\w+\\-\\d+$",
|
|
43
|
+
"regions": {
|
|
44
|
+
"us-gov-west-1": {},
|
|
45
|
+
"us-gov-east-1": {},
|
|
46
|
+
"aws-us-gov-global": {}
|
|
47
|
+
},
|
|
48
|
+
"outputs": {
|
|
49
|
+
"name": "aws-us-gov",
|
|
50
|
+
"dnsSuffix": "amazonaws.com",
|
|
51
|
+
"dualStackDnsSuffix": "api.aws",
|
|
52
|
+
"supportsFIPS": true,
|
|
53
|
+
"supportsDualStack": true
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "aws-cn",
|
|
58
|
+
"regionRegex": "^cn\\-\\w+\\-\\d+$",
|
|
59
|
+
"regions": {
|
|
60
|
+
"cn-north-1": {},
|
|
61
|
+
"cn-northwest-1": {},
|
|
62
|
+
"aws-cn-global": {}
|
|
63
|
+
},
|
|
64
|
+
"outputs": {
|
|
65
|
+
"name": "aws-cn",
|
|
66
|
+
"dnsSuffix": "amazonaws.com.cn",
|
|
67
|
+
"dualStackDnsSuffix": "api.amazonwebservices.com.cn",
|
|
68
|
+
"supportsFIPS": true,
|
|
69
|
+
"supportsDualStack": true
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "aws-iso",
|
|
74
|
+
"regionRegex": "^us\\-iso\\-\\w+\\-\\d+$",
|
|
75
|
+
"outputs": {
|
|
76
|
+
"name": "aws-iso",
|
|
77
|
+
"dnsSuffix": "c2s.ic.gov",
|
|
78
|
+
"supportsFIPS": true,
|
|
79
|
+
"supportsDualStack": false,
|
|
80
|
+
"dualStackDnsSuffix": "c2s.ic.gov"
|
|
81
|
+
},
|
|
82
|
+
"regions": {
|
|
83
|
+
"aws-iso-global": {}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "aws-iso-b",
|
|
88
|
+
"regionRegex": "^us\\-isob\\-\\w+\\-\\d+$",
|
|
89
|
+
"outputs": {
|
|
90
|
+
"name": "aws-iso-b",
|
|
91
|
+
"dnsSuffix": "sc2s.sgov.gov",
|
|
92
|
+
"supportsFIPS": true,
|
|
93
|
+
"supportsDualStack": false,
|
|
94
|
+
"dualStackDnsSuffix": "sc2s.sgov.gov"
|
|
95
|
+
},
|
|
96
|
+
"regions": {
|
|
97
|
+
"aws-iso-b-global": {}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
data/partitions.json
CHANGED
|
@@ -2190,6 +2190,7 @@
|
|
|
2190
2190
|
"deprecated" : true,
|
|
2191
2191
|
"hostname" : "cloudcontrolapi-fips.us-west-2.amazonaws.com"
|
|
2192
2192
|
},
|
|
2193
|
+
"me-central-1" : { },
|
|
2193
2194
|
"me-south-1" : { },
|
|
2194
2195
|
"sa-east-1" : { },
|
|
2195
2196
|
"us-east-1" : {
|
|
@@ -3496,6 +3497,7 @@
|
|
|
3496
3497
|
"deprecated" : true,
|
|
3497
3498
|
"hostname" : "data.iot-fips.us-west-2.amazonaws.com"
|
|
3498
3499
|
},
|
|
3500
|
+
"me-central-1" : { },
|
|
3499
3501
|
"me-south-1" : { },
|
|
3500
3502
|
"sa-east-1" : { },
|
|
3501
3503
|
"us-east-1" : {
|
|
@@ -7246,6 +7248,7 @@
|
|
|
7246
7248
|
"deprecated" : true,
|
|
7247
7249
|
"hostname" : "iot-fips.us-west-2.amazonaws.com"
|
|
7248
7250
|
},
|
|
7251
|
+
"me-central-1" : { },
|
|
7249
7252
|
"me-south-1" : { },
|
|
7250
7253
|
"sa-east-1" : { },
|
|
7251
7254
|
"us-east-1" : {
|
|
@@ -10529,6 +10532,7 @@
|
|
|
10529
10532
|
"deprecated" : true,
|
|
10530
10533
|
"hostname" : "ram-fips.us-west-2.amazonaws.com"
|
|
10531
10534
|
},
|
|
10535
|
+
"me-central-1" : { },
|
|
10532
10536
|
"me-south-1" : { },
|
|
10533
10537
|
"sa-east-1" : { },
|
|
10534
10538
|
"us-east-1" : {
|
|
@@ -15058,6 +15062,12 @@
|
|
|
15058
15062
|
"fips-us-west-2" : {
|
|
15059
15063
|
"deprecated" : true
|
|
15060
15064
|
},
|
|
15065
|
+
"ui-ap-northeast-1" : { },
|
|
15066
|
+
"ui-ap-southeast-2" : { },
|
|
15067
|
+
"ui-eu-central-1" : { },
|
|
15068
|
+
"ui-eu-west-2" : { },
|
|
15069
|
+
"ui-us-east-1" : { },
|
|
15070
|
+
"ui-us-west-2" : { },
|
|
15061
15071
|
"us-east-1" : {
|
|
15062
15072
|
"variants" : [ {
|
|
15063
15073
|
"tags" : [ "fips" ]
|
|
@@ -20363,7 +20373,8 @@
|
|
|
20363
20373
|
},
|
|
20364
20374
|
"ds" : {
|
|
20365
20375
|
"endpoints" : {
|
|
20366
|
-
"us-iso-east-1" : { }
|
|
20376
|
+
"us-iso-east-1" : { },
|
|
20377
|
+
"us-iso-west-1" : { }
|
|
20367
20378
|
}
|
|
20368
20379
|
},
|
|
20369
20380
|
"dynamodb" : {
|
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.652.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: 2022-10-
|
|
11
|
+
date: 2022-10-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Provides interfaces to enumerate AWS partitions, regions, and services.
|
|
14
14
|
email:
|
|
@@ -25,6 +25,7 @@ files:
|
|
|
25
25
|
- lib/aws-partitions/partition_list.rb
|
|
26
26
|
- lib/aws-partitions/region.rb
|
|
27
27
|
- lib/aws-partitions/service.rb
|
|
28
|
+
- partitions-metadata.json
|
|
28
29
|
- partitions.json
|
|
29
30
|
homepage: https://github.com/aws/aws-sdk-ruby
|
|
30
31
|
licenses:
|