This method applies a common set of maintenance window definitions to multiple monitors.
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.
|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.|
The ApplyMaintenanceWindowsTemplateResponse contains the response status for the request (SUCCESS or FAILURE) and an optional message (present if there was a failure).
|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.|
The following request applies three one-time maintenance window definitions to three monitorResponses:
The following request applies seven recurring maintenance window definitions to three monitors:
The following is a sample success response (the format is the same for both of the previous requests):