- shorter keywords for some aws eshell snippets.
# -*- mode: snippet -*-
# name: aws-ec2-get-instances
-# key: aws-ec2-get-instances
+# key: ec2-ls
# --
aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-instances --query 'Reservations[].Instances[].[join(\`,\`,Tags[?Key==\`Name\`].Value),join(\`,\`,Tags[?Key==\`Schedule\`].Value),InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
# -*- mode: snippet -*-
# name: aws-ec2-start-stop-instance (yank)
-# key: aws-ec2-start_stop-instance
+# key: ec2-start
# --
aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} ec2 ${4:$$(yas-choose-value '("start-instances" "stop-instances"))} --instance-ids ${5:`(yank)`} $0
\ No newline at end of file
# -*- mode: snippet -*-
# name: aws-elb-get-list
-# key: aws-elb-get-list
+# key: elb-ls
# --
aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} elb describe-load-balancers --query "reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName, CreatedTime])" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
# -*- mode: snippet -*-
# name: aws-emr-list-clusters
-# key: aws-emr-list-clusters
+# key: emr-ls
# --
aws --profile=${1:$$(yas-choose-value '("prod" "test"))} --region=${2:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)} emr list-clusters --active --query 'Clusters[*].{ID: Id, NAME: Name}' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
# -*- mode: snippet -*-
# name: aws-route53-list-hosted-zones
-# key: aws-route53-list-hosted-zones
+# key: r53-ls
# --
aws --profile=${1:$$(yas-choose-value '("prod" "test"))} route53 list-hosted-zones --query 'HostedZones[].[Id, Name]' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file