link2aws 1.0.21 → 1.0.23

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.
Files changed (2) hide show
  1. package/link2aws.js +12 -2
  2. package/package.json +1 -1
package/link2aws.js CHANGED
@@ -293,6 +293,9 @@ class ARN {
293
293
  },
294
294
  "codecommit": { // Amazon CodeGuru Reviewer
295
295
  },
296
+ "codeconnections": { // AWS CodeConnections
297
+ "connection": () => `https://${this.region}.${this.console}/codesuite/settings/${this.account}/${this.region}/${this.service}/${this.resource_type}s/${this.resource}`,
298
+ },
296
299
  "codedeploy": { // AWS CodeDeploy
297
300
  "application": null,
298
301
  "deploymentconfig": null,
@@ -315,7 +318,7 @@ class ARN {
315
318
  "project": null,
316
319
  },
317
320
  "codestar-connections": { // AWS CodeStar Connections
318
- "connection": null,
321
+ "connection": () => `https://${this.region}.${this.console}/codesuite/settings/${this.account}/${this.region}/${this.service}/${this.resource_type}s/${this.resource}`,
319
322
  },
320
323
  "codestar-notifications": { // AWS CodeStar Notifications
321
324
  "notificationrule": null,
@@ -975,7 +978,14 @@ class ARN {
975
978
  "domain": null,
976
979
  },
977
980
  "secretsmanager": { // AWS Secrets Manager
978
- "secret": null,
981
+ "secret": () => {
982
+ const arnSuffix = /-\w{6}$/;
983
+ if (!arnSuffix.test(this.resource)) {
984
+ throw Error(`Secret ARN for "${this.resource}" appears invalid, should end with ${arnSuffix}`);
985
+ }
986
+ const name = this.resource.replace(arnSuffix, "");
987
+ return `https://${this.region}.${this.console}/${this.service}/${this.resource_type}?name=${name}`;
988
+ },
979
989
  },
980
990
  "securityhub": { // AWS Security Hub
981
991
  "hub": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "link2aws",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Convert ARN (Amazon Resource Name) to AWS Console link",
5
5
  "main": "link2aws.js",
6
6
  "directories": {