@aws-cdk/region-info 2.148.1 → 2.150.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 CHANGED
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "name": "@aws-cdk/region-info",
33
33
  "readme": {
34
- "markdown": "# AWS Region-Specific Information Directory\n\n\n## Usage\n\nSome information used in CDK Applications differs from one AWS region to\nanother, such as service principals used in IAM policies, S3 static website\nendpoints, ...\n\n### The `RegionInfo` class\n\nThe library offers a simple interface to obtain region specific information in\nthe form of the `RegionInfo` class. This is the preferred way to interact with\nthe regional information database:\n\n```ts\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'); // logs.eu-west-1.amazonaws.com\n```\n\nThe `RegionInfo` layer is built on top of the Low-Level API, which is described\nbelow and can be used to register additional data, including user-defined facts\nthat are not available through the `RegionInfo` interface.\n\n### Low-Level API\n\nThis library offers a primitive database of such information so that CDK\nconstructs can easily access regional information. The `FactName` class provides\na list of known fact names, which can then be used with the `RegionInfo` to\nretrieve a particular value:\n\n```ts\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// => s3-website-ap-northeast-1.amazonaws.com\n```\n\n## Supplying new or missing information\n\nAs new regions are released, it might happen that a particular fact you need is\nmissing from the library. In such cases, the `Fact.register` method can be used\nto inject FactName into the database:\n\n```ts\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```\n\n## Overriding incorrect information\n\nIn the event information provided by the library is incorrect, it can be\noverridden using the same `Fact.register` method demonstrated above, simply\nadding an extra boolean argument:\n\n```ts\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```\n\nIf you happen to have stumbled upon incorrect data built into this library, it\nis always a good idea to report your findings in a [GitHub issue], so we can fix\nit for everyone else!\n\n[GitHub issue]: https://github.com/aws/aws-cdk/issues\n\n---\n\nThis module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.\n"
34
+ "markdown": "# AWS Region-Specific Information Directory\n\n## Usage\n\nSome information used in CDK Applications differs from one AWS region to\nanother, such as service principals used in IAM policies, S3 static website\nendpoints, ...\n\n### The `RegionInfo` class\n\nThe library offers a simple interface to obtain region specific information in\nthe form of the `RegionInfo` class. This is the preferred way to interact with\nthe regional information database:\n\n```ts\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\n```\n\nThe `RegionInfo` layer is built on top of the Low-Level API, which is described\nbelow and can be used to register additional data, including user-defined facts\nthat are not available through the `RegionInfo` interface.\n\n### Low-Level API\n\nThis library offers a primitive database of such information so that CDK\nconstructs can easily access regional information. The `FactName` class provides\na list of known fact names, which can then be used with the `RegionInfo` to\nretrieve a particular value:\n\n```ts\nconst staticWebsite = regionInfo.Fact.find(\n 'ap-northeast-1',\n regionInfo.FactName.S3_STATIC_WEBSITE_ENDPOINT\n);\n// => s3-website-ap-northeast-1.amazonaws.com\n```\n\n## Supplying new or missing information\n\nAs new regions are released, it might happen that a particular fact you need is\nmissing from the library. In such cases, the `Fact.register` method can be used\nto inject FactName into the database:\n\n```ts\nclass MyFact implements regionInfo.IFact {\n public readonly region = 'bermuda-triangle-1';\n public readonly name = regionInfo.FactName.S3_STATIC_WEBSITE_ENDPOINT;\n public readonly value = 's3-website.bermuda-triangle-1.nowhere.com';\n}\n\nregionInfo.Fact.register(new MyFact());\n```\n\n## Overriding incorrect information\n\nIn the event information provided by the library is incorrect, it can be\noverridden using the same `Fact.register` method demonstrated above, simply\nadding an extra boolean argument:\n\n```ts\nclass MyFact implements regionInfo.IFact {\n public readonly region = 'us-east-1';\n public readonly name = regionInfo.FactName.S3_STATIC_WEBSITE_ENDPOINT;\n public readonly value = 'the-correct-endpoint.amazonaws.com';\n}\n\nregionInfo.Fact.register(new MyFact(), true /* Allow overriding information */);\n```\n\nIf you happen to have stumbled upon incorrect data built into this library, it\nis always a good idea to report your findings in a [GitHub issue], so we can fix\nit for everyone else!\n\n[GitHub issue]: https://github.com/aws/aws-cdk/issues\n\n---\n\nThis module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.\n"
35
35
  },
