-
Notifications
You must be signed in to change notification settings - Fork 3
Maintenance API
Methods for creating and managing monitoring maintenance windows.
Create a new window and configure monitors for use
Retrieve a list of all windows
Retrieve information on a given window by id
Modify an existing window
Delete a window
create(string name, string start_date, array monitor, int duration, **kwargs)
Create a new window and configure monitors for use
Arguments:
name - Name of the maintenance window
start_date - Start time in ISO 8601 format
monitor - An array of monitor IDs affected by the maintenance window
duration - Length of the maintenance window in minutes
Keyword Arguments:
description - A description of the window
recurrence - How often the maintenance repeats
W for weekly
M for monthly
Y for yearly
1 for one-time (default)
alert - Whether or not to alert during maintenance (true or false)
Example:
c.maintenance().create('My Window', '2018-07-19T15:20:51+00:00', ['monitor_id1', 'monitor_id2'], description='weekly window', recurrence='W', alert=False)list()
List all maintenance windows in the account
Example:
c.maintenance().list()get()
Retrieve info for a maintenance window
Example:
c.maintenance('window_id').get()update(**kwargs)
Update an existing maintenance window
Keyword Arguments:
name - Name of the maintenance window
description - A description of the window
recurrence - How often the maintenance repeats
W for weekly
M for monthly
Y for yearly
1 for one-time (default)
alert - Whether or not to alert during maintenance (true or false)
start_date - Start time in ISO 8601 format
monitor - An array of monitor IDs affected by the maintenance window
duration - Length of the maintenance window in minutes
Example:
c.maintenance('window_id').update(name='My Window', start_date='2018-07-19T15:20:51+00:00', monitor=['monitor_id1', 'monitor_id2'], description='weekly window', recurrence='W', alert=False)delete()
Delete a maintenance window
Example:
c.maintenance('window_id').delete()