Module: Stem::Ip

Extended by:
Ip
Includes:
Util
Included in:
Ip
Defined in:
lib/stem/ip.rb

Instance Method Summary collapse

Methods included from Util

#get_filter_opts, #swirl, #tags_to_filter, #tagset_to_hash

Instance Method Details

#allocateObject



6
7
8
# File 'lib/stem/ip.rb', line 6

def allocate
  swirl.call("AllocateAddress")["publicIp"]
end

#associate(ip, instance) ⇒ Object



10
11
12
13
# File 'lib/stem/ip.rb', line 10

def associate ip, instance
  result = swirl.call("AssociateAddress", "InstanceId" => instance, "PublicIp" => ip)["return"]
  result == "true"
end

#disassociate(ip) ⇒ Object



15
16
17
# File 'lib/stem/ip.rb', line 15

def disassociate ip
  result = swirl.call("DisassociateAddress", "PublicIp" => ip)
end

#release(ip) ⇒ Object



19
20
21
# File 'lib/stem/ip.rb', line 19

def release ip
  result = swirl.call("ReleaseAddress", "PublicIp" => ip)
end