Method: Ftl::Client#cancel

Defined in:
lib/ftl/client.rb

#cancel(args = {}) ⇒ Object



114
115
116
117
118
119
120
121
122
# File 'lib/ftl/client.rb', line 114

def cancel(args={})
  guard(args.first, "Please provide the id for the spot request to cancel.") 
  spot = con.spot_requests.get(args.first)
  if spot && spot.destroy
    display "Canceled Spot Instance #{spot.id}."
  else
    display "Whups, spot instance not found!"
  end
end