Method: CloudLB::HealthMonitor#destroy!

Defined in:
lib/cloudlb/health_monitor.rb

#destroy!Object

Removes the current health monitor. Returns true if successful, exception otherwise.

>> monitor.destroy!
=> true


128
129
130
131
132
133
# File 'lib/cloudlb/health_monitor.rb', line 128

def destroy!
  response = @connection.lbreq("DELETE",@lbmgmthost,"#{@lbmgmtpath}/loadbalancers/#{CloudLB.escape(@load_balancer.id.to_s)}/healthmonitor",@lbmgmtport,@lbmgmtscheme)
  CloudLB::Exception.raise_exception(response) unless response.code.to_s.match(/^20.$/)
  @enabled = false
  true
end