Sha256: 68777cfa73a8dc41a1f3f561e6269305c4734339bbddb7c37c21e63244d93a40

Contents?: true

Size: 1.49 KB

Versions: 34

Compression:

Stored size: 1.49 KB

Contents

module Fog
  module AWS
    class ELB
      class Real

        require 'fog/aws/parsers/elb/register_instances_with_load_balancer'

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

        alias :register_instances :register_instances_with_load_balancer

      end

      class Mock

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

        alias :register_instances :register_instances_with_load_balancer

      end

    end
  end
end

Version data entries

34 entries across 34 versions & 3 rubygems

Version Path
fog-0.8.2 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.8.1 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.8.0 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.7.2 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.7.1 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.7.0 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.6.0 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.5.3 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.5.2 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.5.1 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.5.0 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
phpfog-fog-0.4.1.3 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
phpfog-fog-0.4.1.2 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
phpfog-fog-0.4.1.1 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
phpfog-fog-0.4.1 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.4.1 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.4.0 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.3.34 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.3.33 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb
fog-0.3.32 lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb