This web method is used for creating new maintenance windows. For each maintenance window type, the pre-existing window definitions under the monitor governed by the maintenance are removed before creating new ones. The safe way to use this method is to retrieve the pre-existing window definitions and add the new maintenance window definitions to the collections before doing the add. This ensures that pre-existing window definitions will be preserved when you add new ones. To remove a window definition, retrieve the pre-existing window definitions and send an add request with the definition to be removed omitted from the collection.
The input part of an AddOrUpdateMaintenanceWindows method invocation contains an AddOrUpdateMaintenanceWindowsRequest element. This element must contain a Credentials element and a collection of MaintenanceWindowMonitors. Each MaintenanceWindowMonitor may contain either a collection of OneTimeMaintenanceWindows or a collection of RecurringMaintenanceWindows or both types of collection.
|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.|
|MaintenanceWindowMonitor||anyType (restriction)||1..*||No||A maintenance window monitor appears in both the GetMaintenanceWindows output as well as in the AddOrUpdateMaintenanceWindows request. In the first context, it is a container of monitor-level maintenance window data for already configured maintenance windows. In the second context, it contains monitor-level maintenance window data for use in adding new or updating existing maintenance windows.|
The output part of an of an AddOrUpdateMaintenanceWindows request contains an AddOrUpdateMaintenanceWindowsResponse element. This element contains the response status of the request (SUCCESS or FAILURE) and a message if the request failed. All of the updates in the request must be successful in order for any of the updates to be persisted.
|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 message creates two one-time maintenance window definitions for a specific monitor:
The following message creates two recurring maintenance window definitions under a single monitor:
The following message deletes all the one-time maintenance windows that exist for a given monitor:
The following message deletes all the recurring maintenance window definitions for a given monitor:
The following is a sample successful response to any one of the previous requests: