Sha256: b8585e063722b245a0da4f5065cb00386048f8deb8781d1446eec90108c3c745
Contents?: true
Size: 1.88 KB
Versions: 1
Compression:
Stored size: 1.88 KB
Contents
require 'rackspace-fog/core/model' module Fog module Compute class AWS class InternetGateway < Fog::Model identity :id, :aliases => 'internetGatewayId' attribute :attachment_set, :aliases => 'attachmentSet' attribute :tag_set, :aliases => 'tagSet' def initialize(attributes={}) super end # Attaches an existing internet gateway # # internet_gateway.attach(igw-id, vpc-id) # # ==== Returns # # True or false depending on the result # def attach(vpc_id) requires :id connection.attach_internet_gateway(id, vpc_id) reload end # Detaches an existing internet gateway # # internet_gateway.detach(igw-id, vpc-id) # # ==== Returns # # True or false depending on the result # def detach(vpc_id) requires :id connection.detach_internet_gateway(id, vpc_id) reload end # Removes an existing internet gateway # # internet_gateway.destroy # # ==== Returns # # True or false depending on the result # def destroy requires :id connection.delete_internet_gateway(id) true end # Create an internet gateway # # >> g = AWS.internet_gateways.new() # >> g.save # # == Returns: # # requestId and a internetGateway object # def save data = connection.create_internet_gateway.body['internetGatewaySet'].first new_attributes = data.reject {|key,value| key == 'requestId'} merge_attributes(new_attributes) true true end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rackspace-fog-1.4.2 | lib/rackspace-fog/aws/models/compute/internet_gateway.rb |