Class: Stax::Cmd::Keypair

Inherits:
SubCommand show all
Defined in:
lib/stax/mixin/keypair.rb

Instance Method Summary collapse

Methods inherited from SubCommand

#info, stax_info, stax_info_tasks

Instance Method Details

#createObject



34
35
36
# File 'lib/stax/mixin/keypair.rb', line 34

def create
  puts my.keypair_create
end

#delete(name = my.stack_name) ⇒ Object



39
40
41
# File 'lib/stax/mixin/keypair.rb', line 39

def delete(name = my.stack_name)
  my.keypair_delete if yes?("Really delete keypair #{name}?", :yellow)
end

#lsObject



26
27
28
29
30
31
# File 'lib/stax/mixin/keypair.rb', line 26

def ls
  names = options[:all_keys] ? nil : [my.stack_name]
  print_table Aws::Keypair.describe(names).map { |k|
    [k.key_name, k.key_fingerprint]
  }
end