mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-04 13:52:06 +08:00
This uses the existing update_pgbouncer_config sdk feature, with nil values, which the api treats as deleting the entries.
13 lines
433 B
Ruby
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
|