Sha256: 004fd3952977ddd652d012f7c4608e6cf8448c856187a09e6ae6ac0aebd1d241

Contents?: true

Size: 1.8 KB

Versions: 6

Compression:

Stored size: 1.8 KB

Contents

module Fog
  module AWS
    class ELB
      class Real

        require 'fog/aws/parsers/elb/configure_health_check'

        # Enables the client to define an application healthcheck for the instances.
        # See http://docs.amazonwebservices.com/ElasticLoadBalancing/latest/APIReference/index.html?API_ConfigureHealthCheck.html
        #
        # ==== Parameters
        # * lb_name<~String> - Name of the ELB
        # * health_check<~Hash> - A hash of parameters describing the health check
        #   * 'HealthyThreshold'<~Integer> - Specifies the number of consecutive
        #     health probe successes required before moving the instance to the Healthy state.
        #   * 'Interval'<~Integer> - Specifies the approximate interval, in seconds,
        #     between health checks of an individual instance.
        #   * 'Target'<~String> - Specifies the instance being checked.
        #     The protocol is either TCP or HTTP. The range of valid ports is one (1) through 65535.
        #   * 'Timeout'<~Integer> - Specifies the amount of time, in seconds,
        #   during which no response means a failed health probe.
        #   * 'UnhealthyThreshold'<~Integer> - Specifies the number of consecutive
        #     health probe failures required before moving the instance to the Unhealthy state.
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        def configure_health_check(lb_name, health_check)
          params = {'LoadBalancerName' => lb_name}
          health_check.each {|key, value| params["HealthCheck.#{key}"] = value }

          request({
            'Action'           => 'ConfigureHealthCheck',
            :parser            => Fog::Parsers::AWS::ELB::ConfigureHealthCheck.new
          }.merge!(params))
        end

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
fog4encbs-0.9.0.1 lib/fog/aws/requests/elb/configure_health_check.rb
fog4encbs-0.9.0 lib/fog/aws/requests/elb/configure_health_check.rb
fog-0.9.0 lib/fog/aws/requests/elb/configure_health_check.rb
fog-0.8.2 lib/fog/aws/requests/elb/configure_health_check.rb
fog-0.8.1 lib/fog/aws/requests/elb/configure_health_check.rb
fog-0.8.0 lib/fog/aws/requests/elb/configure_health_check.rb