Class: Chef::Knife::ElbShow
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::ElbShow
- Includes:
- ElbBase
- Defined in:
- lib/chef/knife/elb_show.rb
Instance Method Summary collapse
Methods included from ElbBase
Instance Method Details
#run ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/chef/knife/elb_show.rb', line 31 def run unless @name_args.size ==1 ui.error('Please specify the ELB ID') exit 1 end elbs = connection.load_balancers.select{|elb| elb.id == @name_args.first} if elbs.empty? ui.error("No load balancer with id #{@name_args.first} found") exit 1 end ui.output(Chef::JSONCompat.from_json(elbs.first.to_json)) end |