Class: Awscli::EC2::InternetGateways
- Inherits:
-
Object
- Object
- Awscli::EC2::InternetGateways
- Defined in:
- lib/awscli/ec2.rb
Overview
> NetworkInterfaces
Instance Method Summary collapse
- #attach(gwid, vpcid) ⇒ Object
- #create ⇒ Object
- #deattach(gwid, vpcid) ⇒ Object
- #delete(gwid) ⇒ Object
-
#initialize(connection) ⇒ InternetGateways
constructor
A new instance of InternetGateways.
- #list ⇒ Object
Constructor Details
#initialize(connection) ⇒ InternetGateways
Returns a new instance of InternetGateways.
896 897 898 |
# File 'lib/awscli/ec2.rb', line 896 def initialize(connection) @conn = connection end |
Instance Method Details
#attach(gwid, vpcid) ⇒ Object
915 916 917 918 |
# 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 ⇒ Object
904 905 906 907 |
# File 'lib/awscli/ec2.rb', line 904 def create gw = @conn.internet_gateways.create puts "Created Internet Gateway: #{gw.id}" end |
#deattach(gwid, vpcid) ⇒ Object
920 921 922 923 |
# 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) ⇒ Object
909 910 911 912 913 |
# 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 ⇒ Object
900 901 902 |
# File 'lib/awscli/ec2.rb', line 900 def list @conn.internet_gateways.table end |