@aws-cdk/region-info 2.7.0 → 2.11.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.
- package/.jsii +31 -28
- package/.jsii.tabl.json +130 -122
- package/README.md +15 -15
- package/build-tools/fact-tables.js +4 -1
- package/lib/aws-entities.d.ts +10 -10
- package/lib/aws-entities.js +10 -10
- package/lib/built-ins.generated.d.ts +1 -1
- package/lib/built-ins.generated.js +7 -7
- package/lib/default.js +69 -53
- package/lib/fact.js +5 -4
- package/lib/region-info.js +1 -1
- package/package.json +11 -4
- package/rosetta/default.ts-fixture +11 -0
package/.jsii.tabl.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "2",
|
|
3
|
-
"toolVersion": "1.
|
|
3
|
+
"toolVersion": "1.52.1",
|
|
4
4
|
"snippets": {
|
|
5
|
-
"
|
|
5
|
+
"5734a31089241ec7ba6bf5346086285ab04d4a69540970c2191a8315f25c3053": {
|
|
6
6
|
"translations": {
|
|
7
7
|
"python": {
|
|
8
|
-
"source": "
|
|
9
|
-
"version": "
|
|
8
|
+
"source": "# Get the information for \"eu-west-1\":\nregion = region_info.RegionInfo.get(\"eu-west-1\")\n\n# Access attributes:\nregion.s3_static_website_endpoint # s3-website-eu-west-1.amazonaws.com\nregion.service_principal(\"logs.amazonaws.com\")",
|
|
9
|
+
"version": "2"
|
|
10
10
|
},
|
|
11
11
|
"csharp": {
|
|
12
|
-
"source": "
|
|
12
|
+
"source": "// Get the information for \"eu-west-1\":\nRegionInfo region = RegionInfo.Get(\"eu-west-1\");\n\n// Access attributes:\nregion.S3StaticWebsiteEndpoint; // s3-website-eu-west-1.amazonaws.com\nregion.ServicePrincipal(\"logs.amazonaws.com\");",
|
|
13
13
|
"version": "1"
|
|
14
14
|
},
|
|
15
15
|
"java": {
|
|
16
|
-
"source": "
|
|
16
|
+
"source": "// Get the information for \"eu-west-1\":\nRegionInfo region = RegionInfo.get(\"eu-west-1\");\n\n// Access attributes:\nregion.getS3StaticWebsiteEndpoint(); // s3-website-eu-west-1.amazonaws.com\nregion.servicePrincipal(\"logs.amazonaws.com\");",
|
|
17
17
|
"version": "1"
|
|
18
18
|
},
|
|
19
19
|
"$": {
|
|
20
|
-
"source": "
|
|
20
|
+
"source": "// Get the information for \"eu-west-1\":\nconst region = regionInfo.RegionInfo.get('eu-west-1');\n\n// Access attributes:\nregion.s3StaticWebsiteEndpoint; // s3-website-eu-west-1.amazonaws.com\nregion.servicePrincipal('logs.amazonaws.com'); // logs.eu-west-1.amazonaws.com",
|
|
21
21
|
"version": "0"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
@@ -37,40 +37,35 @@
|
|
|
37
37
|
"@aws-cdk/region-info.RegionInfo#get",
|
|
38
38
|
"@aws-cdk/region-info.RegionInfo#servicePrincipal"
|
|
39
39
|
],
|
|
40
|
-
"fullSource": "
|
|
40
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\nimport * as regionInfo from '@aws-cdk/region-info';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n // Code snippet begins after !show marker below\n/// !show\n// Get the information for \"eu-west-1\":\nconst region = regionInfo.RegionInfo.get('eu-west-1');\n\n// Access attributes:\nregion.s3StaticWebsiteEndpoint; // s3-website-eu-west-1.amazonaws.com\nregion.servicePrincipal('logs.amazonaws.com');\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}",
|
|
41
41
|
"syntaxKindCounter": {
|
|
42
|
-
"10":
|
|
42
|
+
"10": 2,
|
|
43
43
|
"75": 8,
|
|
44
|
-
"194":
|
|
44
|
+
"194": 4,
|
|
45
45
|
"196": 2,
|
|
46
46
|
"225": 1,
|
|
47
47
|
"226": 2,
|
|
48
48
|
"242": 1,
|
|
49
|
-
"243": 1
|
|
50
|
-
"254": 1,
|
|
51
|
-
"255": 1,
|
|
52
|
-
"257": 1,
|
|
53
|
-
"258": 1,
|
|
54
|
-
"290": 1
|
|
49
|
+
"243": 1
|
|
55
50
|
},
|
|
56
51
|
"fqnsFingerprint": "97ec6b3ee5dcd55ca63753f03b0a23616036e346c91ff93309e28737431af21d"
|
|
57
52
|
},
|
|
58
|
-
"
|
|
53
|
+
"a282d7c98c5154d04d8082b122a1463a9ca4d1786c793a21e207e019348bcc23": {
|
|
59
54
|
"translations": {
|
|
60
55
|
"python": {
|
|
61
|
-
"source": "
|
|
62
|
-
"version": "
|
|
56
|
+
"source": "code_deploy_principal = region_info.Fact.find(\"us-east-1\", region_info.FactName.service_principal(\"codedeploy.amazonaws.com\"))\n# => codedeploy.us-east-1.amazonaws.com\n\nstatic_website = region_info.Fact.find(\"ap-northeast-1\", region_info.FactName.S3_STATIC_WEBSITE_ENDPOINT)",
|
|
57
|
+
"version": "2"
|
|
63
58
|
},
|
|
64
59
|
"csharp": {
|
|
65
|
-
"source": "
|
|
60
|
+
"source": "string? codeDeployPrincipal = Fact.Find(\"us-east-1\", FactName.ServicePrincipal(\"codedeploy.amazonaws.com\"));\n// => codedeploy.us-east-1.amazonaws.com\n\nstring? staticWebsite = Fact.Find(\"ap-northeast-1\", FactName.S3_STATIC_WEBSITE_ENDPOINT);",
|
|
66
61
|
"version": "1"
|
|
67
62
|
},
|
|
68
63
|
"java": {
|
|
69
|
-
"source": "
|
|
64
|
+
"source": "String codeDeployPrincipal = Fact.find(\"us-east-1\", FactName.servicePrincipal(\"codedeploy.amazonaws.com\"));\n// => codedeploy.us-east-1.amazonaws.com\n\nString staticWebsite = Fact.find(\"ap-northeast-1\", FactName.S3_STATIC_WEBSITE_ENDPOINT);",
|
|
70
65
|
"version": "1"
|
|
71
66
|
},
|
|
72
67
|
"$": {
|
|
73
|
-
"source": "
|
|
68
|
+
"source": "const codeDeployPrincipal = regionInfo.Fact.find('us-east-1', regionInfo.FactName.servicePrincipal('codedeploy.amazonaws.com'));\n// => codedeploy.us-east-1.amazonaws.com\n\nconst staticWebsite = regionInfo.Fact.find('ap-northeast-1', regionInfo.FactName.S3_STATIC_WEBSITE_ENDPOINT);\n// => s3-website-ap-northeast-1.amazonaws.com",
|
|
74
69
|
"version": "0"
|
|
75
70
|
}
|
|
76
71
|
},
|
|
@@ -81,7 +76,7 @@
|
|
|
81
76
|
},
|
|
82
77
|
"field": {
|
|
83
78
|
"field": "markdown",
|
|
84
|
-
"line":
|
|
79
|
+
"line": 44
|
|
85
80
|
}
|
|
86
81
|
},
|
|
87
82
|
"didCompile": true,
|
|
@@ -92,38 +87,34 @@
|
|
|
92
87
|
"@aws-cdk/region-info.FactName#S3_STATIC_WEBSITE_ENDPOINT",
|
|
93
88
|
"@aws-cdk/region-info.FactName#servicePrincipal"
|
|
94
89
|
],
|
|
95
|
-
"fullSource": "
|
|
90
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\nimport * as regionInfo from '@aws-cdk/region-info';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n // Code snippet begins after !show marker below\n/// !show\nconst codeDeployPrincipal = regionInfo.Fact.find('us-east-1', regionInfo.FactName.servicePrincipal('codedeploy.amazonaws.com'));\n// => codedeploy.us-east-1.amazonaws.com\n\nconst staticWebsite = regionInfo.Fact.find('ap-northeast-1', regionInfo.FactName.S3_STATIC_WEBSITE_ENDPOINT);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}",
|
|
96
91
|
"syntaxKindCounter": {
|
|
97
|
-
"10":
|
|
98
|
-
"75":
|
|
92
|
+
"10": 3,
|
|
93
|
+
"75": 14,
|
|
99
94
|
"194": 8,
|
|
100
95
|
"196": 3,
|
|
101
96
|
"225": 2,
|
|
102
97
|
"242": 2,
|
|
103
|
-
"243": 2
|
|
104
|
-
"254": 1,
|
|
105
|
-
"255": 1,
|
|
106
|
-
"256": 1,
|
|
107
|
-
"290": 1
|
|
98
|
+
"243": 2
|
|
108
99
|
},
|
|
109
100
|
"fqnsFingerprint": "5797746405d6bb24589edbf736a0149091e139d518240b022a77ab4ec5990586"
|
|
110
101
|
},
|
|
111
|
-
"
|
|
102
|
+
"2c9418054469c3215eea1288654bfc92ba2295f70a3549c963fce24d24a4cc29": {
|
|
112
103
|
"translations": {
|
|
113
104
|
"python": {
|
|
114
|
-
"source": "region_info.
|
|
115
|
-
"version": "
|
|
105
|
+
"source": "class MyFact(region_info.IFact):\n\nregion_info.Fact.register(MyFact())",
|
|
106
|
+
"version": "2"
|
|
116
107
|
},
|
|
117
108
|
"csharp": {
|
|
118
|
-
"source": "
|
|
109
|
+
"source": "class MyFact : IFact\n{\n public readonly void Region = \"bermuda-triangle-1\";\n public readonly void Name = FactName.ServicePrincipal(\"s3.amazonaws.com\");\n public readonly void Value = \"s3-website.bermuda-triangle-1.nowhere.com\";\n}\n\nFact.Register(new MyFact());",
|
|
119
110
|
"version": "1"
|
|
120
111
|
},
|
|
121
112
|
"java": {
|
|
122
|
-
"source": "
|
|
113
|
+
"source": "public class MyFact implements IFact {\n public final Object region;\n public final Object name;\n public final Object value;\n}\n\nFact.register(new MyFact());",
|
|
123
114
|
"version": "1"
|
|
124
115
|
},
|
|
125
116
|
"$": {
|
|
126
|
-
"source": "regionInfo.
|
|
117
|
+
"source": "class MyFact implements regionInfo.IFact {\n public readonly region = 'bermuda-triangle-1';\n public readonly name = regionInfo.FactName.servicePrincipal('s3.amazonaws.com');\n public readonly value = 's3-website.bermuda-triangle-1.nowhere.com';\n}\n\nregionInfo.Fact.register(new MyFact());",
|
|
127
118
|
"version": "0"
|
|
128
119
|
}
|
|
129
120
|
},
|
|
@@ -134,40 +125,50 @@
|
|
|
134
125
|
},
|
|
135
126
|
"field": {
|
|
136
127
|
"field": "markdown",
|
|
137
|
-
"line":
|
|
128
|
+
"line": 58
|
|
138
129
|
}
|
|
139
130
|
},
|
|
140
|
-
"didCompile":
|
|
141
|
-
"fqnsReferenced": [
|
|
142
|
-
|
|
131
|
+
"didCompile": true,
|
|
132
|
+
"fqnsReferenced": [
|
|
133
|
+
"@aws-cdk/region-info.Fact",
|
|
134
|
+
"@aws-cdk/region-info.Fact#register",
|
|
135
|
+
"@aws-cdk/region-info.FactName",
|
|
136
|
+
"@aws-cdk/region-info.FactName#servicePrincipal",
|
|
137
|
+
"@aws-cdk/region-info.IFact"
|
|
138
|
+
],
|
|
139
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\nimport * as regionInfo from '@aws-cdk/region-info';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n // Code snippet begins after !show marker below\n/// !show\nclass MyFact implements regionInfo.IFact {\n public readonly region = 'bermuda-triangle-1';\n public readonly name = regionInfo.FactName.servicePrincipal('s3.amazonaws.com');\n public readonly value = 's3-website.bermuda-triangle-1.nowhere.com';\n}\n\nregionInfo.Fact.register(new MyFact());\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}",
|
|
143
140
|
"syntaxKindCounter": {
|
|
144
141
|
"10": 3,
|
|
145
|
-
"75":
|
|
146
|
-
"
|
|
147
|
-
"
|
|
142
|
+
"75": 13,
|
|
143
|
+
"119": 3,
|
|
144
|
+
"138": 3,
|
|
145
|
+
"159": 3,
|
|
146
|
+
"194": 5,
|
|
148
147
|
"196": 2,
|
|
148
|
+
"197": 1,
|
|
149
|
+
"216": 1,
|
|
149
150
|
"226": 1,
|
|
150
|
-
"
|
|
151
|
-
"
|
|
151
|
+
"245": 1,
|
|
152
|
+
"279": 1
|
|
152
153
|
},
|
|
153
|
-
"fqnsFingerprint": "
|
|
154
|
+
"fqnsFingerprint": "f7a4615e2ac6e78afbe7ca6a095da6e38f88c322ffc3b4e1bbf33546903cd228"
|
|
154
155
|
},
|
|
155
|
-
"
|
|
156
|
+
"b28a6dffa259fdcfc0f39522cce521f3e25b32d48ec152d55f9c1d22e6241d3e": {
|
|
156
157
|
"translations": {
|
|
157
158
|
"python": {
|
|
158
|
-
"source": "region_info.
|
|
159
|
-
"version": "
|
|
159
|
+
"source": "class MyFact(region_info.IFact):\n\nregion_info.Fact.register(MyFact(), True)",
|
|
160
|
+
"version": "2"
|
|
160
161
|
},
|
|
161
162
|
"csharp": {
|
|
162
|
-
"source": "
|
|
163
|
+
"source": "class MyFact : IFact\n{\n public readonly void Region = \"us-east-1\";\n public readonly void Name = FactName.ServicePrincipal(\"service.amazonaws.com\");\n public readonly void Value = \"the-correct-principal.amazonaws.com\";\n}\n\nFact.Register(new MyFact(), true);",
|
|
163
164
|
"version": "1"
|
|
164
165
|
},
|
|
165
166
|
"java": {
|
|
166
|
-
"source": "
|
|
167
|
+
"source": "public class MyFact implements IFact {\n public final Object region;\n public final Object name;\n public final Object value;\n}\n\nFact.register(new MyFact(), true);",
|
|
167
168
|
"version": "1"
|
|
168
169
|
},
|
|
169
170
|
"$": {
|
|
170
|
-
"source": "regionInfo.
|
|
171
|
+
"source": "class MyFact implements regionInfo.IFact {\n public readonly region = 'us-east-1';\n public readonly name = regionInfo.FactName.servicePrincipal('service.amazonaws.com');\n public readonly value = 'the-correct-principal.amazonaws.com';\n}\n\nregionInfo.Fact.register(new MyFact(), true /* Allow overriding information */);",
|
|
171
172
|
"version": "0"
|
|
172
173
|
}
|
|
173
174
|
},
|
|
@@ -178,41 +179,51 @@
|
|
|
178
179
|
},
|
|
179
180
|
"field": {
|
|
180
181
|
"field": "markdown",
|
|
181
|
-
"line":
|
|
182
|
+
"line": 74
|
|
182
183
|
}
|
|
183
184
|
},
|
|
184
|
-
"didCompile":
|
|
185
|
-
"fqnsReferenced": [
|
|
186
|
-
|
|
185
|
+
"didCompile": true,
|
|
186
|
+
"fqnsReferenced": [
|
|
187
|
+
"@aws-cdk/region-info.Fact",
|
|
188
|
+
"@aws-cdk/region-info.Fact#register",
|
|
189
|
+
"@aws-cdk/region-info.FactName",
|
|
190
|
+
"@aws-cdk/region-info.FactName#servicePrincipal",
|
|
191
|
+
"@aws-cdk/region-info.IFact"
|
|
192
|
+
],
|
|
193
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\nimport * as regionInfo from '@aws-cdk/region-info';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n // Code snippet begins after !show marker below\n/// !show\nclass MyFact implements regionInfo.IFact {\n public readonly region = 'us-east-1';\n public readonly name = regionInfo.FactName.servicePrincipal('service.amazonaws.com');\n public readonly value = 'the-correct-principal.amazonaws.com';\n}\n\nregionInfo.Fact.register(new MyFact(), true /* Allow overriding information */);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}",
|
|
187
194
|
"syntaxKindCounter": {
|
|
188
195
|
"10": 3,
|
|
189
|
-
"75":
|
|
196
|
+
"75": 13,
|
|
190
197
|
"106": 1,
|
|
191
|
-
"
|
|
192
|
-
"
|
|
198
|
+
"119": 3,
|
|
199
|
+
"138": 3,
|
|
200
|
+
"159": 3,
|
|
201
|
+
"194": 5,
|
|
193
202
|
"196": 2,
|
|
203
|
+
"197": 1,
|
|
204
|
+
"216": 1,
|
|
194
205
|
"226": 1,
|
|
195
|
-
"
|
|
196
|
-
"
|
|
206
|
+
"245": 1,
|
|
207
|
+
"279": 1
|
|
197
208
|
},
|
|
198
|
-
"fqnsFingerprint": "
|
|
209
|
+
"fqnsFingerprint": "f7a4615e2ac6e78afbe7ca6a095da6e38f88c322ffc3b4e1bbf33546903cd228"
|
|
199
210
|
},
|
|
200
|
-
"
|
|
211
|
+
"1e7225b55e6d93d1fe22965126f2a2863a40b15738193388de5926107f7c92f9": {
|
|
201
212
|
"translations": {
|
|
202
213
|
"python": {
|
|
203
|
-
"source": "
|
|
204
|
-
"version": "
|
|
214
|
+
"source": "class MyFact(region_info.IFact):\n\nregion_info.Fact.register(MyFact())",
|
|
215
|
+
"version": "2"
|
|
205
216
|
},
|
|
206
217
|
"csharp": {
|
|
207
|
-
"source": "
|
|
218
|
+
"source": "class MyFact : IFact\n{\n public readonly void Region = \"bermuda-triangle-1\";\n public readonly void Name = FactName.ServicePrincipal(\"s3.amazonaws.com\");\n public readonly void Value = \"s3-website.bermuda-triangle-1.nowhere.com\";\n}\n\nFact.Register(new MyFact());",
|
|
208
219
|
"version": "1"
|
|
209
220
|
},
|
|
210
221
|
"java": {
|
|
211
|
-
"source": "
|
|
222
|
+
"source": "public class MyFact implements IFact {\n public final Object region;\n public final Object name;\n public final Object value;\n}\n\nFact.register(new MyFact());",
|
|
212
223
|
"version": "1"
|
|
213
224
|
},
|
|
214
225
|
"$": {
|
|
215
|
-
"source": "
|
|
226
|
+
"source": "class MyFact implements regionInfo.IFact {\n public readonly region = 'bermuda-triangle-1';\n public readonly name = regionInfo.FactName.servicePrincipal('s3.amazonaws.com');\n public readonly value = 's3-website.bermuda-triangle-1.nowhere.com';\n}\n\nregionInfo.Fact.register(new MyFact());",
|
|
216
227
|
"version": "0"
|
|
217
228
|
}
|
|
218
229
|
},
|
|
@@ -228,43 +239,44 @@
|
|
|
228
239
|
"didCompile": true,
|
|
229
240
|
"fqnsReferenced": [
|
|
230
241
|
"@aws-cdk/region-info.Fact",
|
|
231
|
-
"@aws-cdk/region-info.Fact#
|
|
242
|
+
"@aws-cdk/region-info.Fact#register",
|
|
232
243
|
"@aws-cdk/region-info.FactName",
|
|
233
|
-
"@aws-cdk/region-info.FactName#
|
|
234
|
-
"@aws-cdk/region-info.
|
|
244
|
+
"@aws-cdk/region-info.FactName#servicePrincipal",
|
|
245
|
+
"@aws-cdk/region-info.IFact"
|
|
235
246
|
],
|
|
236
|
-
"fullSource": "
|
|
247
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\nimport * as regionInfo from '@aws-cdk/region-info';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n // Code snippet begins after !show marker below\n/// !show\nclass MyFact implements regionInfo.IFact {\n public readonly region = 'bermuda-triangle-1';\n public readonly name = regionInfo.FactName.servicePrincipal('s3.amazonaws.com');\n public readonly value = 's3-website.bermuda-triangle-1.nowhere.com';\n}\n\nregionInfo.Fact.register(new MyFact());\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}",
|
|
237
248
|
"syntaxKindCounter": {
|
|
238
|
-
"10":
|
|
239
|
-
"75":
|
|
240
|
-
"
|
|
241
|
-
"
|
|
242
|
-
"
|
|
243
|
-
"
|
|
244
|
-
"
|
|
245
|
-
"
|
|
246
|
-
"
|
|
247
|
-
"
|
|
248
|
-
"
|
|
249
|
+
"10": 3,
|
|
250
|
+
"75": 13,
|
|
251
|
+
"119": 3,
|
|
252
|
+
"138": 3,
|
|
253
|
+
"159": 3,
|
|
254
|
+
"194": 5,
|
|
255
|
+
"196": 2,
|
|
256
|
+
"197": 1,
|
|
257
|
+
"216": 1,
|
|
258
|
+
"226": 1,
|
|
259
|
+
"245": 1,
|
|
260
|
+
"279": 1
|
|
249
261
|
},
|
|
250
|
-
"fqnsFingerprint": "
|
|
262
|
+
"fqnsFingerprint": "f7a4615e2ac6e78afbe7ca6a095da6e38f88c322ffc3b4e1bbf33546903cd228"
|
|
251
263
|
},
|
|
252
|
-
"
|
|
264
|
+
"7e41d76957d60b415d149e62e925ab70177482fd56fa1c1a0483efd35b91e28c": {
|
|
253
265
|
"translations": {
|
|
254
266
|
"python": {
|
|
255
|
-
"source": "
|
|
256
|
-
"version": "
|
|
267
|
+
"source": "class MyFact(region_info.IFact):\n\nregion_info.Fact.register(MyFact())",
|
|
268
|
+
"version": "2"
|
|
257
269
|
},
|
|
258
270
|
"csharp": {
|
|
259
|
-
"source": "
|
|
271
|
+
"source": "class MyFact : IFact\n{\n public readonly void Region = \"bermuda-triangle-1\";\n public readonly void Name = FactName.ServicePrincipal(\"s3.amazonaws.com\");\n public readonly void Value = \"s3-website.bermuda-triangle-1.nowhere.com\";\n}\n\nFact.Register(new MyFact());",
|
|
260
272
|
"version": "1"
|
|
261
273
|
},
|
|
262
274
|
"java": {
|
|
263
|
-
"source": "
|
|
275
|
+
"source": "public class MyFact implements IFact {\n public final Object region;\n public final Object name;\n public final Object value;\n}\n\nFact.register(new MyFact());",
|
|
264
276
|
"version": "1"
|
|
265
277
|
},
|
|
266
278
|
"$": {
|
|
267
|
-
"source": "
|
|
279
|
+
"source": "class MyFact implements regionInfo.IFact {\n public readonly region = 'bermuda-triangle-1';\n public readonly name = regionInfo.FactName.servicePrincipal('s3.amazonaws.com');\n public readonly value = 's3-website.bermuda-triangle-1.nowhere.com';\n}\n\nregionInfo.Fact.register(new MyFact());",
|
|
268
280
|
"version": "0"
|
|
269
281
|
}
|
|
270
282
|
},
|
|
@@ -280,43 +292,44 @@
|
|
|
280
292
|
"didCompile": true,
|
|
281
293
|
"fqnsReferenced": [
|
|
282
294
|
"@aws-cdk/region-info.Fact",
|
|
283
|
-
"@aws-cdk/region-info.Fact#
|
|
295
|
+
"@aws-cdk/region-info.Fact#register",
|
|
284
296
|
"@aws-cdk/region-info.FactName",
|
|
285
|
-
"@aws-cdk/region-info.FactName#
|
|
286
|
-
"@aws-cdk/region-info.
|
|
297
|
+
"@aws-cdk/region-info.FactName#servicePrincipal",
|
|
298
|
+
"@aws-cdk/region-info.IFact"
|
|
287
299
|
],
|
|
288
|
-
"fullSource": "
|
|
300
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\nimport * as regionInfo from '@aws-cdk/region-info';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n // Code snippet begins after !show marker below\n/// !show\nclass MyFact implements regionInfo.IFact {\n public readonly region = 'bermuda-triangle-1';\n public readonly name = regionInfo.FactName.servicePrincipal('s3.amazonaws.com');\n public readonly value = 's3-website.bermuda-triangle-1.nowhere.com';\n}\n\nregionInfo.Fact.register(new MyFact());\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}",
|
|
289
301
|
"syntaxKindCounter": {
|
|
290
|
-
"10":
|
|
291
|
-
"75":
|
|
292
|
-
"
|
|
293
|
-
"
|
|
294
|
-
"
|
|
295
|
-
"
|
|
296
|
-
"
|
|
297
|
-
"
|
|
298
|
-
"
|
|
299
|
-
"
|
|
300
|
-
"
|
|
302
|
+
"10": 3,
|
|
303
|
+
"75": 13,
|
|
304
|
+
"119": 3,
|
|
305
|
+
"138": 3,
|
|
306
|
+
"159": 3,
|
|
307
|
+
"194": 5,
|
|
308
|
+
"196": 2,
|
|
309
|
+
"197": 1,
|
|
310
|
+
"216": 1,
|
|
311
|
+
"226": 1,
|
|
312
|
+
"245": 1,
|
|
313
|
+
"279": 1
|
|
301
314
|
},
|
|
302
|
-
"fqnsFingerprint": "
|
|
315
|
+
"fqnsFingerprint": "f7a4615e2ac6e78afbe7ca6a095da6e38f88c322ffc3b4e1bbf33546903cd228"
|
|
303
316
|
},
|
|
304
|
-
"
|
|
317
|
+
"246a1e22770a1de1a26823c85aa2a2f0c6751cc96dab238e41e5d91cd3c311b0": {
|
|
305
318
|
"translations": {
|
|
306
319
|
"python": {
|
|
307
|
-
"source": "
|
|
308
|
-
"version": "
|
|
320
|
+
"source": "# Get the information for \"eu-west-1\":\nregion = region_info.RegionInfo.get(\"eu-west-1\")\n\n# Access attributes:\nregion.s3_static_website_endpoint # s3-website-eu-west-1.amazonaws.com\nregion.service_principal(\"logs.amazonaws.com\")",
|
|
321
|
+
"version": "2"
|
|
309
322
|
},
|
|
310
323
|
"csharp": {
|
|
311
|
-
"source": "
|
|
324
|
+
"source": "// Get the information for \"eu-west-1\":\nRegionInfo region = RegionInfo.Get(\"eu-west-1\");\n\n// Access attributes:\nregion.S3StaticWebsiteEndpoint; // s3-website-eu-west-1.amazonaws.com\nregion.ServicePrincipal(\"logs.amazonaws.com\");",
|
|
312
325
|
"version": "1"
|
|
313
326
|
},
|
|
314
327
|
"java": {
|
|
315
|
-
"source": "
|
|
328
|
+
"source": "// Get the information for \"eu-west-1\":\nRegionInfo region = RegionInfo.get(\"eu-west-1\");\n\n// Access attributes:\nregion.getS3StaticWebsiteEndpoint(); // s3-website-eu-west-1.amazonaws.com\nregion.servicePrincipal(\"logs.amazonaws.com\");",
|
|
316
329
|
"version": "1"
|
|
317
330
|
},
|
|
318
331
|
"$": {
|
|
319
|
-
"source": "
|
|
332
|
+
"source": "// Get the information for \"eu-west-1\":\nconst region = regionInfo.RegionInfo.get('eu-west-1');\n\n// Access attributes:\nregion.s3StaticWebsiteEndpoint; // s3-website-eu-west-1.amazonaws.com\nregion.servicePrincipal('logs.amazonaws.com'); // logs.eu-west-1.amazonaws.com",
|
|
320
333
|
"version": "0"
|
|
321
334
|
}
|
|
322
335
|
},
|
|
@@ -335,21 +348,16 @@
|
|
|
335
348
|
"@aws-cdk/region-info.RegionInfo#get",
|
|
336
349
|
"@aws-cdk/region-info.RegionInfo#servicePrincipal"
|
|
337
350
|
],
|
|
338
|
-
"fullSource": "
|
|
351
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\nimport * as regionInfo from '@aws-cdk/region-info';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n // Code snippet begins after !show marker below\n/// !show\n// Get the information for \"eu-west-1\":\nconst region = regionInfo.RegionInfo.get('eu-west-1');\n\n// Access attributes:\nregion.s3StaticWebsiteEndpoint; // s3-website-eu-west-1.amazonaws.com\nregion.servicePrincipal('logs.amazonaws.com');\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}",
|
|
339
352
|
"syntaxKindCounter": {
|
|
340
|
-
"10":
|
|
353
|
+
"10": 2,
|
|
341
354
|
"75": 8,
|
|
342
|
-
"194":
|
|
355
|
+
"194": 4,
|
|
343
356
|
"196": 2,
|
|
344
357
|
"225": 1,
|
|
345
358
|
"226": 2,
|
|
346
359
|
"242": 1,
|
|
347
|
-
"243": 1
|
|
348
|
-
"254": 1,
|
|
349
|
-
"255": 1,
|
|
350
|
-
"257": 1,
|
|
351
|
-
"258": 1,
|
|
352
|
-
"290": 1
|
|
360
|
+
"243": 1
|
|
353
361
|
},
|
|
354
362
|
"fqnsFingerprint": "97ec6b3ee5dcd55ca63753f03b0a23616036e346c91ff93309e28737431af21d"
|
|
355
363
|
}
|
package/README.md
CHANGED
|
@@ -22,10 +22,8 @@ the form of the `RegionInfo` class. This is the preferred way to interact with
|
|
|
22
22
|
the regional information database:
|
|
23
23
|
|
|
24
24
|
```ts
|
|
25
|
-
import { RegionInfo } from '@aws-cdk/region-info';
|
|
26
|
-
|
|
27
25
|
// Get the information for "eu-west-1":
|
|
28
|
-
const region = RegionInfo.get('eu-west-1');
|
|
26
|
+
const region = regionInfo.RegionInfo.get('eu-west-1');
|
|
29
27
|
|
|
30
28
|
// Access attributes:
|
|
31
29
|
region.s3StaticWebsiteEndpoint; // s3-website-eu-west-1.amazonaws.com
|
|
@@ -44,8 +42,6 @@ a list of known fact names, which can then be used with the `RegionInfo` to
|
|
|
44
42
|
retrieve a particular value:
|
|
45
43
|
|
|
46
44
|
```ts
|
|
47
|
-
import * as regionInfo from '@aws-cdk/region-info';
|
|
48
|
-
|
|
49
45
|
const codeDeployPrincipal = regionInfo.Fact.find('us-east-1', regionInfo.FactName.servicePrincipal('codedeploy.amazonaws.com'));
|
|
50
46
|
// => codedeploy.us-east-1.amazonaws.com
|
|
51
47
|
|
|
@@ -60,11 +56,13 @@ missing from the library. In such cases, the `Fact.register` method can be used
|
|
|
60
56
|
to inject FactName into the database:
|
|
61
57
|
|
|
62
58
|
```ts
|
|
63
|
-
regionInfo.
|
|
64
|
-
region
|
|
65
|
-
name
|
|
66
|
-
value
|
|
67
|
-
}
|
|
59
|
+
class MyFact implements regionInfo.IFact {
|
|
60
|
+
public readonly region = 'bermuda-triangle-1';
|
|
61
|
+
public readonly name = regionInfo.FactName.servicePrincipal('s3.amazonaws.com');
|
|
62
|
+
public readonly value = 's3-website.bermuda-triangle-1.nowhere.com';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
regionInfo.Fact.register(new MyFact());
|
|
68
66
|
```
|
|
69
67
|
|
|
70
68
|
## Overriding incorrect information
|
|
@@ -74,11 +72,13 @@ overridden using the same `Fact.register` method demonstrated above, simply
|
|
|
74
72
|
adding an extra boolean argument:
|
|
75
73
|
|
|
76
74
|
```ts
|
|
77
|
-
regionInfo.
|
|
78
|
-
region
|
|
79
|
-
name
|
|
80
|
-
value
|
|
81
|
-
}
|
|
75
|
+
class MyFact implements regionInfo.IFact {
|
|
76
|
+
public readonly region = 'us-east-1';
|
|
77
|
+
public readonly name = regionInfo.FactName.servicePrincipal('service.amazonaws.com');
|
|
78
|
+
public readonly value = 'the-correct-principal.amazonaws.com';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
regionInfo.Fact.register(new MyFact(), true /* Allow overriding information */);
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
If you happen to have stumbled upon incorrect data built into this library, it
|