Method: Stax::Cmd::Rds#failover

Defined in:
lib/stax/mixin/rds.rb

#failoverObject



126
127
128
129
130
131
132
133
# File 'lib/stax/mixin/rds.rb', line 126

def failover
  stack_rds_clusters.each do |c|
    if yes?("Failover #{c.db_cluster_identifier}?", :yellow)
      resp = Aws::Rds.client.failover_db_cluster(db_cluster_identifier: c.db_cluster_identifier, target_db_instance_identifier: options[:target])
      puts "failing over #{resp.db_cluster.db_cluster_identifier}"
    end
  end
end