This reverts commit b741fe9005
.
This was backed out as problems started occuring shortly after
a large CLI pull request was merged. However, log analysis
shows that the CLI was unrelated to the problems.
12 lines
455 B
Ruby
12 lines
455 B
Ruby
# frozen_string_literal: true
|
|
|
|
UbiRodish.on("pg").run_is("delete-metric-destination", args: 1, invalid_args_message: "metric destination id is required") do |ubid|
|
|
if ubid.include?("/")
|
|
raise Rodish::CommandFailure, "invalid metric destination id format"
|
|
end
|
|
|
|
delete(project_path("location/#{@location}/postgres/#{@name}/metric-destination/#{ubid}")) do |data|
|
|
["Metric destination, if it exists, has been scheduled for deletion"]
|
|
end
|
|
end
|