class AwsCli::CLI::EC2::VPC::Dhcp

Public Instance Methods

associate() click to toggle source
# File lib/awscli/cli/ec2/vpc/dhcp.rb, line 31
def associate
  create_ec2_object
  @ec2.associate options[:dhcp_options_id], options[:vpc_id]
end
create() click to toggle source
# File lib/awscli/cli/ec2/vpc/dhcp.rb, line 16
def create
  create_ec2_object
  @ec2.create options[:dhcp_configuration_options]
end
delete() click to toggle source
# File lib/awscli/cli/ec2/vpc/dhcp.rb, line 23
def delete
  create_ec2_object
  @ec2.delete options[:dhcp_options_id]
end
list() click to toggle source
# File lib/awscli/cli/ec2/vpc/dhcp.rb, line 9
def list
  create_ec2_object
  @ec2.list
end

Private Instance Methods

create_ec2_object() click to toggle source
# File lib/awscli/cli/ec2/vpc/dhcp.rb, line 38
def create_ec2_object
  puts "ec2 Establishing Connetion..."
  $ec2_conn = if parent_options[:region]
                Awscli::Connection.new.request_ec2(parent_options[:region])
              else
                Awscli::Connection.new.request_ec2
              end
  puts "ec2 Establishing Connetion... OK"
  @ec2 = Awscli::EC2::Dhcp.new($ec2_conn)
end