NodePing.Notificationprofiles.update
You're seeing just the function
update
, go back to NodePing.Notificationprofiles module for more information.
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 accountid
- the ID for the notification profile being updatedname
- Name for the notification profilenotifications
- 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)
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 accountid
- the ID for the notification profile being updatedname
- Name for the notification profilenotifications
- list of maps containing the contact or group id, delay, and scheduling for notificationscustomerid
- 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)