]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
new aws snippets
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 5 Sep 2016 13:03:19 +0000 (15:03 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Mon, 5 Sep 2016 13:03:19 +0000 (15:03 +0200)
- ec2-userdata
- ebs-details

snippets/eshell-mode/aws-ec2-describe-userdata [new file with mode: 0644]
snippets/eshell-mode/aws-ec2-volume-details [new file with mode: 0644]

diff --git a/snippets/eshell-mode/aws-ec2-describe-userdata b/snippets/eshell-mode/aws-ec2-describe-userdata
new file mode 100644 (file)
index 0000000..af3c3e6
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: aws-ec2-describe-userdata (yank)
+# key: ec2-userdata
+# --
+(base64-decode-string (shell-command-to-string "aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} ec2 describe-instance-attribute --instance-id ${4:`(yank)`} --attribute userData --query 'UserData.Value' --output text"))$0
diff --git a/snippets/eshell-mode/aws-ec2-volume-details b/snippets/eshell-mode/aws-ec2-volume-details
new file mode 100644 (file)
index 0000000..cd2663c
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: aws-ec2-volume-details
+# key: ebs-details
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-volumes --volume-ids ${4:`(yank)`}  --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0