2011-07-27 17:19:44 -04:00
|
|
|
module Fog
|
|
|
|
module Rackspace
|
2011-08-04 16:21:22 -05:00
|
|
|
class LoadBalancers
|
2011-07-27 17:19:44 -04:00
|
|
|
class Real
|
|
|
|
def set_connection_throttling(load_balancer_id, max_connections, min_connections, max_connection_rate, rate_interval)
|
|
|
|
data = {
|
|
|
|
'maxConnections' => max_connections,
|
|
|
|
'minConnections' => min_connections,
|
|
|
|
'maxConnectionRate' => max_connection_rate,
|
|
|
|
'rateInterval' => rate_interval
|
|
|
|
}
|
|
|
|
request(
|
2011-08-04 16:21:22 -05:00
|
|
|
:body => MultiJson.encode(data),
|
2011-07-27 17:19:44 -04:00
|
|
|
:expects => [200, 202],
|
|
|
|
:path => "loadbalancers/#{load_balancer_id}/connectionthrottle",
|
|
|
|
:method => 'PUT'
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|