Parent

Class/Module Index [+]

Quicksearch

Fog::Compute::AWS::InternetGateway

Public Class Methods

new(attributes={}) click to toggle source
# File lib/fog/aws/models/compute/internet_gateway.rb, line 13
def initialize(attributes={})
  super
end

Public Instance Methods

attach(vpc_id) click to toggle source

Attaches an existing internet gateway

internet_gateway.attach(igw-id, vpc-id)

Returns

True or false depending on the result

# File lib/fog/aws/models/compute/internet_gateway.rb, line 25
def attach(vpc_id)
  requires :id
  service.attach_internet_gateway(id, vpc_id)
  reload
end
destroy() click to toggle source

Removes an existing internet gateway

internet_gateway.destroy

Returns

True or false depending on the result

# File lib/fog/aws/models/compute/internet_gateway.rb, line 54
def destroy
  requires :id

  service.delete_internet_gateway(id)
  true
end
detach(vpc_id) click to toggle source

Detaches an existing internet gateway

internet_gateway.detach(igw-id, vpc-id)

Returns

True or false depending on the result

# File lib/fog/aws/models/compute/internet_gateway.rb, line 39
def detach(vpc_id)
  requires :id
  service.detach_internet_gateway(id, vpc_id)
  reload
end
save() click to toggle source

Create an internet gateway

>> g = AWS.internet_gateways.new()
>> g.save

Returns:

requestId and a internetGateway object

# File lib/fog/aws/models/compute/internet_gateway.rb, line 70
def save
  data = service.create_internet_gateway.body['internetGatewaySet'].first
  new_attributes = data.reject {|key,value| key == 'requestId'}
  merge_attributes(new_attributes)
  true

  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.