Sha256: 2dd3e3e95c86184fccdf0fbda91708cd866c275a984a0fea2096787055734b2c

Contents?: true

Size: 1.52 KB

Versions: 32

Compression:

Stored size: 1.52 KB

Contents

module Fog
  module AWS
    module ELB
      class Real

        require 'fog/aws/parsers/elb/deregister_instances_from_load_balancer'

        # Deregister an instance from an existing ELB
        #
        # ==== Parameters
        # * instance_ids<~Array> - List of instance IDs to remove from ELB
        # * lb_name<~String> - Load balancer to remove instances from
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'ResponseMetadata'<~Hash>:
        #       * 'RequestId'<~String> - Id of request
        #     * 'DeregisterInstancesFromLoadBalancerResult'<~Hash>:
        #       * 'Instances'<~Array> - array of hashes describing instances currently enabled
        #         * 'InstanceId'<~String>
        def deregister_instances_from_load_balancer(instance_ids, lb_name)
          params = AWS.indexed_param('Instances.member.%.InstanceId', [*instance_ids], 1)
          request({
            'Action'           => 'DeregisterInstancesFromLoadBalancer',
            'LoadBalancerName' => lb_name,
            :parser            => Fog::Parsers::AWS::ELB::DeregisterInstancesFromLoadBalancer.new
          }.merge!(params))
        end

        alias :deregister_instances :deregister_instances_from_load_balancer

      end

      class Mock

        def deregister_instances_from_load_balancer(instance_ids, lb_name)
          Fog::Mock.not_implemented
        end

        alias :deregister_instances :deregister_instances_from_load_balancer

      end

    end
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
fog-0.2.28 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.27 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.26 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.25 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.24 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
tecnh-fog-0.2.23.vpc lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.23 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.22 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.21 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.20 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.19 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.18 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.17 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.16 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.15 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.14 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.13 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.12 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.11 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.2.10 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb