module Jamf::ComputerRecoveryLock
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.
TODO: When POSTing to api/preview/mdm/commands is no longer in Preview, implement that endpoint and then add the setting of the recovery lock to this module.
Constants
- RECOVERY_LOCK_PW_RSRC_SUFFIX
The JPAPI resource for a single computer’s RecoveryLock password is Jamf::Computer::JPAPI_INVENTORY_RSRC then the computer’s ID then this
Public Class Methods
when this module is included, also extend our Class Methods
# File lib/jamf/api/jamf_pro/mixins/computer_recovery_lock.rb 42 def self.included(includer) 43 Jamf.load_msg "--> #{includer} is including #{self}" 44 includer.extend(ClassMethods) 45 end
Public Instance Methods
Get the JPAPI inventory data for this computer, either by section or all sections.
@see ComputerRecoveryLock::ClassMethods.inventory_data
# File lib/jamf/api/jamf_pro/mixins/computer_recovery_lock.rb 151 def inventory_data(section: 'GENERAL') 152 self.class.inventory_data @id, section: section, cnx: @cnx 153 end
Get the MDM
‘managementID’ of this computer.
@see ComputerRecoveryLock::ClassMethods.management_id
# File lib/jamf/api/jamf_pro/mixins/computer_recovery_lock.rb 159 def management_id 160 inventory_data.general.managementId 161 end
Get the recovery lock password for this Computer
instance
@see ComputerRecoveryLock::ClassMethods.recovery_lock_password
# File lib/jamf/api/jamf_pro/mixins/computer_recovery_lock.rb 143 def recovery_lock_password 144 self.class.recovery_lock_password @id, cnx: @cnx 145 end