Class: AwsAmiCleanup::Commands

Inherits:
Thor
  • Object
show all
Defined in:
lib/aws_ami_cleanup/commands.rb

Instance Method Summary collapse

Instance Method Details

#clean_amisObject



11
12
13
14
15
16
17
# File 'lib/aws_ami_cleanup/commands.rb', line 11

def clean_amis
  cleanup_amis = AwsAmiCleanup::CleanupAmis.new(region, options[:number_of_amis_to_keep]&.to_i)

  cleanup_amis.execute!(ami_name: options[:ami_name],
                        ami_owner: options[:ami_owner],
                        dry_run: options[:dry_run]&.casecmp?('true'))
end

#consoleObject



20
21
22
23
# File 'lib/aws_ami_cleanup/commands.rb', line 20

def console
  require 'byebug'
  byebug
end