everybody loves yasnippets!
- aws-ec2-get-snapshots
- aws-ec2-get-volumes
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-snapshots
+# key: snap-ls
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-snapshots --query 'Snapshots[].[StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-volumes
+# key: ebs-ls
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-volumes --query 'Volumes[].[VolumeId,State,SnapshotId,join(\`,\`,Tags[?Key==\`Name\`].Value)]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0