module Grafana::Modules::AlertNotificationChannel
Public Instance Methods
create_notification_channel(channel)
click to toggle source
# File lib/grafana/modules/alert_notification_channel.rb, line 12 def create_notification_channel(channel) # TODO: verify channel is a hash and has the expected values post('/api/alert-notifications', channel) end
delete_notification_channel(uid:)
click to toggle source
# File lib/grafana/modules/alert_notification_channel.rb, line 24 def delete_notification_channel(uid:) @conn.delete("/api/alert-notifications/uid/#{uid}") end
notification_channel(uid:)
click to toggle source
# File lib/grafana/modules/alert_notification_channel.rb, line 8 def notification_channel(uid:) get("/api/alert-notifications/uid/#{uid}") end
notification_channels()
click to toggle source
# File lib/grafana/modules/alert_notification_channel.rb, line 4 def notification_channels get('/api/alert-notifications') end
test_notification_channel(type:, settings:)
click to toggle source
# File lib/grafana/modules/alert_notification_channel.rb, line 28 def test_notification_channel(type:, settings:) # TODO: verify settings is a hash # TODO: verify type is supported notifier post('/api/alert-notifications/test', { type: type, settings: settings }) end
update_notification_channel(channel, uid:)
click to toggle source
# File lib/grafana/modules/alert_notification_channel.rb, line 18 def update_notification_channel(channel, uid:) # TODO: verify channel is a hash and has the expected values post("/api/alert-notifications/uid/#{uid}", channel) end