Update a pending schedule maintenance window
This endpoint is used to update a pending schedule maintenance window.
URL
POST https://{api-url}/api/v2/tenants/{tenantId}/scheduleMaintenances/{smId}
Sample URLs
https://{api-url}/api/v2/tenants/client_5/scheduleMaintenances/SM-c11b6b44-c85a-426c-9963-0e977070ce98
Notes
- In this API, user can update schedule details such as name, schedule type, and alert conditions. Resource details cannot be updated.
- To retrieve the list of pending schedule maintenance windows, use Search Schedule Maintenance Windows API.
Parameters
Field | Data Type | Description |
---|
name | String | Schedule name. |
description | String | Schedule description. |
devices/deviceGroups/locations | String | Details of resources which should be added to schedule maintenance window. No more than 100 resources can be added to a schedule maintenance window. |
schedule- type
- startTime
- endTime
- timezone
- pattern
- type
- weekDays
| String | Schedule details:- Schedule type.
Supported values: One-Time, recurring - Time at which the schedule activity should begin.
- Time at which the schedule activity should end.
- Timezone in which the schedule should operate. (The list of timezones are shown below.)
Example: "timezone": "America/Puerto_Rico" - Schedule pattern:
- Pattern type.
Supported values: daily, weekly, monthly.
See schedule maintenance: recurring to know more about the supported values for pattern types. - Weekday pattern with these values: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday.
|
runRBA | Boolean | (Optional) Set runRBA=true to run RBA scripts; otherwise, set to false. |
installPatch | Boolean | (Optional) Set installPatch=true to install patch; otherwise, set to false. |
For a recurring schedule maintenance to end at a specific time period, provide the end date and time in the field endTime. Example: "2016-05-29T18:55:27+0000"installPatch | Boolean | (Optional) Set installPatch=true to install patch. |
runEscalationAction | Boolean | (Optional) Provide runEscalationAction: true to escalate maintenance alerts after schedule maintenance is completed. If no value is provided, the default value is true. |
alertConditions- matchingType
- rules
- key
- operator
- value
| String | (Optional) For specific alerts to be triggered as maintenance alerts, configure the below alert conditions. Alerts that do match with the below conditions are triggered as monitoring alerts:- Alert conditions should match ALL or ANY of the rules.
- Conditions for filter alerts:
- Unique attribute of alert.
- Logical operators to filter alertsSupported values: Equals, NotEquals, Equals, NotEquals, Startswith, Endswith, Regex. See Regular Expressions to filter alerts with operator Regex.
- Unique data of alert.
Example: Cloud Controller Discovery
|
Timezones |
---|
Pacific/Asia | Pacific/Honolulu | America/Anchorage |
America/Los_Angeles | America/Denver | America/Chicago |
America/New_York | America/Puerto_Rico | America/St_Johns |
America/Buenos_Aires | Atlantic/Azores | GMT |
Europe/Paris | Europe/Istanbul | Africa/Addis_Ababa |
Asia/Tehran | Asia/Yerevan | Asia/Karachi |
Asia/Calcutta | Asia/Dacca | Asia/Saigon |
Asia/Shanghai | Asia/Tokyo | Australia/Darwin |
Australia/Sydney | Pacific/Guadalcanal | Pacific/Auckland |
{
"name": "Network devices schedule maintenance",
"description": "Recurring maintenance",
"runRBA": "false",
"installPatch": "false",
"schedule": {
"type": "Recurring",
"startTime": "2018-08-18T10:55:27+0000",
"endTime": "2018-08-19T18:55:27+0000",
"timezone": "GMT",
"pattern": {
"type": "weekly",
"weekDays": "Wednesday,Thursday"
}
},
"alertConditions": {
"matchingType": "ANY",
"rules": [{
"key": "subject",
"operator": "CONTAINS",
"value": "newTest"
}, {
"key": "description",
"operator": "CONTAINS",
"value": "test Description"
}, {
"key": "serviceName",
"operator": "CONTAINS",
"value": "newTest"
}]
}
}
Sample response
{
"uniqueId": "SM-c11b6b44-c85a-426c-9963-0e977070ce98"
}