class Awscli::EC2::InternetGateways

Public Class Methods

new(connection) click to toggle source
# File lib/awscli/ec2.rb, line 896
def initialize(connection)
  @conn = connection
end

Public Instance Methods

attach(gwid, vpcid) click to toggle source
# File lib/awscli/ec2.rb, line 915
def attach(gwid, vpcid)
  @conn.internet_gateways.attach(gwid, vpcid)
  puts "Attached InternetGateway: #{gwid} to VPC: #{vpcid}"
end
create() click to toggle source
# File lib/awscli/ec2.rb, line 904
def create
  gw = @conn.internet_gateways.create
  puts "Created Internet Gateway: #{gw.id}"
end
deattach(gwid, vpcid) click to toggle source
# File lib/awscli/ec2.rb, line 920
def deattach(gwid, vpcid)
  @conn.internet_gateways.deattach(gwid, vpcid)
  puts "Detached InternetGateway: #{gwid} from VPC: #{vpcid}"
end
delete(gwid) click to toggle source
# File lib/awscli/ec2.rb, line 909
def delete(gwid)
  gw = @conn.internet_gateways.get(gwid)
  gw.destroy
  puts "Deleted Internet Gateway: #{gwid}"
end
list() click to toggle source
# File lib/awscli/ec2.rb, line 900
def list
  @conn.internet_gateways.table
end