class Swa::CLI::ElbCommand

Public Instance Methods

collection() click to toggle source
# File lib/swa/cli/elb_command.rb, line 34
def collection
  Swa::ELB::LoadBalancer.list(describe_load_balancers)
end
item() click to toggle source
# File lib/swa/cli/elb_command.rb, line 20
def item
  results = describe_load_balancers(:load_balancer_names => [name])
  signal_error "No such ELB '#{name}'" unless results.any?
  Swa::ELB::LoadBalancer.new(results.first)
end

Protected Instance Methods

describe_load_balancers(options = {}) click to toggle source
# File lib/swa/cli/elb_command.rb, line 46
def describe_load_balancers(options = {})
  elb_client.describe_load_balancers(options).load_balancer_descriptions
end
elb_client() click to toggle source
# File lib/swa/cli/elb_command.rb, line 42
def elb_client
  ::Aws::ElasticLoadBalancing::Client.new(aws_config)
end