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_credentials ⇒ OCI::DataSafe::Models::Credentials
-
#target_id ⇒ String
The OCID of the target database to be masked.
-
#user_defined_function_seed ⇒ String
The seed value to be used in case of User Defined Function masking format.
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
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 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 197 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.user_defined_function_seed = attributes[:'userDefinedFunctionSeed'] if attributes[:'userDefinedFunctionSeed'] raise 'You cannot provide both :userDefinedFunctionSeed and :user_defined_function_seed' if attributes.key?(:'userDefinedFunctionSeed') && attributes.key?(:'user_defined_function_seed') self.user_defined_function_seed = attributes[:'user_defined_function_seed'] if attributes[:'user_defined_function_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'] self.target_credentials = attributes[:'targetCredentials'] if attributes[:'targetCredentials'] raise 'You cannot provide both :targetCredentials and :target_credentials' if attributes.key?(:'targetCredentials') && attributes.key?(:'target_credentials') self.target_credentials = attributes[:'target_credentials'] if attributes[:'target_credentials'] 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.
88 89 90 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 88 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.
78 79 80 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 78 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.
71 72 73 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 71 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.
97 98 99 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 97 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.
104 105 106 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 104 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.
114 115 116 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 114 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.
122 123 124 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 122 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_credentials ⇒ OCI::DataSafe::Models::Credentials
125 126 127 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 125 def target_credentials @target_credentials 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 |
#user_defined_function_seed ⇒ String
The seed value to be used in case of User Defined Function masking format. This is an optional parameter and needs to be passed only if any User Defined Function uses seed.
65 66 67 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 65 def user_defined_function_seed @user_defined_function_seed end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 128 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', 'user_defined_function_seed': :'userDefinedFunctionSeed', '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', 'target_credentials': :'targetCredentials' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 152 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', 'user_defined_function_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', 'target_credentials': :'OCI::DataSafe::Models::Credentials' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 313 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 && user_defined_function_seed == other.user_defined_function_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 && target_credentials == other.target_credentials end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 358 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
338 339 340 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 338 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
347 348 349 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 347 def hash [target_id, is_decrypt, is_rerun, re_run_from_step, tablespace, is_ignore_errors_enabled, seed, user_defined_function_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, target_credentials].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
391 392 393 394 395 396 397 398 399 400 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 391 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
385 386 387 |
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 385 def to_s to_hash.to_s end |