class AWS::EC2::NetworkInterface::Attachment

def delete_on_termination= state

Parameters:
  • state (Boolean) --
def delete_on_termination= state
  opts = {}
  opts[:network_interface_id] = network_interface.id
  opts[:attachment] = {}
  opts[:attachment][:attachment_id] = id
  opts[:attachment][:delete_on_termination] = state
  network_interface.client.modify_network_interface_attribute(opts)
end

def detach options = {}

Returns:
  • (nil) -

Options Hash: (**options)
  • :force (Boolean) -- Set true to force

Parameters:
  • options (Hash) --
def detach options = {}
  client_opts = {}
  client_opts[:attachment_id] = attachment_id
  client_opts[:force] = options[:force] == true
  network_interface.client.detach_network_interface(client_opts)
end

def initialize network_interface, details

def initialize network_interface, details
  @network_interface = network_interface
  @attachment_id = details[:attachment_id]
  @instance = Instance.new(details[:instance_id],
    :owner_id => details[:instance_owner_id],
    :config => network_interface.config)
  @instance_owner_id = details[:instance_owner_id]
  @device_index = details[:device_index]
  @status = details[:status].to_sym
  @attach_time = details[:attach_time]
  @delete_on_termination = details[:delete_on_termination]
end