Method: Awspec::Helper::Finder::Ec2#select_network_interface_by_instance_id

Defined in:
lib/awspec/helper/finder/ec2.rb

#select_network_interface_by_instance_id(id) ⇒ Object



131
132
133
134
135
136
# File 'lib/awspec/helper/finder/ec2.rb', line 131

def select_network_interface_by_instance_id(id)
  res = ec2_client.describe_network_interfaces({
                                                 filters: [{ name: 'attachment.instance-id', values: [id] }]
                                               })
  res.network_interfaces
end