Russian Prime Minister Dmitry Medvedev has resigned and was appointed by President Putin as deputy head of the country's security council.