Class: Fog::AWS::EC2::Address

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/aws/models/ec2/address.rb

Instance Method Summary collapse

Methods inherited from Model

aliases, attribute, attributes, #attributes, #initialize, #inspect, #merge_attributes

Constructor Details

This class inherits a constructor from Fog::Model

Instance Method Details

#deleteObject



10
11
12
13
# File 'lib/fog/aws/models/ec2/address.rb', line 10

def delete
  connection.release_address(@public_ip)
  true
end

#saveObject



15
16
17
18
19
# File 'lib/fog/aws/models/ec2/address.rb', line 15

def save
  data = connection.allocate_address
  @public_ip = data.body['publicIp']
  true
end