Class: Chef::Knife::RdsInstanceDelete

Inherits:
Chef::Knife show all
Includes:
RdsBase
Defined in:
lib/chef/knife/rds_instance_delete.rb

Constant Summary

Constants included from RdsBase

Chef::Knife::RdsBase::APPLY_METHODS

Instance Method Summary collapse

Methods included from RdsBase

#assert_name_args_at_least!, #assert_valid_apply_method!, #authenticate!, #connect!, included, #rds

Instance Method Details

#db_instance_idObject



23
24
25
# File 'lib/chef/knife/rds_instance_delete.rb', line 23

def db_instance_id
  name_args.first
end

#runObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/chef/knife/rds_instance_delete.rb', line 11

def run

  assert_name_args_at_least!(1, "Database identifier required.")

  authenticate!

  confirm("Are you sure you want to delete #{db_instance_id}")

  rds.client.delete_db_instance({db_instance_identifier: db_instance_id, skip_final_snapshot: true})

end