link2aws 1.0.22 → 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.
- package/link2aws.js +8 -1
- package/package.json +1 -1
package/link2aws.js
CHANGED
|
@@ -978,7 +978,14 @@ class ARN {
|
|
|
978
978
|
"domain": null,
|
|
979
979
|
},
|
|
980
980
|
"secretsmanager": { // AWS Secrets Manager
|
|
981
|
-
"secret":
|
|
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
|
+
},
|
|
982
989
|
},
|
|
983
990
|
"securityhub": { // AWS Security Hub
|
|
984
991
|
"hub": null,
|