class AwsAmiCleanup::Commands

Public Instance Methods

clean_amis() click to toggle source
# File lib/aws_ami_cleanup/commands.rb, line 12
def clean_amis
  cleanup_amis = AwsAmiCleanup::CleanupAmis.new(
                  region,
                  options[:number_of_amis_to_keep]&.to_i,
                  options[:skip_verification]
                )

  cleanup_amis.execute!(ami_name: options[:ami_name],
                        ami_owner: options[:ami_owner],
                        dry_run: options[:dry_run])
end
console() click to toggle source
# File lib/aws_ami_cleanup/commands.rb, line 25
def console
  require 'byebug'
  byebug
end

Protected Instance Methods

region() click to toggle source
# File lib/aws_ami_cleanup/commands.rb, line 32
def region
  options[:region] || 'us-east-1'
end