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



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/aws_ami_cleanup/commands.rb', line 14

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

  cleanup_amis.execute!(ami_name: options[:ami_name],
                        ami_owner: options[:ami_owner],
                        dry_run: options[:dry_run])
end

#consoleObject



29
30
31
32
# File 'lib/aws_ami_cleanup/commands.rb', line 29

def console
  require 'debug'
  debugger
end