]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
snippets for aws cli security-groups
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 14 Mar 2016 16:52:01 +0000 (17:52 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 14 Mar 2016 16:52:01 +0000 (17:52 +0100)
- 2 new snippets to query aws cli security groups and details.

snippets/eshell-mode/aws-ec2-get-securitygroup-details [new file with mode: 0644]
snippets/eshell-mode/aws-ec2-get-securitygroups [new file with mode: 0644]

diff --git a/snippets/eshell-mode/aws-ec2-get-securitygroup-details b/snippets/eshell-mode/aws-ec2-get-securitygroup-details
new file mode 100644 (file)
index 0000000..9792a12
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: aws-ec2-get-securitygroup-details (yank)
+# key: aws-ec2-get-securitygroup-details
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-security-groups --group-ids ${4:`(yank)`} $0
\ No newline at end of file
diff --git a/snippets/eshell-mode/aws-ec2-get-securitygroups b/snippets/eshell-mode/aws-ec2-get-securitygroups
new file mode 100644 (file)
index 0000000..d21779b
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: aws-ec2-get-securitygroups
+# key: aws-ec2-get-securitygroups
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-security-groups --query "sort_by(SecurityGroups, &GroupName)[*].[GroupName, GroupId, Description]" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file