--- /dev/null
+;;; aws-snippets-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
+\f
+;;;### (autoloads nil "aws-snippets" "aws-snippets.el" (23126 10835
+;;;;;; 780604 640000))
+;;; Generated autoloads from aws-snippets.el
+
+(autoload 'aws-snippets-initialize "aws-snippets" "\
+
+
+\(fn)" nil nil)
+
+(eval-after-load 'yasnippet '(aws-snippets-initialize))
+
+;;;***
+\f
+;;;### (autoloads nil nil ("aws-snippets-pkg.el") (23126 10835 781783
+;;;;;; 534000))
+
+;;;***
+\f
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; End:
+;;; aws-snippets-autoloads.el ends here
--- /dev/null
+(define-package "aws-snippets" "0.1.0"
+ "Yasnippets for AWS"
+ '((yasnippet "0.8.0")))
--- /dev/null
+;;; aws-snippets.el --- Yasnippets for AWS
+
+;; Copyright (C) 2018 Andreas Gerler
+;; keywords: snippets
+;; Version: 0.1.0
+;; Package-Requires: ((yasnippet "0.8.0"))
+
+;; Permission is hereby granted, free of charge, to any person obtaining
+;; a copy of this software and associated documentation files (the
+;; "Software"), to deal in the Software without restriction, including
+;; without limitation the rights to use, copy, modify, merge, publish,
+;; distribute, sublicense, and/or sell copies of the Software, and to
+;; permit persons to whom the Software is furnished to do so, subject to
+;; the following conditions:
+
+;; The above copyright notice and this permission notice shall be
+;; included in all copies or substantial portions of the Software.
+
+;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+;;; Code:
+
+(defvar aws-snippets-dir (file-name-directory (or (buffer-file-name)
+ load-file-name)))
+(defconst aws-snippets--default-regions
+ '("us-east-1" "eu-west-1" "ap-southeast-1"))
+
+(defcustom aws-snippets-regions aws-snippets--default-regions
+ "List of AWS regions for selections."
+ :type '(choice (string :tag "Region")
+ (repeat :tag "List of Regions"
+ (string :tag "Region")))
+ :set #'(lambda (symbol new)
+ (let ((old (and (boundp symbol)
+ (symbol-value symbol))))
+ (set-default symbol new)
+ ))
+ :group 'aws-snippets
+ )
+
+
+(defconst aws-snippets--default-profiles
+ '("test" "prod"))
+
+(defcustom aws-snippets-profiles aws-snippets--default-profiles
+ "List of AWS profiles for selections."
+ :type '(choice (string :tag "Profile")
+ (repeat :tag "List of Profiles"
+ (string :tag "Profiles")))
+ :set #'(lambda (symbol new)
+ (let ((old (and (boundp symbol)
+ (symbol-value symbol))))
+ (set-default symbol new)
+ ))
+ :group 'aws-snippets
+ )
+
+;;;###autoload
+(defun aws-snippets-initialize ()
+ (let ((snip-dir (expand-file-name "snippets" aws-snippets-dir)))
+ (add-to-list 'yas-snippet-dirs snip-dir t)
+ (yas-load-directory snip-dir)))
+
+;;;###autoload
+(eval-after-load 'yasnippet
+ '(aws-snippets-initialize))
+
+(require 'yasnippet)
+
+(provide 'aws-snippets)
+;;; aws-snippets.el ends here
--- /dev/null
+# -*- mode: snippet -*-
+# name: ami-ls
+# key: ami-ls
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-images --owners \$`(if (string-equal major-mode "eshell-mode")(message "{")(message "("))` aws --profile=$1 ec2 describe-security-groups --group-names 'Default' --query 'SecurityGroups[0].OwnerId' --output text `(if (string-equal major-mode "eshell-mode")(message "}")(message ")"))` --query "reverse(sort_by(Images, &CreationDate)[].{CreationDate:CreationDate,Name:Name,ImageId:ImageId,Public:Public,Description:Description})" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-autoscaling-describe-auto-scaling-groups
+# key: asg-ls
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling describe-auto-scaling-groups --query 'AutoScalingGroups[].{Name: AutoScalingGroupName, Desired: DesiredCapacity,Min: MinSize, Max: MaxSize}' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-instances
+# key: ec2-ls
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-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
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-snapshots
+# key: snap-ls
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --query 'Snapshots[].[join(\`,\`,Tags[?Key==\`Name\`].Value),StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-filters
+# key: awsfil
+# --
+--filters "Name=${1:$$(yas-choose-value '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "ip-address" "private-ip-address" "network-interface.subnet-id" "description"))},Values=$2" $0
\ No newline at end of file
--- /dev/null
+eshell-mode
+++ /dev/null
-# -*- mode: snippet -*-
-# name: ami-ls
-# key: ami-ls
-# --
-aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} ec2 describe-images --owners \$`(if (string-equal major-mode "eshell-mode")(insert-string "{")(insert-string "("))` aws --profile=$1 ec2 describe-security-groups --group-names 'Default' --query 'SecurityGroups[0].OwnerId' --output text `(if (string-equal major-mode "eshell-mode")(insert-string "}")(insert-string ")"))` --query "reverse(sort_by(Images, &CreationDate)[].{CreationDate:CreationDate,Name:Name,ImageId:ImageId,Public:Public,Description:Description})" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-autoscaling-describe-auto-scaling-groups
-# key: aws-autoscaling-describe-auto-scaling-groups
-# --
-aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} autoscaling describe-auto-scaling-groups --query 'AutoScalingGroups[].{Name: AutoScalingGroupName, Desired: DesiredCapacity,Min: MinSize, Max: MaxSize}' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-instances
-# key: ec2-ls
-# --
-aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${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
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-snapshots
-# key: snap-ls
-# --
-aws --profile=${1:$$(yas-choose-value bba-aws-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-snapshots --query 'Snapshots[].[join(`,`,Tags[?Key==`Name`].Value),StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-filters
-# key: awsfil
-# --
---filters "Name=${1:$$(yas-choose-value '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "private-ip-address" "network-interface.subnet-id" "description"))},Values=$2" $0
\ No newline at end of file