Class: OCI::DataSafe::Models::MaskDataDetails
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::MaskDataDetails
- Defined in:
- lib/oci/data_safe/models/mask_data_details.rb
Overview
Details to mask data.
Constant Summary collapse
- RE_RUN_FROM_STEP_ENUM =
[ RE_RUN_FROM_STEP_PRE_MASKING_SCRIPT = 'PRE_MASKING_SCRIPT'.freeze, RE_RUN_FROM_STEP_POST_MASKING_SCRIPT = 'POST_MASKING_SCRIPT'.freeze ].freeze
Instance Attribute Summary collapse
-
#is_decrypt ⇒ BOOLEAN
Indicates if the masking request is to decrypt the data values previously encrypted using Deterministic Encryption.
-
#is_drop_temp_tables_enabled ⇒ BOOLEAN
Indicates if the temporary tables created during a masking operation should be dropped after masking.
-
#is_execute_saved_script_enabled ⇒ BOOLEAN
Indicates if data masking should be performed using a saved masking script.
-
#is_ignore_errors_enabled ⇒ BOOLEAN
Indicates if the masking process should continue on hitting an error.
-
#is_move_interim_tables_enabled ⇒ BOOLEAN
Indicates if the interim DMASK tables should be moved to the user-specified tablespace.
-
#is_redo_logging_enabled ⇒ BOOLEAN
Indicates if redo logging is enabled during a masking operation.
-
#is_refresh_stats_enabled ⇒ BOOLEAN
Indicates if statistics gathering is enabled.
-
#is_rerun ⇒ BOOLEAN
Indicates if the masking request is to rerun the previously failed masking steps.
-
#parallel_degree ⇒ String
Specifies options to enable parallel execution when running data masking.
-
#re_run_from_step ⇒ String
Specifies the step from which masking needs to be rerun.
-
#recompile ⇒ String
Specifies how to recompile invalid objects post data masking.
-
#seed ⇒ String
The seed value to be used in case of Deterministic Encryption and Deterministic Substitution masking formats.
-
#tablespace ⇒ String
The tablespace that should be used to create the mapping tables, DMASK objects, and other temporary tables for data masking.
-
#target_id ⇒ String
The OCID of the target database to be masked.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ MaskDataDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ MaskDataDetails
Initializes the object
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 184 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.target_id = attributes[:'targetId'] if attributes[:'targetId'] raise 'You cannot provide both :targetId and :target_id' if attributes.key?(:'targetId') && attributes.key?(:'target_id') self.target_id = attributes[:'target_id'] if attributes[:'target_id'] self.is_decrypt = attributes[:'isDecrypt'] unless attributes[:'isDecrypt'].nil? self.is_decrypt = false if is_decrypt.nil? && !attributes.key?(:'isDecrypt') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isDecrypt and :is_decrypt' if attributes.key?(:'isDecrypt') && attributes.key?(:'is_decrypt') self.is_decrypt = attributes[:'is_decrypt'] unless attributes[:'is_decrypt'].nil? self.is_decrypt = false if is_decrypt.nil? && !attributes.key?(:'isDecrypt') && !attributes.key?(:'is_decrypt') # rubocop:disable Style/StringLiterals self.is_rerun = attributes[:'isRerun'] unless attributes[:'isRerun'].nil? self.is_rerun = false if is_rerun.nil? && !attributes.key?(:'isRerun') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isRerun and :is_rerun' if attributes.key?(:'isRerun') && attributes.key?(:'is_rerun') self.is_rerun = attributes[:'is_rerun'] unless attributes[:'is_rerun'].nil? self.is_rerun = false if is_rerun.nil? && !attributes.key?(:'isRerun') && !attributes.key?(:'is_rerun') # rubocop:disable Style/StringLiterals self.re_run_from_step = attributes[:'reRunFromStep'] if attributes[:'reRunFromStep'] raise 'You cannot provide both :reRunFromStep and :re_run_from_step' if attributes.key?(:'reRunFromStep') && attributes.key?(:'re_run_from_step') self.re_run_from_step = attributes[:'re_run_from_step'] if attributes[:'re_run_from_step'] self.tablespace = attributes[:'tablespace'] if attributes[:'tablespace'] self.is_ignore_errors_enabled = attributes[:'isIgnoreErrorsEnabled'] unless attributes[:'isIgnoreErrorsEnabled'].nil? self.is_ignore_errors_enabled = true if is_ignore_errors_enabled.nil? && !attributes.key?(:'isIgnoreErrorsEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isIgnoreErrorsEnabled and :is_ignore_errors_enabled' if attributes.key?(:'isIgnoreErrorsEnabled') && attributes.key?(:'is_ignore_errors_enabled') self.is_ignore_errors_enabled = attributes[:'is_ignore_errors_enabled'] unless attributes[:'is_ignore_errors_enabled'].nil? self.is_ignore_errors_enabled = true if is_ignore_errors_enabled.nil? && !attributes.key?(:'isIgnoreErrorsEnabled') && !attributes.key?(:'is_ignore_errors_enabled') # rubocop:disable Style/StringLiterals self.seed = attributes[:'seed'] if attributes[:'seed'] self.is_move_interim_tables_enabled = attributes[:'isMoveInterimTablesEnabled'] unless attributes[:'isMoveInterimTablesEnabled'].nil? self.is_move_interim_tables_enabled = true if is_move_interim_tables_enabled.nil? && !attributes.key?(:'isMoveInterimTablesEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isMoveInterimTablesEnabled and :is_move_interim_tables_enabled' if attributes.key?(:'isMoveInterimTablesEnabled') && attributes.key?(:'is_move_interim_tables_enabled') self.is_move_interim_tables_enabled = attributes[:'is_move_interim_tables_enabled'] unless attributes[:'is_move_interim_tables_enabled'].nil? self.is_move_interim_tables_enabled = true if is_move_interim_tables_enabled.nil? && !attributes.key?(:'isMoveInterimTablesEnabled') && !attributes.key?(:'is_move_interim_tables_enabled') # rubocop:disable Style/StringLiterals self.is_execute_saved_script_enabled = attributes[:'isExecuteSavedScriptEnabled'] unless attributes[:'isExecuteSavedScriptEnabled'].nil? self.is_execute_saved_script_enabled = false if is_execute_saved_script_enabled.nil? && !attributes.key?(:'isExecuteSavedScriptEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isExecuteSavedScriptEnabled and :is_execute_saved_script_enabled' if attributes.key?(:'isExecuteSavedScriptEnabled') && attributes.key?(:'is_execute_saved_script_enabled') self.is_execute_saved_script_enabled = attributes[:'is_execute_saved_script_enabled'] unless attributes[:'is_execute_saved_script_enabled'].nil? self.is_execute_saved_script_enabled = false if is_execute_saved_script_enabled.nil? && !attributes.key?(:'isExecuteSavedScriptEnabled') && !attributes.key?(:'is_execute_saved_script_enabled') # rubocop:disable Style/StringLiterals self.is_drop_temp_tables_enabled = attributes[:'isDropTempTablesEnabled'] unless attributes[:'isDropTempTablesEnabled'].nil? raise 'You cannot provide both :isDropTempTablesEnabled and :is_drop_temp_tables_enabled' if attributes.key?(:'isDropTempTablesEnabled') && attributes.key?(:'is_drop_temp_tables_enabled') self.is_drop_temp_tables_enabled = attributes[:'is_drop_temp_tables_enabled'] unless attributes[:'is_drop_temp_tables_enabled'].nil? self.is_redo_logging_enabled = attributes[:'isRedoLoggingEnabled'] unless attributes[:'isRedoLoggingEnabled'].nil? raise 'You cannot provide both :isRedoLoggingEnabled and :is_redo_logging_enabled' if attributes.key?(:'isRedoLoggingEnabled') && attributes.key?(:'is_redo_logging_enabled') self.is_redo_logging_enabled = attributes[:'is_redo_logging_enabled'] unless attributes[:'is_redo_logging_enabled'].nil? self.is_refresh_stats_enabled = attributes[:'isRefreshStatsEnabled'] unless attributes[:'isRefreshStatsEnabled'].nil? raise 'You cannot provide both :isRefreshStatsEnabled and :is_refresh_stats_enabled' if attributes.key?(:'isRefreshStatsEnabled') && attributes.key?(:'is_refresh_stats_enabled') self.is_refresh_stats_enabled = attributes[:'is_refresh_stats_enabled'] unless attributes[:'is_refresh_stats_enabled'].nil? self.parallel_degree = attributes[:'parallelDegree'] if attributes[:'parallelDegree'] raise 'You cannot provide both :parallelDegree and :parallel_degree' if attributes.key?(:'parallelDegree') && attributes.key?(:'parallel_degree') self.parallel_degree = attributes[:'parallel_degree'] if attributes[:'parallel_degree'] self.recompile = attributes[:'recompile'] if attributes[:'recompile'] end |
Instance Attribute Details
#is_decrypt ⇒ BOOLEAN
Indicates if the masking request is to decrypt the data values previously encrypted using Deterministic Encryption. Note that, to correctly decrypt the encrypted data values, it requires the same seed value that was provided to encrypt those data values.
28 29 30 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 28 def is_decrypt @is_decrypt end |
#is_drop_temp_tables_enabled ⇒ BOOLEAN
Indicates if the temporary tables created during a masking operation should be dropped after masking. Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive data values to mask values. These temporary tables are dropped after masking if this attribute is set as true. But, in some cases, you may want to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables must be dropped before the database is available for unprivileged users. If it's not provided, the value of the isDropTempTablesEnabled attribute in the MaskingPolicy resource is used.
84 85 86 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 84 def is_drop_temp_tables_enabled @is_drop_temp_tables_enabled end |
#is_execute_saved_script_enabled ⇒ BOOLEAN
Indicates if data masking should be performed using a saved masking script. Setting this attribute to true skips masking script generation and executes the masking script stored in the Data Safe repository. It helps save time if there are no changes in the database tables and their dependencies.
74 75 76 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 74 def is_execute_saved_script_enabled @is_execute_saved_script_enabled end |
#is_ignore_errors_enabled ⇒ BOOLEAN
Indicates if the masking process should continue on hitting an error. It provides fault tolerance support and is enabled by default. In fault-tolerant mode, the masking process saves the failed step and continues. You can then submit another masking request (with isRerun attribute set to true) to execute only the failed steps.
57 58 59 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 57 def is_ignore_errors_enabled @is_ignore_errors_enabled end |
#is_move_interim_tables_enabled ⇒ BOOLEAN
Indicates if the interim DMASK tables should be moved to the user-specified tablespace. As interim tables can be large in size, set it to false if moving them causes performance overhead during masking.
67 68 69 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 67 def is_move_interim_tables_enabled @is_move_interim_tables_enabled end |
#is_redo_logging_enabled ⇒ BOOLEAN
Indicates if redo logging is enabled during a masking operation. Set this attribute to true to enable redo logging. If set as false, masking disables redo logging and flashback logging to purge any original unmasked data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. If it's not provided, the value of the isRedoLoggingEnabled attribute in the MaskingPolicy resource is used.
93 94 95 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 93 def is_redo_logging_enabled @is_redo_logging_enabled end |
#is_refresh_stats_enabled ⇒ BOOLEAN
Indicates if statistics gathering is enabled. Set this attribute to false to disable statistics gathering. The masking process gathers statistics on masked database tables after masking completes. If it's not provided, the value of the isRefreshStatsEnabled attribute in the MaskingPolicy resource is used.
100 101 102 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 100 def is_refresh_stats_enabled @is_refresh_stats_enabled end |
#is_rerun ⇒ BOOLEAN
Indicates if the masking request is to rerun the previously failed masking steps. If a masking request is submitted with the isIgnoreErrorsEnabled attribute set to true, the masking process tracks the failed masking steps. Another masking request can be submitted with the isRun attribute set to true to rerun those failed masking steps. It helps save time by executing only the failed masking steps and not doing the whole masking again.
36 37 38 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 36 def is_rerun @is_rerun end |
#parallel_degree ⇒ String
Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree of parallelism. Parallel execution helps effectively use multiple CPUs and improve masking performance. Refer to the Oracle Database parallel execution framework when choosing an explicit degree of parallelism. www.oracle.com/pls/topic/lookup?ctx=dblatest&en/database/oracle/oracle-database&id=VLDBG-GUID-3E2AE088-2505-465E-A8B2-AC38813EA355 If it's not provided, the value of the parallelDegree attribute in the MaskingPolicy resource is used.
110 111 112 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 110 def parallel_degree @parallel_degree end |
#re_run_from_step ⇒ String
Specifies the step from which masking needs to be rerun. This param will be used only when isRerun attribute is true. If PRE_MASKING_SCRIPT is passed, it will rerun the pre-masking script, followed by masking, and then the post-masking script. If POST_MASKING_SCRIPT is passed, it will rerun only the post-masking script. If this field is not set and isRerun is set to true, then it will default to the last failed step.
44 45 46 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 44 def re_run_from_step @re_run_from_step end |
#recompile ⇒ String
Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree attribute is used. Use the built-in UTL_RECOMP package to recompile any remaining invalid objects after masking completes. If it's not provided, the value of the parallelDegree attribute in the MaskingPolicy resource is used.
118 119 120 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 118 def recompile @recompile end |
#seed ⇒ String
The seed value to be used in case of Deterministic Encryption and Deterministic Substitution masking formats.
61 62 63 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 61 def seed @seed end |
#tablespace ⇒ String
The tablespace that should be used to create the mapping tables, DMASK objects, and other temporary tables for data masking. If no tablespace is provided, the DEFAULT tablespace is used.
50 51 52 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 50 def tablespace @tablespace end |
#target_id ⇒ String
The OCID of the target database to be masked. If it's not provided, the value of the targetId attribute in the MaskingPolicy resource is used. The OCID of the target database to be masked. If it's not provided, the value of the targetId attribute in the MaskingPolicy resource is used.
22 23 24 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 22 def target_id @target_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 121 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'target_id': :'targetId', 'is_decrypt': :'isDecrypt', 'is_rerun': :'isRerun', 're_run_from_step': :'reRunFromStep', 'tablespace': :'tablespace', 'is_ignore_errors_enabled': :'isIgnoreErrorsEnabled', 'seed': :'seed', 'is_move_interim_tables_enabled': :'isMoveInterimTablesEnabled', 'is_execute_saved_script_enabled': :'isExecuteSavedScriptEnabled', 'is_drop_temp_tables_enabled': :'isDropTempTablesEnabled', 'is_redo_logging_enabled': :'isRedoLoggingEnabled', 'is_refresh_stats_enabled': :'isRefreshStatsEnabled', 'parallel_degree': :'parallelDegree', 'recompile': :'recompile' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 143 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'target_id': :'String', 'is_decrypt': :'BOOLEAN', 'is_rerun': :'BOOLEAN', 're_run_from_step': :'String', 'tablespace': :'String', 'is_ignore_errors_enabled': :'BOOLEAN', 'seed': :'String', 'is_move_interim_tables_enabled': :'BOOLEAN', 'is_execute_saved_script_enabled': :'BOOLEAN', 'is_drop_temp_tables_enabled': :'BOOLEAN', 'is_redo_logging_enabled': :'BOOLEAN', 'is_refresh_stats_enabled': :'BOOLEAN', 'parallel_degree': :'String', 'recompile': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 288 def ==(other) return true if equal?(other) self.class == other.class && target_id == other.target_id && is_decrypt == other.is_decrypt && is_rerun == other.is_rerun && re_run_from_step == other.re_run_from_step && tablespace == other.tablespace && is_ignore_errors_enabled == other.is_ignore_errors_enabled && seed == other.seed && is_move_interim_tables_enabled == other.is_move_interim_tables_enabled && is_execute_saved_script_enabled == other.is_execute_saved_script_enabled && is_drop_temp_tables_enabled == other.is_drop_temp_tables_enabled && is_redo_logging_enabled == other.is_redo_logging_enabled && is_refresh_stats_enabled == other.is_refresh_stats_enabled && parallel_degree == other.parallel_degree && recompile == other.recompile end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 331 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
311 312 313 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 311 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
320 321 322 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 320 def hash [target_id, is_decrypt, is_rerun, re_run_from_step, tablespace, is_ignore_errors_enabled, seed, is_move_interim_tables_enabled, is_execute_saved_script_enabled, is_drop_temp_tables_enabled, is_redo_logging_enabled, is_refresh_stats_enabled, parallel_degree, recompile].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
364 365 366 367 368 369 370 371 372 373 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 364 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
358 359 360 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 358 def to_s to_hash.to_s end |