ubicloud/cli-commands/pg/post/reset-superuser-password.rb
Jeremy Evans 72eb0cb3ea Merge UbiRodish into UbiCli
There is no need for a separate class now.  All of the files in
cli-commands now use UbiCli, instead of a mix of UbiCli and
UbiRodish.
2025-02-19 10:25:42 -08:00

13 lines
439 B
Ruby

# frozen_string_literal: true
UbiCli.on("pg").run_on("reset-superuser-password") do
options("ubi pg location/(pg-name|_pg-ubid) reset-superuser-password new-password")
args 1, invalid_args_message: "password is required"
run do |password|
post(pg_path("/reset-superuser-password"), "password" => password) do |data|
["Superuser password reset scheduled for PostgreSQL database with id: #{data["id"]}"]
end
end
end