ex_uptimerobot v0.3.1 ExUptimerobot.MaintenanceWindow
Interact with Maintenance window -related API methods.
Summary
Functions
Delete an existing maintenance window by the maintenance window ID
Get the list of maintenance windows
Add a new maintenance window
Functions
delete_maintenance_window(id)
delete_maintenance_window(integer) :: tuple
delete_maintenance_window(String.t) :: tuple
Delete an existing maintenance window by the maintenance window ID.
Required parameters:
- id (the ID of the maintenance window)
Example
ExUptimerobot.MaintenanceWindow.delete_maintenance_window(2414745)
{:ok, resp}
Get the list of maintenance windows.
Example
iex> ExUptimerobot.MaintenanceWindow.get_maintenance_windows()
{:ok, results}
Add a new maintenance window.
Required params:
friendly_name
type
value
(only needed for weekly and monthly maintenance windows)start_time
(start datetime)duration
(how many minutes the maintenace window will be active for)
Example
MaintenanceWindow.new_maintenance_window([
friendly_name: "Maintenance window name",
type: 1,
start_time: "1612083323",
duration: "30"
])
{:ok, response}