createPatchManagementMaintenanceWindow
This method creates a maintenance window which you can use in Patch Management.
Parameters
Parameter | Type | Optional | Description |
|---|---|---|---|
| String | No | The name of the window. Must be between 1 and 80 characters. Must be unique. |
| Boolean | No | Must be set to |
| Object | No | The settings to be assigned to the 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 |
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:
|
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:
|
Warning
If
specifics.installPatchesSettings.enabled=true, at least one of the following 2 must be enabled:specifics.installPatchesSettings.updateType.securityPatchesSettings.enabled
specifics.installPatchesSettings.updateType.nonSecurityPatchesSettings.enabled
if
specifics.installPatchesSettings.enabled=false, both must also be false:specifics.installPatchesSettings.updateType.securityPatchesSettings.enabled
specifics.installPatchesSettings.updateType.nonSecurityPatchesSettings.enabled
if
specifics.installPatchesSettings.enabled=true,specifics.scanPatchesSettings.enabledmust betrue.
Return value
This method returns a value of true or false, indicating if the maintenance window was successfully created.
Example
Request:
{
"method": "createPatchManagementMaintenanceWindow",
"id": "a7f1d11d-3c94-47f0-a599-b48d2fc44241",
"jsonrpc": "2.0",
"params": {
"name": "QXPzQWvgtqtI4FlCRSU9z",
"allowChangeByOtherUsers": true,
"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" : {
"data" : [
"61969696af703331ad53a948"
],
"success" : true
}
}