Class: Awscli::EC2::Dhcp

Inherits:
Object
  • Object
show all
Defined in:
lib/awscli/ec2.rb

Overview

> InternetGateways

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Dhcp

Returns a new instance of Dhcp.



867
868
869
# File 'lib/awscli/ec2.rb', line 867

def initialize(connection)
  @conn = connection
end

Instance Method Details

#associate(dhcp_id, vpc_id) ⇒ Object



884
885
886
# File 'lib/awscli/ec2.rb', line 884

def associate(dhcp_id, vpc_id)
  @conn.dhcp_options.attach(dhcp_id, vpc_id)
end

#create(options) ⇒ Object



875
876
877
# File 'lib/awscli/ec2.rb', line 875

def create(options)
  @conn.dhcp_options.create(options)
end

#delete(dhcp_id) ⇒ Object



879
880
881
882
# File 'lib/awscli/ec2.rb', line 879

def delete(dhcp_id)
  dhcp = @conn.dhcp_options(dhcp_id)
  dhcp.destroy
end

#listObject



871
872
873
# File 'lib/awscli/ec2.rb', line 871

def list
  @conn.dhcp_options.table
end