class Awspec::Type::NlbTargetGroup

Public Instance Methods

has_ec2?(id) click to toggle source
# File lib/awspec/type/nlb_target_group.rb, line 11
def has_ec2?(id)
  ec2 = find_ec2(id)
  return nil unless ec2
  descriptions = elbv2_client.describe_target_health(
    target_group_arn: resource_via_client.target_group_arn
  ).target_health_descriptions
  descriptions.find do |description|
    description.target.id == ec2.instance_id
  end
end
id() click to toggle source
# File lib/awspec/type/nlb_target_group.rb, line 7
def id
  @id ||= resource_via_client.target_group_name if resource_via_client
end
resource_via_client() click to toggle source
# File lib/awspec/type/nlb_target_group.rb, line 3
def resource_via_client
  @resource_via_client ||= find_nlb_target_group(@display_name)
end