aws-partitions 1.240.0 → 1.243.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/lib/aws-partitions.rb +2 -0
- data/lib/aws-partitions/endpoint_provider.rb +45 -51
- data/partitions.json +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78c64e4a8361153d70aba7c807306ca5a8adfbeb
|
|
4
|
+
data.tar.gz: d914b52e5144bb15f073a33f72de3bf5af326a3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a5704f45440c9ceba1c1947f766195bd940f7d2f766bc52e4582c19b5181adb5225e09afdb7cfa4cca5d2eb55595883717b14d5972fc7a12e8378791e992703b
|
|
7
|
+
data.tar.gz: 19ec34d4aeba0f04f7ccaec63f3ffcd60242de03f4cebcb7f955198ec4cceb333fbb706cbd321a31a344e7fcb3858aa2c496e0339d6f500e103b49494978b895
|
data/lib/aws-partitions.rb
CHANGED
|
@@ -265,6 +265,7 @@ module Aws
|
|
|
265
265
|
'ComprehendMedical' => 'comprehendmedical',
|
|
266
266
|
'ConfigService' => 'config',
|
|
267
267
|
'Connect' => 'connect',
|
|
268
|
+
'ConnectParticipant' => 'participant.connect',
|
|
268
269
|
'CostExplorer' => 'ce',
|
|
269
270
|
'CostandUsageReportService' => 'cur',
|
|
270
271
|
'DAX' => 'dax',
|
|
@@ -350,6 +351,7 @@ module Aws
|
|
|
350
351
|
'MediaStoreData' => 'data.mediastore',
|
|
351
352
|
'MediaTailor' => 'api.mediatailor',
|
|
352
353
|
'MigrationHub' => 'mgh',
|
|
354
|
+
'MigrationHubConfig' => 'migrationhub-config',
|
|
353
355
|
'Mobile' => 'mobile',
|
|
354
356
|
'Neptune' => 'rds',
|
|
355
357
|
'OpsWorks' => 'opsworks',
|
|
@@ -2,11 +2,9 @@ module Aws
|
|
|
2
2
|
module Partitions
|
|
3
3
|
# @api private
|
|
4
4
|
class EndpointProvider
|
|
5
|
-
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
# following regions
|
|
9
|
-
STS_LEGACY_REGIONS = %w(
|
|
5
|
+
# When sts_regional_endpoint is set to `legacy`, the endpoint
|
|
6
|
+
# pattern stays global for the following regions:
|
|
7
|
+
STS_LEGACY_REGIONS = %w[
|
|
10
8
|
ap-northeast-1
|
|
11
9
|
ap-south-1
|
|
12
10
|
ap-southeast-1
|
|
@@ -23,13 +21,13 @@ module Aws
|
|
|
23
21
|
us-east-2
|
|
24
22
|
us-west-1
|
|
25
23
|
us-west-2
|
|
26
|
-
|
|
24
|
+
].freeze
|
|
27
25
|
|
|
28
26
|
# Can be removed once S3 endpoint is updated
|
|
29
27
|
S3_IAD_REGIONAL = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
28
|
+
'hostname' => 's3.us-east-1.amazonaws.com',
|
|
29
|
+
'signatureVersions' => %w[s3 s3v4]
|
|
30
|
+
}.freeze
|
|
33
31
|
|
|
34
32
|
# Intentionally marked private. The format of the endpoint rules
|
|
35
33
|
# is an implementation detail.
|
|
@@ -38,26 +36,26 @@ module Aws
|
|
|
38
36
|
@rules = rules
|
|
39
37
|
end
|
|
40
38
|
|
|
41
|
-
# @param [String] region
|
|
42
|
-
# @param [String] service The endpoint prefix for the service, e.g.
|
|
43
|
-
# cloudwatch.
|
|
44
|
-
# @param [String] sts_regional_endpoints [STS only] Whether to use
|
|
45
|
-
# legacy regions) or `regional` mode for
|
|
46
|
-
#
|
|
39
|
+
# @param [String] region The region for the client.
|
|
40
|
+
# @param [String] service The endpoint prefix for the service, e.g.
|
|
41
|
+
# "monitoring" for cloudwatch.
|
|
42
|
+
# @param [String] sts_regional_endpoints [STS only] Whether to use
|
|
43
|
+
# `legacy` (global endpoint for legacy regions) or `regional` mode for
|
|
44
|
+
# using regional endpoint for supported regions except 'aws-global'
|
|
47
45
|
# @api private Use the static class methods instead.
|
|
48
46
|
def resolve(region, service, sts_regional_endpoints)
|
|
49
|
-
|
|
47
|
+
'https://' + endpoint_for(region, service, sts_regional_endpoints)
|
|
50
48
|
end
|
|
51
49
|
|
|
52
50
|
# @api private Use the static class methods instead.
|
|
53
51
|
def signing_region(region, service)
|
|
54
|
-
get_partition(region)
|
|
55
|
-
fetch(
|
|
56
|
-
fetch(service, {})
|
|
57
|
-
fetch(
|
|
58
|
-
fetch(region, {})
|
|
59
|
-
fetch(
|
|
60
|
-
fetch(
|
|
52
|
+
get_partition(region)
|
|
53
|
+
.fetch('services', {})
|
|
54
|
+
.fetch(service, {})
|
|
55
|
+
.fetch('endpoints', {})
|
|
56
|
+
.fetch(region, {})
|
|
57
|
+
.fetch('credentialScope', {})
|
|
58
|
+
.fetch('region', region)
|
|
61
59
|
end
|
|
62
60
|
|
|
63
61
|
# @api private Use the static class methods instead.
|
|
@@ -71,45 +69,45 @@ module Aws
|
|
|
71
69
|
def endpoint_for(region, service, sts_regional_endpoints)
|
|
72
70
|
partition = get_partition(region)
|
|
73
71
|
endpoint = default_endpoint(partition, service, region)
|
|
74
|
-
service_cfg = partition.fetch(
|
|
72
|
+
service_cfg = partition.fetch('services', {}).fetch(service, {})
|
|
75
73
|
|
|
76
74
|
# Check for service-level default endpoint.
|
|
77
|
-
endpoint = service_cfg.fetch(
|
|
75
|
+
endpoint = service_cfg.fetch('defaults', {}).fetch('hostname', endpoint)
|
|
78
76
|
|
|
79
77
|
# Check for sts legacy behavior
|
|
80
78
|
sts_legacy = service == 'sts' &&
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
sts_regional_endpoints == 'legacy' &&
|
|
80
|
+
STS_LEGACY_REGIONS.include?(region)
|
|
83
81
|
|
|
84
82
|
# Check for global endpoint.
|
|
85
|
-
if sts_legacy || service_cfg[
|
|
86
|
-
region = service_cfg.fetch(
|
|
83
|
+
if sts_legacy || service_cfg['isRegionalized'] == false
|
|
84
|
+
region = service_cfg.fetch('partitionEndpoint', region)
|
|
87
85
|
end
|
|
88
86
|
|
|
89
87
|
# Can be removed once S3 endpoint is updated
|
|
90
|
-
if (service == 's3') && (region ==
|
|
91
|
-
service_cfg[
|
|
88
|
+
if (service == 's3') && (region == 'us-east-1')
|
|
89
|
+
service_cfg['endpoints'][region] = S3_IAD_REGIONAL
|
|
92
90
|
end
|
|
93
91
|
|
|
94
92
|
# Check for service/region level endpoint.
|
|
95
|
-
endpoint = service_cfg.fetch(
|
|
96
|
-
|
|
93
|
+
endpoint = service_cfg.fetch('endpoints', {})
|
|
94
|
+
.fetch(region, {}).fetch('hostname', endpoint)
|
|
97
95
|
|
|
98
96
|
endpoint
|
|
99
97
|
end
|
|
100
98
|
|
|
101
99
|
def default_endpoint(partition, service, region)
|
|
102
|
-
hostname_template = partition[
|
|
103
|
-
hostname_template
|
|
104
|
-
sub('{region}', region)
|
|
105
|
-
sub('{service}', service)
|
|
106
|
-
sub('{dnsSuffix}', partition[
|
|
100
|
+
hostname_template = partition['defaults']['hostname']
|
|
101
|
+
hostname_template
|
|
102
|
+
.sub('{region}', region)
|
|
103
|
+
.sub('{service}', service)
|
|
104
|
+
.sub('{dnsSuffix}', partition['dnsSuffix'])
|
|
107
105
|
end
|
|
108
106
|
|
|
109
107
|
def get_partition(region)
|
|
110
108
|
partition_containing_region(region) ||
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
partition_matching_region(region) ||
|
|
110
|
+
default_partition
|
|
113
111
|
end
|
|
114
112
|
|
|
115
113
|
def partition_containing_region(region)
|
|
@@ -120,23 +118,20 @@ module Aws
|
|
|
120
118
|
|
|
121
119
|
def partition_matching_region(region)
|
|
122
120
|
@rules['partitions'].find do |p|
|
|
123
|
-
region.match(p[
|
|
124
|
-
|
|
121
|
+
region.match(p['regionRegex']) ||
|
|
122
|
+
p['services'].values.find do |svc|
|
|
123
|
+
svc['endpoints'].key?(region) if svc.key? 'endpoints'
|
|
124
|
+
end
|
|
125
125
|
end
|
|
126
126
|
end
|
|
127
127
|
|
|
128
128
|
def default_partition
|
|
129
|
-
@rules['partitions'].find { |p| p[
|
|
130
|
-
|
|
129
|
+
@rules['partitions'].find { |p| p['partition'] == 'aws' } ||
|
|
130
|
+
@rules['partitions'].first
|
|
131
131
|
end
|
|
132
132
|
|
|
133
133
|
class << self
|
|
134
|
-
|
|
135
|
-
def resolve(
|
|
136
|
-
region,
|
|
137
|
-
service,
|
|
138
|
-
sts_regional_endpoints = 'legacy'
|
|
139
|
-
)
|
|
134
|
+
def resolve(region, service, sts_regional_endpoints = 'legacy')
|
|
140
135
|
default_provider.resolve(region, service, sts_regional_endpoints)
|
|
141
136
|
end
|
|
142
137
|
|
|
@@ -153,7 +148,6 @@ module Aws
|
|
|
153
148
|
def default_provider
|
|
154
149
|
@default_provider ||= EndpointProvider.new(Partitions.defaults)
|
|
155
150
|
end
|
|
156
|
-
|
|
157
151
|
end
|
|
158
152
|
end
|
|
159
153
|
end
|
data/partitions.json
CHANGED
|
@@ -1028,12 +1028,15 @@
|
|
|
1028
1028
|
},
|
|
1029
1029
|
"datasync" : {
|
|
1030
1030
|
"endpoints" : {
|
|
1031
|
+
"ap-east-1" : { },
|
|
1031
1032
|
"ap-northeast-1" : { },
|
|
1032
1033
|
"ap-northeast-2" : { },
|
|
1034
|
+
"ap-south-1" : { },
|
|
1033
1035
|
"ap-southeast-1" : { },
|
|
1034
1036
|
"ap-southeast-2" : { },
|
|
1035
1037
|
"ca-central-1" : { },
|
|
1036
1038
|
"eu-central-1" : { },
|
|
1039
|
+
"eu-north-1" : { },
|
|
1037
1040
|
"eu-west-1" : { },
|
|
1038
1041
|
"eu-west-2" : { },
|
|
1039
1042
|
"eu-west-3" : { },
|
|
@@ -1062,6 +1065,7 @@
|
|
|
1062
1065
|
"hostname" : "datasync-fips.us-west-2.amazonaws.com"
|
|
1063
1066
|
},
|
|
1064
1067
|
"me-south-1" : { },
|
|
1068
|
+
"sa-east-1" : { },
|
|
1065
1069
|
"us-east-1" : { },
|
|
1066
1070
|
"us-east-2" : { },
|
|
1067
1071
|
"us-west-1" : { },
|
|
@@ -1114,6 +1118,7 @@
|
|
|
1114
1118
|
},
|
|
1115
1119
|
"discovery" : {
|
|
1116
1120
|
"endpoints" : {
|
|
1121
|
+
"eu-central-1" : { },
|
|
1117
1122
|
"us-west-2" : { }
|
|
1118
1123
|
}
|
|
1119
1124
|
},
|
|
@@ -1396,6 +1401,7 @@
|
|
|
1396
1401
|
},
|
|
1397
1402
|
"elasticfilesystem" : {
|
|
1398
1403
|
"endpoints" : {
|
|
1404
|
+
"ap-east-1" : { },
|
|
1399
1405
|
"ap-northeast-1" : { },
|
|
1400
1406
|
"ap-northeast-2" : { },
|
|
1401
1407
|
"ap-south-1" : { },
|
|
@@ -1403,9 +1409,12 @@
|
|
|
1403
1409
|
"ap-southeast-2" : { },
|
|
1404
1410
|
"ca-central-1" : { },
|
|
1405
1411
|
"eu-central-1" : { },
|
|
1412
|
+
"eu-north-1" : { },
|
|
1406
1413
|
"eu-west-1" : { },
|
|
1407
1414
|
"eu-west-2" : { },
|
|
1408
1415
|
"eu-west-3" : { },
|
|
1416
|
+
"me-south-1" : { },
|
|
1417
|
+
"sa-east-1" : { },
|
|
1409
1418
|
"us-east-1" : { },
|
|
1410
1419
|
"us-east-2" : { },
|
|
1411
1420
|
"us-west-1" : { },
|
|
@@ -2041,12 +2050,17 @@
|
|
|
2041
2050
|
"lakeformation" : {
|
|
2042
2051
|
"endpoints" : {
|
|
2043
2052
|
"ap-northeast-1" : { },
|
|
2053
|
+
"ap-northeast-2" : { },
|
|
2044
2054
|
"ap-south-1" : { },
|
|
2045
2055
|
"ap-southeast-1" : { },
|
|
2046
2056
|
"ap-southeast-2" : { },
|
|
2057
|
+
"ca-central-1" : { },
|
|
2058
|
+
"eu-central-1" : { },
|
|
2047
2059
|
"eu-west-1" : { },
|
|
2060
|
+
"eu-west-2" : { },
|
|
2048
2061
|
"us-east-1" : { },
|
|
2049
2062
|
"us-east-2" : { },
|
|
2063
|
+
"us-west-1" : { },
|
|
2050
2064
|
"us-west-2" : { }
|
|
2051
2065
|
}
|
|
2052
2066
|
},
|
|
@@ -2258,6 +2272,7 @@
|
|
|
2258
2272
|
},
|
|
2259
2273
|
"mgh" : {
|
|
2260
2274
|
"endpoints" : {
|
|
2275
|
+
"eu-central-1" : { },
|
|
2261
2276
|
"us-west-2" : { }
|
|
2262
2277
|
}
|
|
2263
2278
|
},
|
|
@@ -2651,6 +2666,10 @@
|
|
|
2651
2666
|
"qldb" : {
|
|
2652
2667
|
"endpoints" : {
|
|
2653
2668
|
"ap-northeast-1" : { },
|
|
2669
|
+
"ap-northeast-2" : { },
|
|
2670
|
+
"ap-southeast-1" : { },
|
|
2671
|
+
"ap-southeast-2" : { },
|
|
2672
|
+
"eu-central-1" : { },
|
|
2654
2673
|
"eu-west-1" : { },
|
|
2655
2674
|
"us-east-1" : { },
|
|
2656
2675
|
"us-east-2" : { },
|
|
@@ -3326,6 +3345,10 @@
|
|
|
3326
3345
|
"session.qldb" : {
|
|
3327
3346
|
"endpoints" : {
|
|
3328
3347
|
"ap-northeast-1" : { },
|
|
3348
|
+
"ap-northeast-2" : { },
|
|
3349
|
+
"ap-southeast-1" : { },
|
|
3350
|
+
"ap-southeast-2" : { },
|
|
3351
|
+
"eu-central-1" : { },
|
|
3329
3352
|
"eu-west-1" : { },
|
|
3330
3353
|
"us-east-1" : { },
|
|
3331
3354
|
"us-east-2" : { },
|
|
@@ -4556,6 +4579,7 @@
|
|
|
4556
4579
|
},
|
|
4557
4580
|
"hostname" : "datasync-fips.us-gov-west-1.amazonaws.com"
|
|
4558
4581
|
},
|
|
4582
|
+
"us-gov-east-1" : { },
|
|
4559
4583
|
"us-gov-west-1" : { }
|
|
4560
4584
|
}
|
|
4561
4585
|
},
|
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.243.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: 2019-11-
|
|
11
|
+
date: 2019-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Provides interfaces to enumerate AWS partitions, regions, and services.
|
|
14
14
|
email:
|