Deleting a one-time maintenance window from a monitor

The recommended practice for deleting a one-time maintenance window is to fetch the current collection of one-time maintenance windows for the monitor and then send a new AddOrUpdateMaintenanceWindows request into the system with the maintenance window that you want to delete omitted from the collection.

Consider the case where the returned set of maintenance windows contains the following:

<OneTimeMaintenaneWindows>
     <OneTimeMaintenanceWindow beginDate="2012-01-27T18:05:00"
                               endDate="2013-01-26T21:10:00"/>
     <OneTimeMaintenanceWindow beginDate="2012-01-28T21:10:00"
                               endDate="2013-03-27T22:10:00"/>
</OneTimeMaintenaneWindows>

To delete the 3/27 maintenance window, send the following AddOrUpdateMaintenanceWindows request:

...
   <soapenv:Body>
      <prov:AddOrUpdateMaintenanceWindowsRequest>
         <prov:Credentials>
            <prov:UserName>testuser</prov:UserName>
            <prov:Password>testpassword</prov:Password>
         </prov:Credentials>
         <prov:MaintenanceWindowMonitor monitorId="326334"
              xmlns="http://www.gomeznetworks.com/schemas/provisioning">
            <prov:OneTimeMaintenaneWindows>
               <prov:OneTimeMaintenanceWindow beginDate="2012-01-27T18:05:00"
                                              endDate="2013-01-26T21:10:00"/>
            </prov:OneTimeMaintenaneWindows>
         </prov:MaintenanceWindowMonitor>
      </prov:AddOrUpdateMaintenanceWindowsRequest>
   </soapenv:Body>
...

Since this request does not include the 3/27 maintenance window definition, and one exists in the system, that definition will be purged from the system by the request. The existing 1/26 definition will also be purged and recreated by this request. The net result is that one window definition will be purged.