36
36
  "repository": {
37
37
  "directory": "packages/@aws-cdk/region-info",
@@ -68,25 +68,28 @@
68
68
  "@aws-cdk/region-info.Default": {
69
69
  "assembly": "@aws-cdk/region-info",
70
70
  "docs": {
71
- "stability": "stable",
71
+ "deprecated": "- Service principals are now globally `<SERVICE>.amazonaws.com`, use iam.ServicePrincipal instead.",
72
+ "remarks": "This class is no longer needed because service principals are no longer needed except in very specific cases\nthat are handled in the IAM ServicePrincipal class.",
73
+ "stability": "deprecated",
72
74
  "summary": "Provides default values for certain regional information points."
73
75
  },
74
76
  "fqn": "@aws-cdk/region-info.Default",
75
77
  "kind": "class",
76
78
  "locationInModule": {
77
79
  "filename": "lib/default.ts",
78
- "line": 4
80
+ "line": 7
79
81
  },
80
82
  "methods": [
81
83
  {
82
84
  "docs": {
85
+ "deprecated": "- Service principals are now globally `<SERVICE>.amazonaws.com`, use iam.ServicePrincipal instead.",
83
86
  "remarks": "This is useful for example when\nyou need to compute a service principal name, but you do not have a synthesize-time region literal available (so\nall you have is `{ \"Ref\": \"AWS::Region\" }`). This way you get the same defaulting behavior that is normally used\nfor built-in data.",
84
- "stability": "stable",
87
+ "stability": "deprecated",
85
88
  "summary": "Computes a \"standard\" AWS Service principal for a given service, region and suffix."
86
89
  },
87
90
  "locationInModule": {
88
91
  "filename": "lib/default.ts",
89
- "line": 23
92
+ "line": 30
90
93
  },
91
94
  "name": "servicePrincipal",
92
95
  "parameters": [
@@ -131,13 +134,14 @@
131
134
  {
132
135
  "const": true,
133
136
  "docs": {
134
- "stability": "stable",
137
+ "deprecated": "- Use VpceEndpointService.DEFAULT_PREFIX instead",
138
+ "stability": "deprecated",
135
139
  "summary": "The default value for a VPC Endpoint Service name prefix, useful if you do not have a synthesize-time region literal available (all you have is `{ \"Ref\": \"AWS::Region\" }`)."
136
140
  },
137
141
  "immutable": true,
138
142
  "locationInModule": {
139
143
  "filename": "lib/default.ts",
140
- "line": 11
144
+ "line": 16
141
145
  },
142
146
  "name": "VPC_ENDPOINT_SERVICE_NAME_PREFIX",
143
147
  "static": true,
@@ -418,7 +422,7 @@
418
422
  },
419
423
  "locationInModule": {
420
424
  "filename": "lib/fact.ts",
421
- "line": 241
425
+ "line": 243
422
426
  },
423
427
  "name": "adotLambdaLayer",
424
428
  "parameters": [
@@ -534,7 +538,7 @@
534
538
  },
535
539
  "locationInModule": {
536
540
  "filename": "lib/fact.ts",
537
- "line": 252
541
+ "line": 254
538
542
  },
539
543
  "name": "paramsAndSecretsLambdaLayer",
540
544
  "parameters": [
@@ -566,12 +570,13 @@
566
570
  },
567
571
  {
568
572
  "docs": {
569
- "stability": "stable",
573
+ "deprecated": "- Use `iam.ServicePrincipal.servicePrincipalName()` instead.",
574
+ "stability": "deprecated",
570
575
  "summary": "The name of the regional service principal for a given service."
571
576
  },
572
577
  "locationInModule": {
573
578
  "filename": "lib/fact.ts",
574
- "line": 230
579
+ "line": 232
575
580
  },
576
581
  "name": "servicePrincipal",
577
582
  "parameters": [
@@ -1042,7 +1047,7 @@
1042
1047
  },
1043
1048
  "locationInModule": {
1044
1049
  "filename": "lib/region-info.ts",
1045
- "line": 187
1050
+ "line": 189
1046
1051
  },
1047
1052
  "name": "adotLambdaLayerArn",
1048
1053
  "parameters": [
@@ -1088,7 +1093,7 @@
1088
1093
  },
1089
1094
  "locationInModule": {
1090
1095
  "filename": "lib/region-info.ts",
1091
- "line": 161
1096
+ "line": 163
1092
1097
  },
1093
1098
  "name": "appConfigLambdaArn",
1094
1099
  "parameters": [
@@ -1126,7 +1131,7 @@
1126
1131
  },
1127
1132
  "locationInModule": {
1128
1133
  "filename": "lib/region-info.ts",
1129
- "line": 152
1134
+ "line": 154
1130
1135
  },
1131
1136
  "name": "cloudwatchLambdaInsightsArn",
1132
1137
  "parameters": [
@@ -1164,7 +1169,7 @@
1164
1169
  },
1165
1170
  "locationInModule": {
1166
1171
  "filename": "lib/region-info.ts",
1167
- "line": 197
1172
+ "line": 199
1168
1173
  },
1169
1174
  "name": "paramsAndSecretsLambdaLayerArn",
1170
1175
  "parameters": [
@@ -1196,12 +1201,13 @@
1196
1201
  },
1197
1202
  {
1198
1203
  "docs": {
1199
- "stability": "stable",
1204
+ "deprecated": "- Use `iam.ServicePrincipal.servicePrincipalName()` instead.",
1205
+ "stability": "deprecated",
1200
1206
  "summary": "The name of the service principal for a given service in this region."
1201
1207
  },
1202
1208
  "locationInModule": {
1203
1209
  "filename": "lib/region-info.ts",
1204
- "line": 128
1210
+ "line": 130
1205
1211
  },
1206
1212
  "name": "servicePrincipal",
1207
1213
  "parameters": [
@@ -1298,7 +1304,7 @@
1298
1304
  "immutable": true,
1299
1305
  "locationInModule": {
1300
1306
  "filename": "lib/region-info.ts",
1301
- "line": 169
1307
+ "line": 171
1302
1308
  },
1303
1309
  "name": "appMeshRepositoryAccount",
1304
1310
  "optional": true,
@@ -1314,7 +1320,7 @@
1314
1320
  "immutable": true,
1315
1321
  "locationInModule": {
1316
1322
  "filename": "lib/region-info.ts",
1317
- "line": 143
1323
+ "line": 145
1318
1324
  },
1319
1325
  "name": "dlcRepositoryAccount",
1320
1326
  "optional": true,
@@ -1362,7 +1368,7 @@
1362
1368
  "immutable": true,
1363
1369
  "locationInModule": {
1364
1370
  "filename": "lib/region-info.ts",
1365
- "line": 135
1371
+ "line": 137
1366
1372
  },
1367
1373
  "name": "elbv2Account",
1368
1374
  "optional": true,
@@ -1378,7 +1384,7 @@
1378
1384
  "immutable": true,
1379
1385
  "locationInModule": {
1380
1386
  "filename": "lib/region-info.ts",
1381
- "line": 176
1387
+ "line": 178
1382
1388
  },
1383
1389
  "name": "firehoseCidrBlock",
1384
1390
  "optional": true,
@@ -1442,7 +1448,7 @@
1442
1448
  "immutable": true,
1443
1449
  "locationInModule": {
1444
1450
  "filename": "lib/region-info.ts",
1445
- "line": 204
1451
+ "line": 206
1446
1452
  },
1447
1453
  "name": "samlSignOnUrl",
1448
1454
  "optional": true,
@@ -1470,6 +1476,6 @@
1470
1476
  "symbolId": "lib/region-info:RegionInfo"
1471
1477
  }
1472
1478
  },
1473
- "version": "2.148.1",
1479
+ "version": "2.150.0",
1474
1480
  "fingerprint": "**********"
1475
1481
  }
Binary file
package/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # AWS Region-Specific Information Directory
2
2
 
3
-
4
3
  ## Usage
5
4
 
6
5
  Some information used in CDK Applications differs from one AWS region to
@@ -19,7 +18,6 @@ const region = regionInfo.RegionInfo.get('eu-west-1');
19
18
 
20
19
  // Access attributes:
21
20
  region.s3StaticWebsiteEndpoint; // s3-website-eu-west-1.amazonaws.com
22
- region.servicePrincipal('logs.amazonaws.com'); // logs.eu-west-1.amazonaws.com
23
21
  ```
24
22
 
25
23
  The `RegionInfo` layer is built on top of the Low-Level API, which is described
@@ -34,10 +32,10 @@ a list of known fact names, which can then be used with the `RegionInfo` to
34
32
  retrieve a particular value:
35
33
 
36
34
  ```ts
37
- const codeDeployPrincipal = regionInfo.Fact.find('us-east-1', regionInfo.FactName.servicePrincipal('codedeploy.amazonaws.com'));
38
- // => codedeploy.us-east-1.amazonaws.com
39
-
40
- const staticWebsite = regionInfo.Fact.find('ap-northeast-1', regionInfo.FactName.S3_STATIC_WEBSITE_ENDPOINT);
35
+ const staticWebsite = regionInfo.Fact.find(
36
+ 'ap-northeast-1',
37
+ regionInfo.FactName.S3_STATIC_WEBSITE_ENDPOINT
38
+ );
41
39
  // => s3-website-ap-northeast-1.amazonaws.com
42
40
  ```
43
41
 
@@ -50,7 +48,7 @@ to inject FactName into the database:
50
48
  ```ts
51
49
  class MyFact implements regionInfo.IFact {
52
50
  public readonly region = 'bermuda-triangle-1';
53
- public readonly name = regionInfo.FactName.servicePrincipal('s3.amazonaws.com');
51
+ public readonly name = regionInfo.FactName.S3_STATIC_WEBSITE_ENDPOINT;
54
52
  public readonly value = 's3-website.bermuda-triangle-1.nowhere.com';
55
53
  }
56
54
 
@@ -66,8 +64,8 @@ adding an extra boolean argument:
66
64
  ```ts
67
65
  class MyFact implements regionInfo.IFact {
68
66
  public readonly region = 'us-east-1';
69
- public readonly name = regionInfo.FactName.servicePrincipal('service.amazonaws.com');
70
- public readonly value = 'the-correct-principal.amazonaws.com';
67
+ public readonly name = regionInfo.FactName.S3_STATIC_WEBSITE_ENDPOINT;
68
+ public readonly value = 'the-correct-endpoint.amazonaws.com';
71
69
  }
72
70
 
73
71
  regionInfo.Fact.register(new MyFact(), true /* Allow overriding information */);