module Jamf::MacOSManagedUpdates
This module should be mixed in to Jamf::Computer
and Jamf::ComputerGroup
It provides access to the macos-managed-software-updates JPAPI resource for managed OS update commands to managed macs running Big Sur or higher.
Constants
- DOWNLOAD_AND_INSTALL
These are the options available in Jamf::OAPISchemas::MacOsManagedSoftwareUpdate::UPDATE_ACTION_OPTIONS
- DOWNLOAD_ONLY
- MANAGED_SW_UPDATES_AVAILABLE_VERSIONS_RSRC
GETting this resource provides a list of available OS versions
- MANAGED_SW_UPDATES_RSRC
These resources in the
Jamf
Pro API can be used to send Managed macOS updates to clients running Big Sur or higher- MANAGED_SW_UPDATES_SEND_UPDATES_RSRC
POSTing JSON data to this resource will send the
MDM
commands to install os updates For details about the data to send, see developer.jamf.com/jamf-pro/reference/post_v1-macos-managed-software-updates-send-updates- UPDATE_ACTIONS
for easier use of these values as the updateAction
Public Class Methods
when this module is included, also extend our Class Methods
# File lib/jamf/api/jamf_pro/mixins/macos_managed_updates.rb 35 def self.included(includer) 36 Jamf.load_msg "--> #{includer} is including #{self}" 37 includer.extend(ClassMethods) 38 end
Public Instance Methods
Send a managed update command to an instance of Computer
or ComputerGroup
. This just calls the class method of the same name.
@see MacOSManagedUpdates.send_managed_os_update
# File lib/jamf/api/jamf_pro/mixins/macos_managed_updates.rb 169 def send_managed_os_update(updateAction:, maxDeferrals: nil, version: nil, skipVersionVerification: false, applyMajorUpdate: false, forceRestart: false) 170 deviceIds = is_a?(Jamf::Computer) ? @id : nil 171 groupId = is_a?(Jamf::Computer) ? nil : @id 172 173 self.class.send_managed_os_update( 174 deviceIds: deviceIds, 175 groupId: groupId, 176 maxDeferrals: maxDeferrals, 177 version: version, 178 skipVersionVerification: skipVersionVerification, 179 applyMajorUpdate: applyMajorUpdate, 180 forceRestart: forceRestart, 181 updateAction: updateAction, 182 cnx: @cnx 183 ) 184 end