Class: OCI::DataSafe::Models::CreateMaskingPolicyDetails
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::CreateMaskingPolicyDetails
- Defined in:
- lib/oci/data_safe/models/create_masking_policy_details.rb
Overview
Details to create a new masking policy. Use either a sensitive data model or a reference target database to create your masking policy.
To use a sensitive data model as the source of masking columns, set the columnSource attribute to SENSITIVE_DATA_MODEL and provide the sensitiveDataModelId attribute. After creating a masking policy, you can use the AddMaskingColumnsFromSdm operation to automatically add all the columns from the associated sensitive data model. In this case, the target database associated with the sensitive data model is used for column and masking format validations.
You can also create a masking policy without using a sensitive data model. In this case, you need to associate your masking policy with a target database by setting the columnSource attribute to TARGET and providing the targetId attribute. The specified target database is used for column and masking format validations.
After creating a masking policy, you can use the CreateMaskingColumn or PatchMaskingColumns operation to manually add columns to the policy. You need to add the parent columns only, and it automatically adds the child columns (in referential relationship with the parent columns) from the associated sensitive data model or target database.
Instance Attribute Summary collapse
-
#column_source ⇒ OCI::DataSafe::Models::CreateColumnSourceDetails
This attribute is required.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment where the masking policy should be created.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
The description of the masking policy.
-
#display_name ⇒ String
The display name of the masking policy.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#is_drop_temp_tables_enabled ⇒ BOOLEAN
Indicates if the temporary tables created during a masking operation should be dropped after masking.
-
#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.
-
#parallel_degree ⇒ String
Specifies options to enable parallel execution when running data masking.
-
#post_masking_script ⇒ String
A post-masking script, which can contain SQL and PL/SQL statements.
-
#pre_masking_script ⇒ String
A pre-masking script, which can contain SQL and PL/SQL statements.
-
#recompile ⇒ String
Specifies how to recompile invalid objects post data masking.
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 = {}) ⇒ CreateMaskingPolicyDetails
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 = {}) ⇒ CreateMaskingPolicyDetails
Initializes the object
172 173 174 175 176 177 178 179 180 181 182 183 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 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 172 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.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.description = attributes[:'description'] if attributes[:'description'] self.is_drop_temp_tables_enabled = attributes[:'isDropTempTablesEnabled'] unless attributes[:'isDropTempTablesEnabled'].nil? self.is_drop_temp_tables_enabled = true if is_drop_temp_tables_enabled.nil? && !attributes.key?(:'isDropTempTablesEnabled') # rubocop:disable Style/StringLiterals 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_drop_temp_tables_enabled = true if is_drop_temp_tables_enabled.nil? && !attributes.key?(:'isDropTempTablesEnabled') && !attributes.key?(:'is_drop_temp_tables_enabled') # rubocop:disable Style/StringLiterals self.is_redo_logging_enabled = attributes[:'isRedoLoggingEnabled'] unless attributes[:'isRedoLoggingEnabled'].nil? self.is_redo_logging_enabled = false if is_redo_logging_enabled.nil? && !attributes.key?(:'isRedoLoggingEnabled') # rubocop:disable Style/StringLiterals 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_redo_logging_enabled = false if is_redo_logging_enabled.nil? && !attributes.key?(:'isRedoLoggingEnabled') && !attributes.key?(:'is_redo_logging_enabled') # rubocop:disable Style/StringLiterals self.is_refresh_stats_enabled = attributes[:'isRefreshStatsEnabled'] unless attributes[:'isRefreshStatsEnabled'].nil? self.is_refresh_stats_enabled = true if is_refresh_stats_enabled.nil? && !attributes.key?(:'isRefreshStatsEnabled') # rubocop:disable Style/StringLiterals 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.is_refresh_stats_enabled = true if is_refresh_stats_enabled.nil? && !attributes.key?(:'isRefreshStatsEnabled') && !attributes.key?(:'is_refresh_stats_enabled') # rubocop:disable Style/StringLiterals self.parallel_degree = attributes[:'parallelDegree'] if attributes[:'parallelDegree'] self.parallel_degree = "DEFAULT" if parallel_degree.nil? && !attributes.key?(:'parallelDegree') # rubocop:disable Style/StringLiterals 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.parallel_degree = "DEFAULT" if parallel_degree.nil? && !attributes.key?(:'parallelDegree') && !attributes.key?(:'parallel_degree') # rubocop:disable Style/StringLiterals self.recompile = attributes[:'recompile'] if attributes[:'recompile'] self.recompile = "NONE" if recompile.nil? && !attributes.key?(:'recompile') # rubocop:disable Style/StringLiterals self.pre_masking_script = attributes[:'preMaskingScript'] if attributes[:'preMaskingScript'] raise 'You cannot provide both :preMaskingScript and :pre_masking_script' if attributes.key?(:'preMaskingScript') && attributes.key?(:'pre_masking_script') self.pre_masking_script = attributes[:'pre_masking_script'] if attributes[:'pre_masking_script'] self.post_masking_script = attributes[:'postMaskingScript'] if attributes[:'postMaskingScript'] raise 'You cannot provide both :postMaskingScript and :post_masking_script' if attributes.key?(:'postMaskingScript') && attributes.key?(:'post_masking_script') self.post_masking_script = attributes[:'post_masking_script'] if attributes[:'post_masking_script'] self.column_source = attributes[:'columnSource'] if attributes[:'columnSource'] raise 'You cannot provide both :columnSource and :column_source' if attributes.key?(:'columnSource') && attributes.key?(:'column_source') self.column_source = attributes[:'column_source'] if attributes[:'column_source'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#column_source ⇒ OCI::DataSafe::Models::CreateColumnSourceDetails
This attribute is required.
95 96 97 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 95 def column_source @column_source end |
#compartment_id ⇒ String
[Required] The OCID of the compartment where the masking policy should be created.
35 36 37 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 35 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
109 110 111 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 109 def @defined_tags end |
#description ⇒ String
The description of the masking policy.
39 40 41 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 39 def description @description end |
#display_name ⇒ String
The display name of the masking policy. The name does not have to be unique, and it's changeable.
31 32 33 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 31 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags
Example: {\"Department\": \"Finance\"}
102 103 104 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 102 def @freeform_tags end |
#is_drop_temp_tables_enabled ⇒ BOOLEAN
Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive data values to mask values. By default, these temporary tables are dropped after masking. 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.
48 49 50 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 48 def is_drop_temp_tables_enabled @is_drop_temp_tables_enabled end |
#is_redo_logging_enabled ⇒ BOOLEAN
Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to enable redo logging. By default, 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.
56 57 58 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 56 def is_redo_logging_enabled @is_redo_logging_enabled end |
#is_refresh_stats_enabled ⇒ BOOLEAN
Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics gathering. The masking process gathers statistics on masked database tables after masking completes.
62 63 64 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 62 def is_refresh_stats_enabled @is_refresh_stats_enabled 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.
70 71 72 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 70 def parallel_degree @parallel_degree end |
#post_masking_script ⇒ String
A post-masking script, which can contain SQL and PL/SQL statements. It's executed after the core masking script generated using the masking policy. It's usually used to perform additional transformation or cleanup work after masking.
91 92 93 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 91 def post_masking_script @post_masking_script end |
#pre_masking_script ⇒ String
A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before the core masking script generated using the masking policy. It's usually used to perform any preparation or prerequisite work before masking data.
84 85 86 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 84 def pre_masking_script @pre_masking_script 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.
77 78 79 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 77 def recompile @recompile end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 112 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'description': :'description', 'is_drop_temp_tables_enabled': :'isDropTempTablesEnabled', 'is_redo_logging_enabled': :'isRedoLoggingEnabled', 'is_refresh_stats_enabled': :'isRefreshStatsEnabled', 'parallel_degree': :'parallelDegree', 'recompile': :'recompile', 'pre_masking_script': :'preMaskingScript', 'post_masking_script': :'postMaskingScript', 'column_source': :'columnSource', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 133 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'compartment_id': :'String', 'description': :'String', 'is_drop_temp_tables_enabled': :'BOOLEAN', 'is_redo_logging_enabled': :'BOOLEAN', 'is_refresh_stats_enabled': :'BOOLEAN', 'parallel_degree': :'String', 'recompile': :'String', 'pre_masking_script': :'String', 'post_masking_script': :'String', 'column_source': :'OCI::DataSafe::Models::CreateColumnSourceDetails', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 265 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && compartment_id == other.compartment_id && description == other.description && 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 && pre_masking_script == other.pre_masking_script && post_masking_script == other.post_masking_script && column_source == other.column_source && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 307 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
287 288 289 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 287 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
296 297 298 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 296 def hash [display_name, compartment_id, description, is_drop_temp_tables_enabled, is_redo_logging_enabled, is_refresh_stats_enabled, parallel_degree, recompile, pre_masking_script, post_masking_script, column_source, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
340 341 342 343 344 345 346 347 348 349 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 340 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
334 335 336 |
# File 'lib/oci/data_safe/models/create_masking_policy_details.rb', line 334 def to_s to_hash.to_s end |