class EC2Find::Ec2findInstance
Private Instance Methods
default_attributes()
click to toggle source
# File lib/chef/knife/ec2_find_instance.rb, line 38 def default_attributes ["instance_id", "image_id", "key_name", "subnet_id", "vpc_id", "private_ip_address", "public_ip_address", "tags"] end
findby(tags)
click to toggle source
# File lib/chef/knife/ec2_find_instance.rb, line 42 def findby tags ec2connect reservation = @ec2client.describe_instances({dry_run: false, filters: tags}).reservations[0] if reservation.nil? [] else reservation.instances end end