NodePing.Notificationprofiles.update

You're seeing just the function update, go back to NodePing.Notificationprofiles module for more information.
Link to this function

update(token, id, name, notifications)

View Source

Specs

update(
  token :: bitstring(),
  id :: bitstring(),
  name :: bitstring(),
  notifcations :: list()
) :: tuple()

Create a notification profile for the account

Parameters

  • token - NodePing API token that is provided with account
  • id - the ID for the notification profile being updated
  • name - Name for the notification profile
  • notifications - list of maps containing the contact or group id, delay, and scheduling for notifications

Examples

iex> token = System.fetch_env!("TOKEN")
iex> customerid = System.fetch_env!("CUSTOMERID")
iex> id = "201205050153W2Q4C-P-3QJWG"
iex> notifications = [
   >   %{"contactkey1" => %{"delay" => 0, "schedule" => "schedule1"}},
   >   %{"contactkey2" => %{"delay" => 0, "schedule" => "schedule1"}},
   > ]
iex> {:ok, result} = NodePing.Notificationprofiles.update(token, id, "profilename", notifications)
Link to this function

update(token, id, name, notifications, customerid)

View Source

Specs

update(
  token :: bitstring(),
  id :: bitstring(),
  name :: bitstring(),
  notifcations :: list(),
  customerid :: bitstring()
) :: tuple()

Create a notification profile for the account

Parameters

  • token - NodePing API token that is provided with account
  • id - the ID for the notification profile being updated
  • name - Name for the notification profile
  • notifications - list of maps containing the contact or group id, delay, and scheduling for notifications
  • customerid - optional ID to access a subaccount

Examples

iex> token = System.fetch_env!("TOKEN")
iex> customerid = System.fetch_env!("CUSTOMERID")
iex> id = "201205050153W2Q4C-P-3QJWG"
iex> notifications = [
   >   %{"contactkey1" => %{"delay" => 0, "schedule" => "schedule1"}},
   >   %{"contactkey2" => %{"delay" => 0, "schedule" => "schedule1"}},
   > ]
iex> {:ok, result} = NodePing.Notificationprofiles.update(token, id, "profilename", notifications, customerid)