class Jamf::DiskEncryptionConfiguration
Disk Encryption Configuration
object inside JSS
More Detailed Description if needed
Constants
- ENABLED_USERS_TYPE
@note as of 10.13 Management
Account
cannot be used due to the lack of a secure token.- KEY_TYPE
@note Currently “Individual and Institutional” configuration type is unsupported through the API
- RSRC_BASE
The base for REST resources of this class
- RSRC_LIST_KEY
the hash key used for the JSON list output of all objects in the
JSS
- RSRC_OBJECT_KEY
The hash key used for the JSON object output It’s also used in various error messages
Attributes
file_vault_enabled_users[R]
institutional_recovery_key[R]
key_type[R]
Attributes
Public Class Methods
new(**args)
click to toggle source
Calls superclass method
Jamf::APIObject::new
# File lib/jamf/api/classic/api_objects/disk_encryption_configuration.rb 58 def initialize(**args) 59 super 60 61 if self.in_jss? 62 @key_type = @init_data[:key_type] 63 @file_vault_enabled_users = @init_data[:file_vault_enabled_users] 64 @institutional_recovery_key = @init_data[:institutional_recovery_key] 65 else 66 raise Jamf::InvalidDataError, "Currently the ability to create a Disk Encryption Configuration is not possible through ruby-jss." 67 end 68 69 70 71 end
Public Instance Methods
file_vault_enabled_users=(newvalue)
click to toggle source
Sets what type of account is to be enabled using the new value
@author Tyler Morgan
@param newvalue One of ENABLED_USERS_TYPE
@return [Void]
# File lib/jamf/api/classic/api_objects/disk_encryption_configuration.rb 84 def file_vault_enabled_users=(newvalue) 85 raise Jamf::InvalidDataError, "file_vault_enabled_users must be one of :#{ENABLED_USERS_TYPE.keys.join(',:')}." unless ENABLED_USERS_TYPE.keys.include? newvalue 86 87 @file_vault_enabled_users = ENABLED_USERS_TYPE[newvalue] 88 89 @need_to_update = true 90 91 end
Private Instance Methods
rest_xml()
click to toggle source
Private Instance Methods
# File lib/jamf/api/classic/api_objects/disk_encryption_configuration.rb 98 def rest_xml 99 raise Jamf::UnsupportedError, "Key type of \"Individual and Institutional\" is currently unsupported via. API. So changes are unable to be saved." if @key_type == KEY_TYPE[:individual_and_institutional] 100 doc = REXML::Document.new 101 disk_encryption_configuration = doc.add_element 'disk_encryption_configuration' 102 103 disk_encryption_configuration.add_element('id').text = @id 104 disk_encryption_configuration.add_element('name').text = @name 105 disk_encryption_configuration.add_element('key_type').text = @key_type 106 disk_encryption_configuration.add_element('file_vault_enabled_users').text = @file_vault_enabled_users 107 108 doc.to_s 109 110 111 112 end