Parent

Methods

Class/Module Index [+]

Quicksearch

Fog::Compute::AWS::NetworkInterface

Public Instance Methods

destroy() click to toggle source

Removes an existing network interface

network_interface.destroy

Returns

True or false depending on the result

# File lib/fog/aws/models/compute/network_interface.rb, line 40
def destroy
  requires :network_interface_id

  service.delete_network_interface(network_interface_id)
  true
end
save() click to toggle source

Create a network_interface

>> g = AWS.network_interfaces.new(:subnet_id => "subnet-someId", options)
>> g.save

options is an optional hash which may contain 'PrivateIpAddress', 'Description', 'groupSet'

Returns:

requestId and a networkInterface object

# File lib/fog/aws/models/compute/network_interface.rb, line 59
def save
  requires :subnet_id
  data = service.create_network_interface(subnet_id).body['networkInterface']
  new_attributes = data.reject {|key,value| key == 'requestId'}
  merge_attributes(new_attributes)
  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.