Sha256: 8cd39d6014a663e130c887edf09359f438bd12d29b0ef22d0baf97d87303c99e

Contents?: true

Size: 483 Bytes

Versions: 6

Compression:

Stored size: 483 Bytes

Contents

# frozen_string_literal: true

module Awspec::Type
  class Eip < ResourceBase
    aws_resource Aws::EC2::Types::Address

    def resource_via_client
      @resource_via_client ||= select_eip(@display_name)
    end

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

    def associated_to?(instance_id)
      return false unless resource_via_client.instance_id == instance_id

      resource_via_client.instance_id == instance_id
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
awspec-1.30.0 lib/awspec/type/eip.rb
awspec-1.29.3 lib/awspec/type/eip.rb
awspec-1.29.2 lib/awspec/type/eip.rb
awspec-1.29.1 lib/awspec/type/eip.rb
awspec-1.29.0 lib/awspec/type/eip.rb
awspec-1.28.2 lib/awspec/type/eip.rb