Removes an existing vpc
vpc.destroy
True or false depending on the result
# File lib/fog/aws/models/compute/vpc.rb, line 35 def destroy requires :id service.delete_vpc(id) true end
# File lib/fog/aws/models/compute/vpc.rb, line 21 def ready? requires :state state == 'available' end
Create a vpc
>> g = AWS.vpcs.new(:cidr_block => “10.1.2.0/24”) >> g.save
True or an exception depending on the result. Keep in mind that this creates a new vpc. As such, it yields an InvalidGroup.Duplicate exception if you attempt to save an existing vpc.
# File lib/fog/aws/models/compute/vpc.rb, line 53 def save requires :cidr_block data = service.create_vpc(cidr_block).body['vpcSet'].first new_attributes = data.reject {|key,value| key == 'requestId'} new_attributes = data.reject {|key,value| key == 'requestId' || key == 'tagSet' } merge_attributes(new_attributes) if tags = self.tags # expect eventual consistency Fog.wait_for { self.reload rescue nil } service.create_tags( self.identity, tags ) end true end
Generated with the Darkfish Rdoc Generator 2.