CreateMaskingPolicyDetails

class oci.data_safe.models.CreateMaskingPolicyDetails(**kwargs)

Bases: object

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.

Methods

__init__(**kwargs) Initializes a new CreateMaskingPolicyDetails object with values from keyword arguments.

Attributes

column_source [Required] Gets the column_source of this CreateMaskingPolicyDetails.
compartment_id [Required] Gets the compartment_id of this CreateMaskingPolicyDetails.
defined_tags Gets the defined_tags of this CreateMaskingPolicyDetails.
description Gets the description of this CreateMaskingPolicyDetails.
display_name Gets the display_name of this CreateMaskingPolicyDetails.
freeform_tags Gets the freeform_tags of this CreateMaskingPolicyDetails.
is_drop_temp_tables_enabled Gets the is_drop_temp_tables_enabled of this CreateMaskingPolicyDetails.
is_redo_logging_enabled Gets the is_redo_logging_enabled of this CreateMaskingPolicyDetails.
is_refresh_stats_enabled Gets the is_refresh_stats_enabled of this CreateMaskingPolicyDetails.
parallel_degree Gets the parallel_degree of this CreateMaskingPolicyDetails.
post_masking_script Gets the post_masking_script of this CreateMaskingPolicyDetails.
pre_masking_script Gets the pre_masking_script of this CreateMaskingPolicyDetails.
recompile Gets the recompile of this CreateMaskingPolicyDetails.
__init__(**kwargs)

Initializes a new CreateMaskingPolicyDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • display_name (str) – The value to assign to the display_name property of this CreateMaskingPolicyDetails.
  • compartment_id (str) – The value to assign to the compartment_id property of this CreateMaskingPolicyDetails.
  • description (str) – The value to assign to the description property of this CreateMaskingPolicyDetails.
  • is_drop_temp_tables_enabled (bool) – The value to assign to the is_drop_temp_tables_enabled property of this CreateMaskingPolicyDetails.
  • is_redo_logging_enabled (bool) – The value to assign to the is_redo_logging_enabled property of this CreateMaskingPolicyDetails.
  • is_refresh_stats_enabled (bool) – The value to assign to the is_refresh_stats_enabled property of this CreateMaskingPolicyDetails.
  • parallel_degree (str) – The value to assign to the parallel_degree property of this CreateMaskingPolicyDetails.
  • recompile (str) – The value to assign to the recompile property of this CreateMaskingPolicyDetails.
  • pre_masking_script (str) – The value to assign to the pre_masking_script property of this CreateMaskingPolicyDetails.
  • post_masking_script (str) – The value to assign to the post_masking_script property of this CreateMaskingPolicyDetails.
  • column_source (oci.data_safe.models.CreateColumnSourceDetails) – The value to assign to the column_source property of this CreateMaskingPolicyDetails.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this CreateMaskingPolicyDetails.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this CreateMaskingPolicyDetails.
column_source

[Required] Gets the column_source of this CreateMaskingPolicyDetails.

Returns:The column_source of this CreateMaskingPolicyDetails.
Return type:oci.data_safe.models.CreateColumnSourceDetails
compartment_id

[Required] Gets the compartment_id of this CreateMaskingPolicyDetails. The OCID of the compartment where the masking policy should be created.

Returns:The compartment_id of this CreateMaskingPolicyDetails.
Return type:str
defined_tags

Gets the defined_tags of this CreateMaskingPolicyDetails. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags

Example: {“Operations”: {“CostCenter”: “42”}}

Returns:The defined_tags of this CreateMaskingPolicyDetails.
Return type:dict(str, dict(str, object))
description

Gets the description of this CreateMaskingPolicyDetails. The description of the masking policy.

Returns:The description of this CreateMaskingPolicyDetails.
Return type:str
display_name

Gets the display_name of this CreateMaskingPolicyDetails. The display name of the masking policy. The name does not have to be unique, and it’s changeable.

Returns:The display_name of this CreateMaskingPolicyDetails.
Return type:str
freeform_tags

Gets the freeform_tags of this CreateMaskingPolicyDetails. 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”}

Returns:The freeform_tags of this CreateMaskingPolicyDetails.
Return type:dict(str, str)
is_drop_temp_tables_enabled

Gets the is_drop_temp_tables_enabled of this CreateMaskingPolicyDetails. 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.

Returns:The is_drop_temp_tables_enabled of this CreateMaskingPolicyDetails.
Return type:bool
is_redo_logging_enabled

Gets the is_redo_logging_enabled of this CreateMaskingPolicyDetails. 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.

Returns:The is_redo_logging_enabled of this CreateMaskingPolicyDetails.
Return type:bool
is_refresh_stats_enabled

Gets the is_refresh_stats_enabled of this CreateMaskingPolicyDetails. 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.

Returns:The is_refresh_stats_enabled of this CreateMaskingPolicyDetails.
Return type:bool
parallel_degree

Gets the parallel_degree of this CreateMaskingPolicyDetails. 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 CPUsi and improve masking performance. Refer to the Oracle Database parallel execution framework when choosing an explicit degree of parallelism.

Returns:The parallel_degree of this CreateMaskingPolicyDetails.
Return type:str
post_masking_script

Gets the post_masking_script of this CreateMaskingPolicyDetails. 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.

Returns:The post_masking_script of this CreateMaskingPolicyDetails.
Return type:str
pre_masking_script

Gets the pre_masking_script of this CreateMaskingPolicyDetails. 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.

Returns:The pre_masking_script of this CreateMaskingPolicyDetails.
Return type:str
recompile

Gets the recompile of this CreateMaskingPolicyDetails. 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.

Returns:The recompile of this CreateMaskingPolicyDetails.
Return type:str