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

13 lines
383 B
Ruby

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