Sha256: cd165ecf62a0eac924b71aa06db1ed466023b5f41c7f439fe1fc5e56424fada6

Contents?: true

Size: 606 Bytes

Versions: 90

Compression:

Stored size: 606 Bytes

Contents

module Awspec::Type
  class AlbTargetGroup < ResourceBase
    def resource_via_client
      @resource_via_client ||= find_alb_target_group(@display_name)
    end

    def id
      @id ||= resource_via_client.target_group_name if resource_via_client
    end

    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
  end
end

Version data entries

90 entries across 90 versions & 4 rubygems

Version Path
awspec-1.25.1 lib/awspec/type/alb_target_group.rb
awspec-1.25.0 lib/awspec/type/alb_target_group.rb
awspec-1.24.4 lib/awspec/type/alb_target_group.rb
awspec-1.24.3 lib/awspec/type/alb_target_group.rb
awspec-1.24.2 lib/awspec/type/alb_target_group.rb
awspec-1.24.1 lib/awspec/type/alb_target_group.rb
awspec-1.24.0 lib/awspec/type/alb_target_group.rb
awspec-1.23.0 lib/awspec/type/alb_target_group.rb
awspec-1.22.1 lib/awspec/type/alb_target_group.rb
awspec-1.22.0 lib/awspec/type/alb_target_group.rb
awspec-1.21.1 lib/awspec/type/alb_target_group.rb
awspec-1.21.0 lib/awspec/type/alb_target_group.rb
awspec-1.20.0 lib/awspec/type/alb_target_group.rb
awspec-1.19.2 lib/awspec/type/alb_target_group.rb
awspec-1.19.1 lib/awspec/type/alb_target_group.rb
awspec-1.19.0 lib/awspec/type/alb_target_group.rb
cthiesfork-awspec-1.2.4 lib/awspec/type/alb_target_group.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/type/alb_target_group.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/type/alb_target_group.rb
awspec-1.18.6 lib/awspec/type/alb_target_group.rb