Class: ElbDisableZones

Inherits:
ElbCommand
  • Object
show all
Defined in:
lib/maws/commands/elb-disable-zones.rb

Instance Method Summary collapse

Instance Method Details

#add_specific_options(parser) ⇒ Object



10
11
12
# File 'lib/maws/commands/elb-disable-zones.rb', line 10

def add_specific_options(parser)
  parser.opt :zones, "Zones to disable", :short => '-z', :type => :strings
end

#descriptionObject



6
7
8
# File 'lib/maws/commands/elb-disable-zones.rb', line 6

def description
  "elb-disable-zones - remove entire zones from specified ELBs (ELBs will not allow removing the last zone)"
end

#run!Object



14
15
16
# File 'lib/maws/commands/elb-disable-zones.rb', line 14

def run!
  instances.specified.with_service(:elb).each {|elb| elb.disable_zones(options.zones)}
end