--- /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" (0 0 0 0))
+;;; Generated autoloads from aws-snippets.el
+
+(autoload 'aws-snippets-initialize "aws-snippets" "\
+Initialize package.
+
+\(fn)" nil nil)
+
+(eval-after-load 'yasnippet '(aws-snippets-initialize))
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "aws-snippets" '("aws-snippets-")))
+
+;;;***
+\f
+;;;### (autoloads nil nil ("aws-snippets-pkg.el") (0 0 0 0))
+
+;;;***
+\f
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; coding: utf-8
+;; End:
+;;; aws-snippets-autoloads.el ends here
--- /dev/null
+(define-package "aws-snippets" "20180410.1545" "Yasnippets for AWS"
+ '((yasnippet "0.8.0"))
+ :keywords
+ '("snippets"))
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
--- /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.
+
+;;; Commentary:
+
+;; A collection of yasnippet snippets to be used with AWS CLI
+
+;;; Code:
+
+(defvar aws-snippets-dir (file-name-directory (or load-file-name
+ (buffer-file-name))))
+
+(defcustom aws-snippets-regions '("us-east-1" "eu-west-1" "ap-southeast-1")
+ "List of AWS regions for selections."
+ :tag "regions"
+ :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)
+
+(defcustom aws-snippets-profiles '("test" "prod")
+ "List of AWS profiles for selections."
+ :tag "profiles"
+ :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)
+
+(defcustom aws-snippets-filters '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "ip-address" "private-ip-address" "network-interface.subnet-id" "description" "name" "iam-instance-profile.arn")
+ "List of AWS filters for selections."
+ :tag "default-filters"
+ :type '(choice (string :tag "Filter")
+ (repeat :tag "List of Filters"
+ (string :tag "Filter")))
+ :set #'(lambda (symbol new)
+ (let ((old (and (boundp symbol)
+ (symbol-value symbol))))
+ (set-default symbol new)
+ ))
+ :group 'aws-snippets)
+
+(defcustom aws-snippets-ami-ls-query '"reverse(sort_by(Images, &CreationDate)[].{CreationDate:CreationDate,Name:Name,ImageId:ImageId,Public:Public,Description:Description})"
+ "Query string used for ami-ls."
+ :tag "ami-ls-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-autoscaling-describe-auto-scaling-groups-query '"AutoScalingGroups[].{Name: AutoScalingGroupName, Desired: DesiredCapacity,Min: MinSize, Max: MaxSize}"
+ "Query string used for autoscaling-describe-auto-scaling-groups."
+ :tag "autoscaling-describe-auto-scaling-groups"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-autoscaling-describe-launch-configurations-query '"reverse(sort_by(LaunchConfigurations &CreatedTime)[*].[LaunchConfigurationName, CreatedTime])"
+ "Query string used for autoscaling-describe-launch-configurations."
+ :tag "autoscaling-describe-launch-configurations-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-dns-names-query '"Reservations[].Instances[?State.Name=='running'].[InstanceId, PublicDnsName]"
+ "Query string used for aws-ec2-get-dns-names."
+ :tag "ec2-get-dns-names-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-instance-volumes-query '"Reservations[].Instances[].[join(\`,\`,Tags[?Key==\`Name\`].Value),join(' ', BlockDeviceMappings[].Ebs.VolumeId)]"
+ "Query string used for ec2-get-instance-volumes."
+ :tag "ec2-get-instance-volumes-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-securitygroups-query '"sort_by(SecurityGroups, &GroupName)[*].[GroupName, GroupId, Description]"
+ "Query string used for ec2-get-securitygroups."
+ :tag "ec2-get-securitygroups-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-snapshots-query '"Snapshots[].[join(\`,\`,Tags[?Key==\`Name\`].Value),StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]"
+ "Query string used for ec2-get-snapshots-query."
+ :tag "ec2-get-snapshots-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-volumes-query '"Volumes[].[VolumeId,State,SnapshotId,join(\`,\`,Tags[?Key==\`Name\`].Value)]"
+ "Query string used for ec2-get-volumes-query."
+ :tag "ec2-get-volumes-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-volumes-unused-query '"Volumes[].[VolumeId,Size,VolumeType,CreateTime,State,SnapshotId]"
+ "Query string used for ec2-get-volumes-unused-query."
+ :tag "ec2-get-volumes-unused-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-instance-running-query '"Reservations[].Instances[].[InstanceId, State.Name]"
+ "Query string used for ec2-instance-running."
+ :tag "ec2-instance-running-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-list-instances-query '("Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime]"
+ "Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime, IamInstanceProfile.Arn]"
+ "Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime, KeyName]")
+ "Query string used for ec2 describe-instances."
+ :tag "ec2-list-instances-query"
+ :type '(choice (string :tag "Query")
+ (repeat :tag "List of Queries"
+ (string :tag "Query")))
+ :set #'(lambda (symbol new)
+ (let ((old (and (boundp symbol)
+ (symbol-value symbol))))
+ (set-default symbol new)
+ ))
+ :group 'aws-snippets)
+
+(defcustom aws-snippets-ec2-list-subnets-query '"sort_by(sort_by(Subnets[].{VpcId:VpcId, SubnetId:SubnetId, State:State, AvailabilityZone:AvailabilityZone, CidrBlock:CidrBlock, AvailableIpAddressCount:AvailableIpAddressCount Tags:to_string(Tags[].[Key, Value])}, &SubnetId), &VpcId)"
+ "Query string used for ec2-list-subnets."
+ :tag "ec2-list-subnets-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-list-vpcs-query '"sort_by(Vpcs[].{VpcId:VpcId, State:State, AvailabilityZone:AvailabilityZone, CidrBlock:CidrBlock, AvailableIpAddressCount:AvailableIpAddressCount Tags:to_string(Tags[].[Key, Value])}, &VpcId)"
+ "Query string used for ec2-list-vpcs."
+ :tag "ec2-list-vpcs-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-elb-get-list-query '"reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName, CreatedTime])"
+ "Query string used for elb-get-list."
+ :tag "elb-get-list-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-emr-list-clusters-query '"Clusters[*].{ID: Id, NAME: Name}"
+ "Query string used for emr-list-clusters."
+ :tag "emr-list-clusters-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-rds-describe-instances-query '"DBInstances[*].[DBInstanceIdentifier,DbiResourceId, Endpoint.Address]"
+ "Query string used for rds describe-db-instances."
+ :tag "rds-describe-db-instances-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-route53-list-hosted-zones-query '"HostedZones[].[Id, Name]"
+ "Query string used for route53 list-hosted-zones."
+ :tag "route53-list-hosted-zones-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-aws-support-ls-query '"reverse(sort_by(cases, &timeCreated)[].[caseId, subject, timeCreated, displayId])"
+ "Query string used for aws support-ls-query."
+ :tag "aws-support-ls-query"
+ :group 'aws-snippets
+ :type 'string)
+
+;;;###autoload
+(defun aws-snippets-initialize ()
+ "Initialize package."
+ (let ((snip-dir (expand-file-name "snippets" aws-snippets-dir)))
+ (when (boundp 'yas-snippet-dirs)(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: aws-ami-ls
+# key: ami-ls
+# group: aws
+# --
+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 "`(print aws-snippets-ami-ls-query)`" --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
+# group: aws
+# --
+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 '`(print aws-snippets-autoscaling-describe-auto-scaling-groups-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-autoscaling-describe-launch-configurations
+# key: asl-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling describe-launch-configurations --query '`(print aws-snippets-autoscaling-describe-launch-configurations-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-autoscaling-update-auto-scaling-group-min-max
+# key: aws-autoscaling-update-auto-scaling-group-min-max
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling update-auto-scaling-group --auto-scaling-group-name ${4:`(current-kill 0)`} --min-size $5 --max-size $6 $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-change-ls
+# key: cloud-change-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation list-change-sets --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-create-change-set
+# key: cloud-createchange
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} \
+${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} \
+cloudformation create-change-set \
+${4:--capabilities CAPABILITY_NAMED_IAM} \
+--stack-name '$5' \
+--change-set-name '$6' \
+--description '$7' \
+--parameters ${8:file://} \
+${9:--change-set-type=${10:$$(yas-choose-value '("CREATE" "UPDATE"))}}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-describe-change-set
+# key: cloud-descchange
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-change-set --stack-name ${4:`(current-kill 0)`} --change-set-name $5 --output ${6:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-describe-stack
+# key: cloud-desc
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-stacks --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-describe-stack-events
+# key: cloud-events-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-stack-events --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-ls
+# key: cloud-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation list-stacks --stack-status-filter ${4:$$(yas-choose-value '(
+"CREATE_COMPLETE"
+"CREATE_IN_PROGRESS"
+"CREATE_FAILED"
+"ROLLBACK_IN_PROGRESS"
+"ROLLBACK_FAILED"
+"ROLLBACK_COMPLETE"
+"DELETE_IN_PROGRESS"
+"DELETE_FAILED"
+"DELETE_COMPLETE"
+"UPDATE_IN_PROGRESS"
+"UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"
+"UPDATE_COMPLETE"
+"UPDATE_ROLLBACK_IN_PROGRESS"
+"UPDATE_ROLLBACK_FAILED"
+"UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS"
+"UPDATE_ROLLBACK_COMPLETE"
+"REVIEW_IN_PROGRESS"
+"CREATE_IN_PROGRESS CREATE_FAILED CREATE_COMPLETE ROLLBACK_IN_PROGRESS ROLLBACK_FAILED ROLLBACK_COMPLETE DELETE_IN_PROGRESS DELETE_FAILED UPDATE_IN_PROGRESS UPDATE_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_COMPLETE UPDATE_ROLLBACK_IN_PROGRESS UPDATE_ROLLBACK_FAILED UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_ROLLBACK_COMPLETE REVIEW_IN_PROGRESS"
+))} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-validate-template
+# key: cloud-val-temp
+# group: aws
+# --
+aws --profile=test --region=us-east-1 cloudformation validate-template --template-body file://${1:`(current-kill 0)`} --output ${2:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudtrail-lookup-events
+# key: cloudtrail-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudtrail lookup-events --max-items ${4:100} --lookup-attributes AttributeKey=${5:$$(yas-choose-value '("ResourceType,AttributeValue=AWS::EC2::Instance" "ResourceName,AttributeValue="))}$6 --output ${7:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-delete-snapshot (yank)
+# key: snap-del
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 delete-snapshot --snapshot-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-delete-volume (yank)
+# key: ebs-del
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 delete-volume --volume-id ${4:`(current-kill 0)`} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-describe-instance-attribute (yank)
+# key: ec2-attribute
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-attribute --instance-id ${4:`(current-kill 0)`} --attribute ${5:$$(yas-choose-value '("instanceType" "kernel" "ramdisk" "userData" "disableApiTermination" "instanceInitiatedShutdownBehavior" "rootDeviceName" "blockDeviceMapping" "productCodes" "sourceDestCheck" "groupSet" "ebsOptimized" "sriovNetSupport"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-describe-instance-status (yank)
+# key: aws-ec2-describe-instance-status
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-status --instance-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-describe-userdata (yank)
+# key: ec2-userdata
+# group: aws
+# --
+(base64-decode-string (shell-command-to-string "aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-attribute --instance-id ${4:`(current-kill 0)`} --attribute userData --query 'UserData.Value' --output text"))$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-console-output (yank)
+# key: ec2-console
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 get-console-output --output text --instance-id ${4:`(current-kill 0)`} >#<buffer *$4-console-output*> $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-dns-names
+# key: aws-ec2-get-dns-names
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --filters "Name=tag:Name,Values=$4" --query "`(print aws-snippets-ec2-get-dns-names-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-instance-details (yank)
+# key: ec2-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --instance-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-instance-volumes
+# key: ec2-vol
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-instances --query "`(print aws-snippets-ec2-get-instance-volumes-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-securitygroup-details (yank)
+# key: sg-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-groups --group-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-securitygroup-references (yank)
+# key: aws-ec2-get-securitygroup-references
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-group-references --group-id ${4:`(current-kill 0)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-securitygroups
+# key: sg-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-groups --query "`(print aws-snippets-ec2-get-securitygroups-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-snapshot-details (yank)
+# key: snap-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --snapshot-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-snapshots
+# key: snap-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --query '`(print aws-snippets-ec2-get-snapshots-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-volumes
+# key: ebs-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --query '`(print aws-snippets-ec2-get-volumes-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-volumes-unused
+# key: ebs-ls-avail
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --query '`(print aws-snippets-ec2-get-volumes-unused-query)`' --filters Name=status,Values=available --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-instance-running
+# key: ec2state
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --instance-ids ${4:`(current-kill 0)`} --query "`(print aws-snippets-ec2-instance-running-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-list-instances
+# key: ec2-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-instances --query '${4:$$(yas-choose-value aws-snippets-ec2-list-instances-query)}' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-list-subnets
+# key: sub-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-subnets --query "`(print aws-snippets-ec2-list-subnets-query)`" --output ${4:$$(yas-choose-value '("table" "text" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-list-vpcs
+# key: vpc-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-vpcs --query "`(print aws-snippets-ec2-list-vpcs-query)`" --output ${4:$$(yas-choose-value '("table" "text" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-start-stop-instance (yank)
+# key: ec2-start
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 ${4:$$(yas-choose-value '("start-instances" "stop-instances" "reboot-instances"))} --instance-ids ${5:`(current-kill 0)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-volume-details (yank)
+# key: ebs-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --volume-ids ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-describe-instance-health (yank)
+# key: aws-elb-describe-instance-health
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-instance-health --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-describe-load-balancer (yank)
+# key: elb-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancers --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-describe-load-balancer-attributes (yank)
+# key: aws-elb-describe-load-balancer-attributes
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancer-attributes --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-get-list
+# key: elb-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancers --query "`(print aws-snippets-elb-get-list-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-search
+# key: aws-elb-search
+# group: aws
+# --
+for REGION in `(mapconcat 'identity aws-snippets-regions " ")`; do
+ for BALANCER in \`aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=\${REGION} elb describe-load-balancers --query "reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName])" --output text\`; do
+ aws --profile=$1 --region=\${REGION} elb describe-load-balancers --load-balancer-name \${BALANCER} --output text | awk "{print \\"\${REGION}:\${BALANCER}:\\"\\\$0}"
+ done
+done $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-emr-describe-cluster (yank)
+# key: aws-emr-describe-cluster
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=${2:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} emr describe-cluster --cluster-id ${3: `(current-kill 0)`} --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-emr-list-clusters
+# key: emr-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=${2:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} emr list-clusters --active --query '`(print aws-snippets-emr-list-clusters-query)`' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-filters
+# key: awsfil
+# group: aws
+# --
+--filters "Name=${1:$$(yas-choose-value aws-snippets-filters)},Values=$2" $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-logs-get-groups
+# key: logs-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} logs describe-log-groups --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-logs-set-retention
+# key: logs-set-ret
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} logs put-retention-policy --log-group-name ${4:`(current-kill 0)`} --retention-in-days ${5:$$(yas-choose-value '( "60" "1" "3" "5" "7" "14" "30" "90" "120" "150" "180" "365" "400" "545" "731" "1827" "3653"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-policy-ls
+# key: policy-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} iam list-policies --scope ${5:$$(yas-choose-value '("All" "AWS" "Local"))} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-describe-db-instance-details (yank)
+# key: rds-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-instances --db-instance-identifier ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-describe-db-instances
+# key: rds-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-instances --query "`(print aws-snippets-rds-describe-instances-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-describe-db-parameter-groups
+# key: aws-rds-describe-db-parameter-groups
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-parameter-groups --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-describe-parameters (yank)
+# key: aws-rds-describe-parameters
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-parameters --db-parameter-group-name ${4:`(current-kill 0)`} --query "Parameters[*][ParameterName, ParameterValue]" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-region-loop
+# key: aws-region-loop
+# group: aws
+# --
+for REGION in `(mapconcat 'identity aws-snippets-regions " ")`; do
+$0
+done
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-regions
+# key: awsreg
+# group: aws
+# --
+--region=${1:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-list-hosted-zones
+# key: r53-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} route53 list-hosted-zones --query '`(print aws-snippets-route53-list-hosted-zones-query)`' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-list-resource-record-sets (yank)
+# key: aws-route53-list-resource-record-sets
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} route53 list-resource-record-sets --hosted-zone-id ${2:`(current-kill 0)`} --query \"ResourceRecordSets[?contains(Name, '$3')]\" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sns-ls
+# key: sns-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} sns list-topics --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-support-describe
+# key: support-desc
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} support describe-communications --case-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-support-ls
+# key: support-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} support describe-cases --no-include-communications --query "`(print aws-snippets-aws-support-ls-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+shell-mode
+eshell-mode
--- /dev/null
+eshell-mode
+++ /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" (23245 53220
-;;;;;; 754070 796000))
-;;; Generated autoloads from aws-snippets.el
-
-(autoload 'aws-snippets-initialize "aws-snippets" "\
-Initialize package.
-
-\(fn)" nil nil)
-
-(eval-after-load 'yasnippet '(aws-snippets-initialize))
-
-;;;***
-\f
-;;;### (autoloads nil nil ("aws-snippets-pkg.el") (23245 53220 682479
-;;;;;; 117000))
-
-;;;***
-\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" "20180410.845" "Yasnippets for AWS"
- '((yasnippet "0.8.0"))
- :keywords
- '("snippets"))
-;; Local Variables:
-;; no-byte-compile: t
-;; End:
+++ /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.
-
-;;; Commentary:
-
-;; A collection of yasnippet snippets to be used with AWS CLI
-
-;;; Code:
-
-(defvar aws-snippets-dir (file-name-directory (or load-file-name
- (buffer-file-name))))
-
-(defcustom aws-snippets-regions '("us-east-1" "eu-west-1" "ap-southeast-1")
- "List of AWS regions for selections."
- :tag "regions"
- :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)
-
-(defcustom aws-snippets-profiles '("test" "prod")
- "List of AWS profiles for selections."
- :tag "profiles"
- :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)
-
-(defcustom aws-snippets-filters '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "ip-address" "private-ip-address" "network-interface.subnet-id" "description" "name" "iam-instance-profile.arn")
- "List of AWS filters for selections."
- :tag "default-filters"
- :type '(choice (string :tag "Filter")
- (repeat :tag "List of Filters"
- (string :tag "Filter")))
- :set #'(lambda (symbol new)
- (let ((old (and (boundp symbol)
- (symbol-value symbol))))
- (set-default symbol new)
- ))
- :group 'aws-snippets)
-
-(defcustom aws-snippets-ami-ls-query '"reverse(sort_by(Images, &CreationDate)[].{CreationDate:CreationDate,Name:Name,ImageId:ImageId,Public:Public,Description:Description})"
- "Query string used for ami-ls."
- :tag "ami-ls-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-autoscaling-describe-auto-scaling-groups-query '"AutoScalingGroups[].{Name: AutoScalingGroupName, Desired: DesiredCapacity,Min: MinSize, Max: MaxSize}"
- "Query string used for autoscaling-describe-auto-scaling-groups."
- :tag "autoscaling-describe-auto-scaling-groups"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-autoscaling-describe-launch-configurations-query '"reverse(sort_by(LaunchConfigurations &CreatedTime)[*].[LaunchConfigurationName, CreatedTime])"
- "Query string used for autoscaling-describe-launch-configurations."
- :tag "autoscaling-describe-launch-configurations-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-dns-names-query '"Reservations[].Instances[?State.Name=='running'].[InstanceId, PublicDnsName]"
- "Query string used for aws-ec2-get-dns-names."
- :tag "ec2-get-dns-names-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-instance-volumes-query '"Reservations[].Instances[].[join(\`,\`,Tags[?Key==\`Name\`].Value),join(' ', BlockDeviceMappings[].Ebs.VolumeId)]"
- "Query string used for ec2-get-instance-volumes."
- :tag "ec2-get-instance-volumes-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-securitygroups-query '"sort_by(SecurityGroups, &GroupName)[*].[GroupName, GroupId, Description]"
- "Query string used for ec2-get-securitygroups."
- :tag "ec2-get-securitygroups-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-snapshots-query '"Snapshots[].[join(\`,\`,Tags[?Key==\`Name\`].Value),StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]"
- "Query string used for ec2-get-snapshots-query."
- :tag "ec2-get-snapshots-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-volumes-query '"Volumes[].[VolumeId,State,SnapshotId,join(\`,\`,Tags[?Key==\`Name\`].Value)]"
- "Query string used for ec2-get-volumes-query."
- :tag "ec2-get-volumes-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-volumes-unused-query '"Volumes[].[VolumeId,Size,VolumeType,CreateTime,State,SnapshotId]"
- "Query string used for ec2-get-volumes-unused-query."
- :tag "ec2-get-volumes-unused-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-instance-running-query '"Reservations[].Instances[].[InstanceId, State.Name]"
- "Query string used for ec2-instance-running."
- :tag "ec2-instance-running-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-list-instances-query '("Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime]"
- "Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime, IamInstanceProfile.Arn]"
- "Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime, KeyName]")
- "Query string used for ec2 describe-instances."
- :tag "ec2-list-instances-query"
- :type '(choice (string :tag "Query")
- (repeat :tag "List of Queries"
- (string :tag "Query")))
- :set #'(lambda (symbol new)
- (let ((old (and (boundp symbol)
- (symbol-value symbol))))
- (set-default symbol new)
- ))
- :group 'aws-snippets)
-
-(defcustom aws-snippets-ec2-list-subnets-query '"sort_by(sort_by(Subnets[].{VpcId:VpcId, SubnetId:SubnetId, State:State, AvailabilityZone:AvailabilityZone, CidrBlock:CidrBlock, AvailableIpAddressCount:AvailableIpAddressCount Tags:to_string(Tags[].[Key, Value])}, &SubnetId), &VpcId)"
- "Query string used for ec2-list-subnets."
- :tag "ec2-list-subnets-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-list-vpcs-query '"sort_by(Vpcs[].{VpcId:VpcId, State:State, AvailabilityZone:AvailabilityZone, CidrBlock:CidrBlock, AvailableIpAddressCount:AvailableIpAddressCount Tags:to_string(Tags[].[Key, Value])}, &VpcId)"
- "Query string used for ec2-list-vpcs."
- :tag "ec2-list-vpcs-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-elb-get-list-query '"reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName, CreatedTime])"
- "Query string used for elb-get-list."
- :tag "elb-get-list-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-emr-list-clusters-query '"Clusters[*].{ID: Id, NAME: Name}"
- "Query string used for emr-list-clusters."
- :tag "emr-list-clusters-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-rds-describe-instances-query '"DBInstances[*].[DBInstanceIdentifier,DbiResourceId, Endpoint.Address]"
- "Query string used for rds describe-db-instances."
- :tag "rds-describe-db-instances-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-route53-list-hosted-zones-query '"HostedZones[].[Id, Name]"
- "Query string used for route53 list-hosted-zones."
- :tag "route53-list-hosted-zones-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-aws-support-ls-query '"reverse(sort_by(cases, &timeCreated)[].[caseId, subject, timeCreated, displayId])"
- "Query string used for aws support-ls-query."
- :tag "aws-support-ls-query"
- :group 'aws-snippets
- :type 'string)
-
-;;;###autoload
-(defun aws-snippets-initialize ()
- "Initialize package."
- (let ((snip-dir (expand-file-name "snippets" aws-snippets-dir)))
- (when (boundp 'yas-snippet-dirs)(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: aws-ami-ls
-# key: ami-ls
-# group: aws
-# --
-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 "`(print aws-snippets-ami-ls-query)`" --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
-# group: aws
-# --
-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 '`(print aws-snippets-autoscaling-describe-auto-scaling-groups-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-autoscaling-describe-launch-configurations
-# key: asl-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling describe-launch-configurations --query '`(print aws-snippets-autoscaling-describe-launch-configurations-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-autoscaling-update-auto-scaling-group-min-max
-# key: aws-autoscaling-update-auto-scaling-group-min-max
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling update-auto-scaling-group --auto-scaling-group-name ${4:`(current-kill 0)`} --min-size $5 --max-size $6 $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-change-ls
-# key: cloud-change-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation list-change-sets --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-create-change-set
-# key: cloud-createchange
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} \
-${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} \
-cloudformation create-change-set \
-${4:--capabilities CAPABILITY_NAMED_IAM} \
---stack-name '$5' \
---change-set-name '$6' \
---description '$7' \
---parameters ${8:file://} \
-${9:--change-set-type=${10:$$(yas-choose-value '("CREATE" "UPDATE"))}}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-describe-change-set
-# key: cloud-descchange
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-change-set --stack-name ${4:`(current-kill 0)`} --change-set-name $5 --output ${6:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-describe-stack
-# key: cloud-desc
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-stacks --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-describe-stack-events
-# key: cloud-events-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-stack-events --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-ls
-# key: cloud-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation list-stacks --stack-status-filter ${4:$$(yas-choose-value '(
-"CREATE_COMPLETE"
-"CREATE_IN_PROGRESS"
-"CREATE_FAILED"
-"ROLLBACK_IN_PROGRESS"
-"ROLLBACK_FAILED"
-"ROLLBACK_COMPLETE"
-"DELETE_IN_PROGRESS"
-"DELETE_FAILED"
-"DELETE_COMPLETE"
-"UPDATE_IN_PROGRESS"
-"UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"
-"UPDATE_COMPLETE"
-"UPDATE_ROLLBACK_IN_PROGRESS"
-"UPDATE_ROLLBACK_FAILED"
-"UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS"
-"UPDATE_ROLLBACK_COMPLETE"
-"REVIEW_IN_PROGRESS"
-"CREATE_IN_PROGRESS CREATE_FAILED CREATE_COMPLETE ROLLBACK_IN_PROGRESS ROLLBACK_FAILED ROLLBACK_COMPLETE DELETE_IN_PROGRESS DELETE_FAILED UPDATE_IN_PROGRESS UPDATE_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_COMPLETE UPDATE_ROLLBACK_IN_PROGRESS UPDATE_ROLLBACK_FAILED UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_ROLLBACK_COMPLETE REVIEW_IN_PROGRESS"
-))} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-validate-template
-# key: cloud-val-temp
-# group: aws
-# --
-aws --profile=test --region=us-east-1 cloudformation validate-template --template-body file://${1:`(current-kill 0)`} --output ${2:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudtrail-lookup-events
-# key: cloudtrail-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudtrail lookup-events --max-items ${4:100} --lookup-attributes AttributeKey=${5:$$(yas-choose-value '("ResourceType,AttributeValue=AWS::EC2::Instance" "ResourceName,AttributeValue="))}$6 --output ${7:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-delete-snapshot (yank)
-# key: snap-del
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 delete-snapshot --snapshot-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-delete-volume (yank)
-# key: ebs-del
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 delete-volume --volume-id ${4:`(current-kill 0)`} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-describe-instance-attribute (yank)
-# key: ec2-attribute
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-attribute --instance-id ${4:`(current-kill 0)`} --attribute ${5:$$(yas-choose-value '("instanceType" "kernel" "ramdisk" "userData" "disableApiTermination" "instanceInitiatedShutdownBehavior" "rootDeviceName" "blockDeviceMapping" "productCodes" "sourceDestCheck" "groupSet" "ebsOptimized" "sriovNetSupport"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-describe-instance-status (yank)
-# key: aws-ec2-describe-instance-status
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-status --instance-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-describe-userdata (yank)
-# key: ec2-userdata
-# group: aws
-# --
-(base64-decode-string (shell-command-to-string "aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-attribute --instance-id ${4:`(current-kill 0)`} --attribute userData --query 'UserData.Value' --output text"))$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-console-output (yank)
-# key: ec2-console
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 get-console-output --output text --instance-id ${4:`(current-kill 0)`} >#<buffer *$4-console-output*> $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-dns-names
-# key: aws-ec2-get-dns-names
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --filters "Name=tag:Name,Values=$4" --query "`(print aws-snippets-ec2-get-dns-names-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-instance-details (yank)
-# key: ec2-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --instance-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-instance-volumes
-# key: ec2-vol
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-instances --query "`(print aws-snippets-ec2-get-instance-volumes-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-securitygroup-details (yank)
-# key: sg-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-groups --group-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-securitygroup-references (yank)
-# key: aws-ec2-get-securitygroup-references
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-group-references --group-id ${4:`(current-kill 0)`} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-securitygroups
-# key: sg-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-groups --query "`(print aws-snippets-ec2-get-securitygroups-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-snapshot-details (yank)
-# key: snap-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --snapshot-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-snapshots
-# key: snap-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --query '`(print aws-snippets-ec2-get-snapshots-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-volumes
-# key: ebs-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --query '`(print aws-snippets-ec2-get-volumes-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-volumes-unused
-# key: ebs-ls-avail
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --query '`(print aws-snippets-ec2-get-volumes-unused-query)`' --filters Name=status,Values=available --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-instance-running
-# key: ec2state
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --instance-ids ${4:`(current-kill 0)`} --query "`(print aws-snippets-ec2-instance-running-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-list-instances
-# key: ec2-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-instances --query '${4:$$(yas-choose-value aws-snippets-ec2-list-instances-query)}' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-list-subnets
-# key: sub-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-subnets --query "`(print aws-snippets-ec2-list-subnets-query)`" --output ${4:$$(yas-choose-value '("table" "text" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-list-vpcs
-# key: vpc-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-vpcs --query "`(print aws-snippets-ec2-list-vpcs-query)`" --output ${4:$$(yas-choose-value '("table" "text" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-start-stop-instance (yank)
-# key: ec2-start
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 ${4:$$(yas-choose-value '("start-instances" "stop-instances" "reboot-instances"))} --instance-ids ${5:`(current-kill 0)`} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-volume-details (yank)
-# key: ebs-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --volume-ids ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-describe-instance-health (yank)
-# key: aws-elb-describe-instance-health
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-instance-health --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-describe-load-balancer (yank)
-# key: elb-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancers --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-describe-load-balancer-attributes (yank)
-# key: aws-elb-describe-load-balancer-attributes
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancer-attributes --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-get-list
-# key: elb-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancers --query "`(print aws-snippets-elb-get-list-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-search
-# key: aws-elb-search
-# group: aws
-# --
-for REGION in `(mapconcat 'identity aws-snippets-regions " ")`; do
- for BALANCER in \`aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=\${REGION} elb describe-load-balancers --query "reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName])" --output text\`; do
- aws --profile=$1 --region=\${REGION} elb describe-load-balancers --load-balancer-name \${BALANCER} --output text | awk "{print \\"\${REGION}:\${BALANCER}:\\"\\\$0}"
- done
-done $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-emr-describe-cluster (yank)
-# key: aws-emr-describe-cluster
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=${2:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} emr describe-cluster --cluster-id ${3: `(current-kill 0)`} --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-emr-list-clusters
-# key: emr-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=${2:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} emr list-clusters --active --query '`(print aws-snippets-emr-list-clusters-query)`' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-filters
-# key: awsfil
-# group: aws
-# --
---filters "Name=${1:$$(yas-choose-value aws-snippets-filters)},Values=$2" $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-logs-get-groups
-# key: logs-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} logs describe-log-groups --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-logs-set-retention
-# key: logs-set-ret
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} logs put-retention-policy --log-group-name ${4:`(current-kill 0)`} --retention-in-days ${5:$$(yas-choose-value '( "60" "1" "3" "5" "7" "14" "30" "90" "120" "150" "180" "365" "400" "545" "731" "1827" "3653"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-policy-ls
-# key: policy-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} iam list-policies --scope ${5:$$(yas-choose-value '("All" "AWS" "Local"))} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-describe-db-instance-details (yank)
-# key: rds-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-instances --db-instance-identifier ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-describe-db-instances
-# key: rds-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-instances --query "`(print aws-snippets-rds-describe-instances-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-describe-db-parameter-groups
-# key: aws-rds-describe-db-parameter-groups
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-parameter-groups --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-describe-parameters (yank)
-# key: aws-rds-describe-parameters
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-parameters --db-parameter-group-name ${4:`(current-kill 0)`} --query "Parameters[*][ParameterName, ParameterValue]" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-region-loop
-# key: aws-region-loop
-# group: aws
-# --
-for REGION in `(mapconcat 'identity aws-snippets-regions " ")`; do
-$0
-done
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-regions
-# key: awsreg
-# group: aws
-# --
---region=${1:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-list-hosted-zones
-# key: r53-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} route53 list-hosted-zones --query '`(print aws-snippets-route53-list-hosted-zones-query)`' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-list-resource-record-sets (yank)
-# key: aws-route53-list-resource-record-sets
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} route53 list-resource-record-sets --hosted-zone-id ${2:`(current-kill 0)`} --query \"ResourceRecordSets[?contains(Name, '$3')]\" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sns-ls
-# key: sns-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} sns list-topics --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-support-describe
-# key: support-desc
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} support describe-communications --case-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-support-ls
-# key: support-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} support describe-cases --no-include-communications --query "`(print aws-snippets-aws-support-ls-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-shell-mode
-eshell-mode
+++ /dev/null
-eshell-mode