Class: Stax::Aws::Alb

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

Constant Summary

Constants inherited from Sdk

Sdk::RETRY_LIMIT

Class Method Summary collapse

Methods inherited from Sdk

paginate

Class Method Details

.clientObject



9
10
11
# File 'lib/stax/aws/alb.rb', line 9

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

.describe(alb_arns) ⇒ Object



13
14
15
# File 'lib/stax/aws/alb.rb', line 13

def describe(alb_arns)
  client.describe_load_balancers(load_balancer_arns: alb_arns).load_balancers
end

.target_groups(alb_arn) ⇒ Object



17
18
19
20
21
# File 'lib/stax/aws/alb.rb', line 17

def target_groups(alb_arn)
  paginate(:target_groups) do |marker|
    client.describe_target_groups(load_balancer_arn: alb_arn, marker: marker)
  end
end

.target_health(tg_arn) ⇒ Object



23
24
25
# File 'lib/stax/aws/alb.rb', line 23

def target_health(tg_arn)
  client.describe_target_health(target_group_arn: tg_arn).target_health_descriptions.flatten(1)
end