Sha256: ebbedecd2a869458170d5bab4fe18329ec283482076e56b68076e1cfb6636c31

Contents?: true

Size: 1.37 KB

Versions: 97

Compression:

Stored size: 1.37 KB

Contents

module Fog
  module AWS
    class ELB
      class Real
        require 'fog/aws/parsers/elb/delete_load_balancer'

        # Delete an existing Elastic Load Balancer
        #
        # Note that this API call, as defined by Amazon, is idempotent.
        # That is, it will not return an error if you try to delete an
        # ELB that does not exist.
        #
        # ==== Parameters
        # * lb_name<~String> - Name of the ELB to be deleted
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'DeleteLoadBalancerResponse'<~nil>
        #     * 'ResponseMetadata'<~Hash>:
        #       * 'RequestId'<~String> - Id of request
        def delete_load_balancer(lb_name)
          request({
            'Action'           => 'DeleteLoadBalancer',
            'LoadBalancerName' => lb_name,
            :parser            => Fog::Parsers::AWS::ELB::DeleteLoadBalancer.new
          })
        end
      end

      class Mock
        def delete_load_balancer(lb_name)
          response = Excon::Response.new
          response.status = 200

          self.data[:load_balancers].delete(lb_name)

          response.body = {
            'ResponseMetadata' => {
              'RequestId' => Fog::AWS::Mock.request_id
            },
            'DeleteLoadBalancerResult' => nil
          }

          response
        end
      end
    end
  end
end

Version data entries

97 entries across 95 versions & 6 rubygems

Version Path
fog-aws-3.0.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-2.0.1 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-2.0.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-1.4.1 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-1.4.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-1.3.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-1.2.1 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-1.2.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-1.1.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-1.0.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-0.13.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-0.12.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-0.11.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-0.10.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-0.9.4 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-0.9.3 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-0.9.2 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-0.9.1 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-0.9.0 lib/fog/aws/requests/elb/delete_load_balancer.rb
fog-aws-0.8.1 lib/fog/aws/requests/elb/delete_load_balancer.rb