updatePatchManagementMaintenanceWindow
This method modifies a patch management maintenance window.
Parameters
Parameter | Type | Optional | Description |
---|---|---|---|
| String | No | The ID of the maintenance window |
| String | Yes | The name of the maintenance window. |
| Boolean | Yes | If true, other users can make changes to the maintenance window. |
| Object | Yes | An object with settings specific to the patch management maintenance window. For more information on the available settings and how to use them refer to Settings |
Settings
You can use the settings
parameter to modify the Patch Management settings for the maintenance window you are creating.
The available objects are:
downloadSettings
Member | Type | Description |
---|---|---|
| Array of objects | Used to specify which patch caching servers are to be used. Position in array should be interpreted as priority. Each object should contain:
Needed validations :
|
| Boolean | Toggles fallback on Direct Download setting on/off. NoteMust be |
installPatchesSettings
Member | Type | Description |
---|---|---|
| Boolean | When enabled, patches are automatically applied when available. Corresponds to the Apply patch switch in the GravityZone console. |
| Boolean | If |
| Object | Specify which vendors and products you would like to include or exclude from being patched. Components:
|
| Object | Object components:
|
| Object | Used to enable and apply specific settings to either security or non security updates. Object components:
|
scanPatchesSettings
Member | Type | Description |
---|---|---|
| Boolean | When enabled, scans are automatically made to search for new patches. Corresponds to the Scan for patches switch in the GravityZone console. |
| Boolean | Scans for available patches whenever installing a new supported application. Corresponds to the Smart scan for patches when new applications are installed switch in the GravityZone console. |
| Boolean | Switches between the current schedule system (
|
| Boolean | Sets this schedule as default for all tasks. Corresponds to the Use the same schedule for all targeted operations switch in the GravityZone console. |
| Object | Sets up a specific schedule. Components:
NoteMust be included if |
| Object | Sets up a specific schedule using the fallback system. Components:
|
Warning
If you are not the user that created the maintenance window, and
allowChangeByOtherUsers
=false
, an error will be returned and you will not be able to update the window.If you are trying to update a maintenance window created by a user that belongs to a parent company which cannot be managed from above, an error will be returned and you will not be able to update the window.
Note
You can change one or more of the following parameters:
name
allowChangeByOtherUsers
settings
Return value
This method returns a value of true or false, indicating if the maintenance window was successfully updated.
Example
Request:
{ "method": "updatePatchManagementMaintenanceWindow", "id": "a7f1d11d-3c94-47f0-a599-b48d2fc44241", "jsonrpc": "2.0", "params": { "id": "61974ab63bdfe97a6c34fe4d", "settings": { "downloadSettings": { "cachingServers": [ ], "fallbackOnDirectDownload": true }, "installPatchesSettings": { "enabled": true, "ifMissedRunAsSoonAsPossible": true, "specificVendorAndProduct": { "type": 1, "enabled": false, "vendorProductsPairs": [ { "os": 3, "vendor": { "id": "Oracle" }, "products": [ { "id": "java-11-openjdk 11" }, { "id": "java-1.8.0-openjdk" } ] }, { "vendor": { "id": "Inkscape" }, "products": [ { "id": "0" } ] }, { "vendor": { "id": "65" }, "products": [ { "id": "15694" } ] } ] }, "postponeReboot": { "option": 0 }, "updateType": { "nonSecurityPatchesSettings": { "enabled": true, "scheduler": { "recurrence": 3, "startDate": 1637258826, "between": { "startHour": 21, "startMinute": 0, "endHour": 23, "endMinute": 59 }, "weeklyRecurrence": { "every": 1, "days": [ 1, 2, 3, 4, 5, 6, 0 ] } }, "oldScheduler": { "recurrence": 1 } }, "securityPatchesSettings": { "enabled": true, "scheduler": { "recurrence": 1 }, "oldScheduler": { "recurrence": 1 } } } }, "scanPatchesSettings": { "enabled": true, "useSameSchedule": false, "useFallbackSchedule": true, "runOnSystemChanges": true, "scheduler": { "recurrence": 3, "startDate": 1637258826, "between": { "startHour": 21, "startMinute": 0, "endHour": 23, "endMinute": 59 }, "weeklyRecurrence": { "every": 1, "days": [ 1, 2, 3, 4, 5, 6, 0 ] } }, "oldScheduler": { "recurrence": 2, "startHour": 21, "startMinute": 0 } } } } }
Response:
{ "id" : "a7f1d11d-3c94-47f0-a599-b48d2fc44241", "jsonrpc" : "2.0", "result" : { "success" : true } }