Class: AwsCli::CLI::EC2::Ami

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

Instance Method Summary collapse

Instance Method Details

#createObject



30
31
32
33
# File 'lib/awscli/cli/ec2/ami.rb', line 30

def create
  create_ec2_object
  @ec2.create_image_from_instance options
end

#deregisterObject



37
38
39
40
# File 'lib/awscli/cli/ec2/ami.rb', line 37

def deregister
  create_ec2_object
  @ec2.deregister options[:image_id]
end

#listObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/awscli/cli/ec2/ami.rb', line 12

def list
  create_ec2_object
  if options[:amazon_owned]
    @ec2.list_amazon
  elsif options[:show_filters]
    @ec2.show_filters
  elsif options[:self_owned]
    @ec2.list_self
  else
    @ec2.list options[:filter]
  end
end