ubicloud/cli-commands/pg/post/remove-pgbouncer-config-entries.rb
Jeremy Evans 373826c705 Add pg remove-pgbouncer-config-entries to the cli
This uses the existing update_pgbouncer_config sdk feature, with nil values,
which the api treats as deleting the entries.
2025-08-26 02:42:03 +09:00

13 lines
433 B
Ruby

# frozen_string_literal: true
UbiCli.on("pg").run_on("remove-pgbouncer-config-entries") do
desc "Remove pgbouncer configuration entries from a PostgreSQL database"
banner "ubi pg (location/pg-name | pg-id) remove-pgbouncer-config-entries key [...]"
args(1..)
run do |args, _, cmd|
config_entries_response(sdk_object.update_pgbouncer_config(**args.to_h { [it, nil] }), body: ["Updated pgbouncer config:\n"])
end
end