ApplyMaintenanceWindowTemplateToMonitors

This method applies a common set of maintenance window definitions to multiple monitors.

Action

http://gpn.webservice.gomez.com/TestManagementWS_30/TestManagementService.asmx?op=ApplyMaintenanceWindowTemplateToMonitors

Style

Document

Input (literal)

An ApplyMaintenanceWindowTemplateRequest must include user credentials, a monitor list, and either a RecurringMaintenanceWindows collection, a OneTimeMaintenanceWindows collection or both. All the maintenance window definitions in the request will be applied to each of the monitor_ids defined in the monitor list.

Element Type Occurs Nillable? Description
SEQUENCE 1..1
Credentials anyType (restriction) 1..1 No A Credentials element contains the username and password of an account user. The element is required in all requests to the Test Management Web Service.
UserName [element Credentials] string 1..1 No The UserName of an employee for an account (and used for authentication).
Password [element Credentials] string 1..1 No A secret used as part of user credentials for authentication. Every request to the Test Management API web service must include a Credentials element. That element itself contains a UserName and a Password element.
MonitorIds anyType (restriction) 1..1 No The MonitorIds element contains a list of monitor ids. This element may appear in a MaintenanceWindowFilter. The output of this query is restricted to the monitors listed in the MonitorIds. However, the monitors listed in the MonitorIds element that are not defined under the account or that do not have maintenance window definitions do not appear in the output. The MonitorIds element may also appear in an ApplyMaintenanceWindowTemplateRequest. In this context, the monitor ids listed in the element designate the monitors that will receive new maintenance window definitions as a result of the request.
OneTimeMaintenanceWindows anyType (restriction) 0..1 No OneTimeMaintenanceWindows are collections of OneTimeMaintenanceWindow elements (see OneTimeMaintenanceWindow).
RecurringMaintenanceWindows anyType (restriction) 0..1 No The RecurringMaintenanceWindows element is a container of RecurringMaintenanceWindow elements. It appears in both GetMaintenanceWindowsResponses and in invocations of the two operations that are provided for updating the existing maintenance windows (AddOrUpdateMaintenanceWindows and ApplyMaintenanceWindowTemplate) to the monitors.

Output (literal)

The ApplyMaintenanceWindowsTemplateResponse contains the response status for the request (SUCCESS or FAILURE) and an optional message (present if there was a failure).

Element Type Occurs Nillable? Description
SEQUENCE 1..1
ResponseStatus ResponseStatusType 1..1 No This element appears in most of the responses issued when the Test Management API operations are invoked.
ErrorMessage [type OperationResponseType] string 0..1 No The error message is provided if the ResponseStatus was FAILURE.

Example

Request

The following request applies three one-time maintenance window definitions to three monitorResponses:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:ApplyMaintenanceWindowTemplateRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <prov:MonitorIds>
            <prov:MonitorId>326334</prov:MonitorId>
            <prov:MonitorId>328141</prov:MonitorId>
            <prov:MonitorId>328196</prov:MonitorId>
         </prov:MonitorIds>
         <prov:OneTimeMaintenanceWindows>
              <prov:OneTimeMaintenanceWindow beginDate=
                "2012-11-15T15:03:42" endDate="2012-11-10T18:03:42"/>
              <prov:OneTimeMaintenanceWindow beginDate=
                "2012-11-16T15:03:42" endDate="2012-11-16T18:03:42"/>
              <prov:OneTimeMaintenanceWindow beginDate=
                "2012-11-17T15:03:42" endDate="2012-11-16T18:03:42"/>
          </prov:OneTimeMaintenanceWindows>
      </prov:ApplyMaintenanceWindowTemplateRequest>
   </soapenv:Body>
</soapenv:Envelope>

The following request applies seven recurring maintenance window definitions to three monitors:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:prov="http://www.gomeznetworks.com/schemas/provisioning">
   <soapenv:Header/>
   <soapenv:Body>
      <prov:ApplyMaintenanceWindowTemplateRequest>
         <prov:Credentials>
            <prov:UserName>erics</prov:UserName>
            <prov:Password>erics</prov:Password>
         </prov:Credentials>
         <prov:MonitorIds>
            <prov:MonitorId>326334</prov:MonitorId>
            <prov:MonitorId>328141</prov:MonitorId>
            <prov:MonitorId>328196</prov:MonitorId>
         </prov:MonitorIds>
         <prov:RecurringMaintenanceWindows>
               <prov:RecurringMaintenanceWindow dayOfWeek="SUN"
                 startTime="03:00:00.0000000-05:00"
                endTime="04:00:00.0000000-05:00"/>
               <prov:RecurringMaintenanceWindow dayOfWeek="MON"
                startTime="03:00:00.0000000-05:00"
                endTime="04:00:00.0000000-05:00"/>
               <prov:RecurringMaintenanceWindow dayOfWeek="TUE"
                startTime="03:00:00.0000000-05:00"
                endTime="04:00:00.0000000-05:00"/>
               <prov:RecurringMaintenanceWindow dayOfWeek="WED"
                startTime="03:00:00.0000000-05:00"
                endTime="04:00:00.0000000-05:00"/>
               <prov:RecurringMaintenanceWindow dayOfWeek="THU"
                startTime="03:00:00.0000000-05:00"
                endTime="04:00:00.0000000-05:00"/>
               <prov:RecurringMaintenanceWindow dayOfWeek="FRI"
                startTime="03:00:00.0000000-05:00"
                endTime="04:00:00.0000000-05:00"/>
               <prov:RecurringMaintenanceWindow dayOfWeek="SAT"
                startTime="03:00:00.0000000-05:00"
                endTime="04:00:00.0000000-05:00"/>
         </prov:RecurringMaintenanceWindows>
      </prov:ApplyMaintenanceWindowTemplateRequest>
   </soapenv:Body>
</soapenv:Envelope>

Response

The following is a sample success response (the format is the same for both of the previous requests):

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <ApplyMaintenanceWindowTemplateResponse
                xmlns="http://www.gomeznetworks.com/schemas/provisioning">
         <ResponseStatus>SUCCESS</ResponseStatus>
      </ApplyMaintenanceWindowTemplateResponse>
   </soap:Body>
</soap:Envelope>