ex_uptimerobot v0.4.0 ExUptimerobot.MaintenanceWindow
Interact with Maintenance window -related API methods.
Summary
Functions
Delete an existing maintenance window by the maintenance window ID
Edit maintenance window with given 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}
Edit maintenance window with given id.
Required params:
id
friendly_name
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.edit_maintenance_window([
id: 14362
friendly_name: "New window name",
start_time: "1612083323",
duration: "30"
])
{:ok, response}
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}