Skip to content
Shane Barbetta edited this page Jul 19, 2018 · 6 revisions

Methods for creating and managing monitoring maintenance windows.

Method summary

create()

  Create a new window and configure monitors for use

list()

  Retrieve a list of all windows

get()

  Retrieve information on a given window by id

update()

  Modify an existing window

delete()

  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()

Clone this wiki locally