updatePatchManagementMaintenanceWindow
This method modifies a patch management maintenance window.
Parameters
Parameter | Description | Included in request | Type | Values |
---|---|---|---|---|
| The name you want to assign to the Patch Management window. | Mandatory | String | Possible values:
|
| The ID of the company where you want the maintenance window created. | Optional | String | Default value: The ID of the company linked to the user who generated the API key. Requirements:
|
| Indicates if the target is a Customer company. | Mandatory | Boolean | No additional requirements. |
| Use this array to configure Patch Management settings for the maintenance window you are creating. | Mandatory | Array of objects | Refer to ??? |
Objects
downloadSettings
Parameter | Description | Type | Value |
---|---|---|---|
| Used to specify which patch caching servers are to be used. Position in array should be interpreted as priority. | Array of objects | Contains the following information:
|
| Determines if the Direct Download setting is enabled. | Boolean | No additional requirements. |
installPatchesSettings
Parameter | Description | Type | Value |
---|---|---|---|
| Indicates if the patch applies automatically when enabled. Corresponds to the Apply patch switch in the GravityZone console. | Boolean | No additional requirements. |
| Indicates that the task, if not performed, will retried it as soon as possible. | Boolean | No additional requirements. |
| Specify which vendors and products you would like to include or exclude from being patched. | Object | Contains the following information:
|
| Indicate if you would like to postpone a system reboot after applying a patch. | Object | Contains the following information:
|
| Used to enable and apply specific settings to either security or non security updates. | Object | Contains the following information:
|
| A list of unique patch IDs. | Array of strings | The patch IDs must be valid and belong to to the company that the maintenance window is created for. TipYou can use the |
Warning
If the
enabled
parameter under theinstallPatchesSettings
object has assigned thetrue
value, you need to assign thetrue
value to one of the following parameters:The
enabled
parameter under thesecurityPatchesSettings
option. They can be found under theupdateType
object, located under theinstallPatchesSettings
object.The
enabled
parameter under thenonSecurityPatchesSettings
option. They can be found under theupdateType
object, located under theinstallPatchesSettings
object.
If the
enabled
parameter under theinstallPatchesSettings
object has assigned thefale
value, you need to make sure none of these parameters have thetrue
value assigned:The
enabled
parameter under thesecurityPatchesSettings
option. They can be found under theupdateType
object, located under theinstallPatchesSettings
object.The
enabled
parameter under thenonSecurityPatchesSettings
option. They can be found under theupdateType
object, located under theinstallPatchesSettings
object.
If the
enabled
parameter under theinstallPatchesSettings
object has assigned thetrue
value, theenabled
parameter under thescanPatchesSettings
object must also have thetrue
value assigned.
vendorProductsPairs
Parameter | Description | Type | Value |
---|---|---|---|
| The operating system the vendor-products pair is compatible with. You can use this attribute when a specific vendor-products pair is compatible with multiple operating systems. | Integer | Possible values:
Default value:
ImportantThe values provided to this attribute must be compatible the vendor-product pair specified in the request. Using an invalid combination will result in an error. |
| Include one or more vendors. | Object | The object contains the following attributes:
|
| Include one or more products | Array of objects | The object contains the following attributes:
|
between
Parameter | Description | Type | Value |
---|---|---|---|
| The hour the event is set to be start. | Integer | It can have a value between |
| The minute the event is set to be start. | Integer | It can have a value between |
| The hour the event is set to be end. | Integer | It can have a value between |
| The minute the event is set to be end. | Integer | It can have a value between |
Note
startHour:startMinute
must be less than endHour:endMinute
scheduler
Parameter | Description | Type | Value |
---|---|---|---|
| Sets the frequency of a specific task | Integer | Possible values:
|
| Indicates the current epoch time (10 characters, seconds precision) if current day is selected. | Integer | Must be be a value greater than |
| Sets a time interval for running tasks | Object | For more information, refer to ???. |
| Determines the frequency of a weekly task. This parameter is only available if | Object | Contains the following information:
|
| Determines the frequency of a monthly task. This parameter is only available if | Object | Contains the following information:
|
oldScheduler
Parameter | Description | Type | Value |
---|---|---|---|
| Sets the frequency for running a task | Integer | Possible values:
|
| The hour the event is set to be start. | Integer | Possible values: |
| The minute the event is set to be start. | Integer | Possible values: |
| Sets the task to recur on a specific day of the week. | Array of Integers | Possible values: |
scanPatchesSettings
Parameter | Description | Type | Value |
---|---|---|---|
| Indicates if scans are automatically made to search for new patches. Corresponds to the Scan for patches switch in the GravityZone console. | Boolean | No additional requirements. |
| Indicates if scans are made 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 | No additional requirements. |
| Switches between the current schedule system ( | String | Possible values:
|
| Sets this schedule as default for all tasks. Corresponds to the Use the same schedule for all targeted operations switch in the GravityZone console. | Boolean | No additional requirements. |
| Sets up a specific schedule. | Objects | Contains the following information
NoteMust be included if |
| Sets up a specific schedule using the fallback system. | Object | Contains the following information:
|
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 ] } }, }, "securityPatchesSettings": { "enabled": true, "scheduler": { "recurrence": 1 }, "manuallyApprovedPatchesSettings": { "enabled": True, "scheduler": { "recurrence": 1 } } } "manuallyApprovedPatchIds": [ "{00016C6E-0000-0000-0000-000000000000}", "{0001354A-0000-0000-0000-000000000000}" ] }, "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 ] } }, } } } }
Response:
{ "id" : "a7f1d11d-3c94-47f0-a599-b48d2fc44241", "jsonrpc" : "2.0", "result" : { "success" : true } }