Sha256: 81845ead11159b78b4109aefa1ea31a985b168329d8a97539399ec1d6d81019e

Contents?: true

Size: 1.47 KB

Versions: 20

Compression:

Stored size: 1.47 KB

Contents

module Fog
  module AWS
    module ELB
      class Real

        # 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 = ELB.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)
          raise MockNotImplemented.new("Contributions welcome!")
        end

        alias :deregister_instances :deregister_instances_from_load_balancer

      end

    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fog-0.1.3 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.1.2 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.1.1 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.1.0 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.100 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.99 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.98 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.97 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.96 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.95 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.94 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.93 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.92 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.91 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.90 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.89 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.88 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.87 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.86 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb
fog-0.0.85 lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb