Class: Stax::Aws::Elb

Inherits:
Sdk
  • Object
show all
Defined in:
lib/stax/aws/elb.rb

Constant Summary collapse

COLORS =
{
  InService:    :green,
  OutOfService: :red,
}

Constants inherited from Sdk

Sdk::RETRY_LIMIT

Class Method Summary collapse

Methods inherited from Sdk

paginate

Class Method Details

.clientObject



14
15
16
# File 'lib/stax/aws/elb.rb', line 14

def client
  @_client ||= ::Aws::ElasticLoadBalancing::Client.new
end

.describe(elb_names) ⇒ Object



18
19
20
21
22
# File 'lib/stax/aws/elb.rb', line 18

def describe(elb_names)
  paginate(:load_balancer_descriptions) do |marker|
    client.describe_load_balancers(load_balancer_names: elb_names, marker: marker)
  end
end

.instance_health(elb_name) ⇒ Object



24
25
26
# File 'lib/stax/aws/elb.rb', line 24

def instance_health(elb_name)
  client.describe_instance_health(load_balancer_name: elb_name).instance_states
end