link2aws 1.0.17 → 1.0.18
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 +31 -13
- package/package.json +1 -1
package/link2aws.js
CHANGED
|
@@ -12,6 +12,7 @@ class ARN {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// arn:partition:service:region:account-id:...
|
|
15
|
+
this.arn = text;
|
|
15
16
|
this.prefix = tokens[0];
|
|
16
17
|
this.partition = tokens[1];
|
|
17
18
|
this.service = tokens[2];
|
|
@@ -187,14 +188,17 @@ class ARN {
|
|
|
187
188
|
"workgroup": null,
|
|
188
189
|
},
|
|
189
190
|
"autoscaling": { // Amazon EC2 Auto Scaling
|
|
190
|
-
"autoScalingGroup":
|
|
191
|
+
"autoScalingGroup": () => {
|
|
192
|
+
const groupName = this.resource.split('/')[1];
|
|
193
|
+
return `https://${this.region}.${this.console}/ec2/home?region=${this.region}#AutoScalingGroupDetails:id=${groupName};view=details`
|
|
194
|
+
},
|
|
191
195
|
"launchConfiguration": null,
|
|
192
196
|
},
|
|
193
197
|
"aws-marketplace": { // AWS Marketplace Catalog
|
|
194
198
|
},
|
|
195
199
|
"backup": { // AWS Backup
|
|
196
200
|
"backup-plan": null,
|
|
197
|
-
"backup-vault":
|
|
201
|
+
"backup-vault": () => `https://${this.console}/backup/home?region=${this.region}#/backupvaults/details/${this.resource}`,
|
|
198
202
|
},
|
|
199
203
|
"batch": { // AWS Batch
|
|
200
204
|
"job-definition": null,
|
|
@@ -228,7 +232,7 @@ class ARN {
|
|
|
228
232
|
"stackset": null,
|
|
229
233
|
},
|
|
230
234
|
"cloudfront": { // Amazon CloudFront
|
|
231
|
-
"distribution":
|
|
235
|
+
"distribution": () => `https://${this.console}/cloudfront/v4/home#/distributions/${this.resource}`,
|
|
232
236
|
"origin-access-identity": null,
|
|
233
237
|
"streaming-distribution": null,
|
|
234
238
|
},
|
|
@@ -449,9 +453,14 @@ class ARN {
|
|
|
449
453
|
"task-set": null,
|
|
450
454
|
},
|
|
451
455
|
"eks": { // Amazon Elastic Container Service for Kubernetes
|
|
452
|
-
"cluster":
|
|
456
|
+
"cluster": () => `https://${this.console}/eks/home?region=${this.region}#/clusters/${this.resource}`,
|
|
453
457
|
"fargateprofile": null,
|
|
454
|
-
"nodegroup":
|
|
458
|
+
"nodegroup": () => {
|
|
459
|
+
const arr = this.resource.split('/');
|
|
460
|
+
const clusterName = arr[0];
|
|
461
|
+
const nodegroupName = arr[1];
|
|
462
|
+
return `https://${this.console}/eks/home?region=${this.region}#/clusters/${clusterName}/nodegroups/${nodegroupName}`
|
|
463
|
+
},
|
|
455
464
|
},
|
|
456
465
|
"elastic-inference": { // Amazon Elastic Inference
|
|
457
466
|
"elastic-inference-accelerator": null,
|
|
@@ -494,7 +503,7 @@ class ARN {
|
|
|
494
503
|
"execute-api": { // Amazon API Gateway
|
|
495
504
|
},
|
|
496
505
|
"firehose": { // Amazon Kinesis Firehose
|
|
497
|
-
"deliverystream":
|
|
506
|
+
"deliverystream": () => `https://${this.console}/firehose/home?region=${this.region}#/details/${this.resource}/monitoring`,
|
|
498
507
|
},
|
|
499
508
|
"fms": { // AWS Firewall Manager
|
|
500
509
|
"policy": null,
|
|
@@ -660,7 +669,7 @@ class ARN {
|
|
|
660
669
|
},
|
|
661
670
|
"kms": { // AWS Key Management Service
|
|
662
671
|
"alias": null,
|
|
663
|
-
"key":
|
|
672
|
+
"key": () => `https://${this.console}/kms/home?region=${this.region}#/kms/keys/${this.resource}`,
|
|
664
673
|
},
|
|
665
674
|
"lambda": { // AWS Lambda
|
|
666
675
|
"event-source-mapping": null,
|
|
@@ -825,19 +834,19 @@ class ARN {
|
|
|
825
834
|
"resource-share-invitation": null,
|
|
826
835
|
},
|
|
827
836
|
"rds": { // Amazon RDS
|
|
828
|
-
"cluster":
|
|
837
|
+
"cluster": () => `https://${this.console}/rds/home?region=${this.region}#database:id=${this.resource};is-cluster=true`,
|
|
829
838
|
"cluster-endpoint": null,
|
|
830
839
|
"cluster-pg": null,
|
|
831
840
|
"cluster-snapshot": null,
|
|
832
|
-
"db":
|
|
841
|
+
"db": () => `https://${this.console}/rds/home?region=${this.region}#database:id=${this.resource}`,
|
|
833
842
|
"db-proxy": null,
|
|
834
843
|
"es": null,
|
|
835
|
-
"og":
|
|
844
|
+
"og": () => `https://${this.console}/rds/home?region=${this.region}#option-group-details:option-group-name=${this.resource}`,
|
|
836
845
|
"pg": null,
|
|
837
846
|
"ri": null,
|
|
838
847
|
"secgrp": null,
|
|
839
|
-
"snapshot":
|
|
840
|
-
"subgrp":
|
|
848
|
+
"snapshot": () => `https://${this.console}/rds/home?region=${this.region}#db-snapshot:id=${this.resource}`,
|
|
849
|
+
"subgrp": () => `https://${this.console}/rds/home?region=${this.region}#db-subnet-group:id=${this.resource}`,
|
|
841
850
|
"target": null,
|
|
842
851
|
"target-group": null,
|
|
843
852
|
},
|
|
@@ -969,6 +978,7 @@ class ARN {
|
|
|
969
978
|
"": null,
|
|
970
979
|
},
|
|
971
980
|
"sns": { // Amazon SNS
|
|
981
|
+
"": () => `https://${this.console}/sns/v3/home?region=${this.region}#/topic/${this.arn}`,
|
|
972
982
|
},
|
|
973
983
|
"sqs": { // Amazon SQS
|
|
974
984
|
"": () => `https://${this.region}.${this.console}/sqs/v2/home?region=${this.region}#/queues/https%3A%2F%2Fsqs.${this.region}.amazonaws.com%2F${this.account}%2F${this.resource}`
|
|
@@ -1044,7 +1054,15 @@ class ARN {
|
|
|
1044
1054
|
"webacl": null,
|
|
1045
1055
|
"xssmatchset": null,
|
|
1046
1056
|
},
|
|
1047
|
-
"wafv2": {
|
|
1057
|
+
"wafv2": { // AWS WAF V2
|
|
1058
|
+
"global": () => {
|
|
1059
|
+
const resource = this.resource.replace("webacl/", "");
|
|
1060
|
+
return `https://${this.console}/wafv2/homev2/web-acl/${resource}/overview?region=global`
|
|
1061
|
+
},
|
|
1062
|
+
"regional": () => {
|
|
1063
|
+
const resource = this.resource.replace("webacl/", "");
|
|
1064
|
+
return `https://${this.console}/wafv2/homev2/web-acl/${resource}/overview?region=${this.region}`
|
|
1065
|
+
}
|
|
1048
1066
|
},
|
|
1049
1067
|
"wellarchitected": { // AWS Well-Architected Tool
|
|
1050
1068
|
"workload": null,
|