MaskingPolicy

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

Bases: object

A masking policy defines the approach to mask data in a target database. It’s basically a collection of columns to be masked, called masking columns, and the associated masking formats to be used to mask these columns. A masking policy can be used to mask multiple databases provided that they have the same schema design. For more information, see <a href=”https://docs.oracle.com/en/cloud/paas/data-safe/udscs/masking-policies.html”>Masking Policies </a> in the Oracle Data Safe documentation.

Attributes

LIFECYCLE_STATE_ACTIVE A constant which can be used with the lifecycle_state property of a MaskingPolicy.
LIFECYCLE_STATE_CREATING A constant which can be used with the lifecycle_state property of a MaskingPolicy.
LIFECYCLE_STATE_DELETED A constant which can be used with the lifecycle_state property of a MaskingPolicy.
LIFECYCLE_STATE_DELETING A constant which can be used with the lifecycle_state property of a MaskingPolicy.
LIFECYCLE_STATE_FAILED A constant which can be used with the lifecycle_state property of a MaskingPolicy.
LIFECYCLE_STATE_NEEDS_ATTENTION A constant which can be used with the lifecycle_state property of a MaskingPolicy.
LIFECYCLE_STATE_UPDATING A constant which can be used with the lifecycle_state property of a MaskingPolicy.
RECOMPILE_NONE A constant which can be used with the recompile property of a MaskingPolicy.
RECOMPILE_PARALLEL A constant which can be used with the recompile property of a MaskingPolicy.
RECOMPILE_SERIAL A constant which can be used with the recompile property of a MaskingPolicy.
column_source Gets the column_source of this MaskingPolicy.
compartment_id [Required] Gets the compartment_id of this MaskingPolicy.
defined_tags Gets the defined_tags of this MaskingPolicy.
description Gets the description of this MaskingPolicy.
display_name [Required] Gets the display_name of this MaskingPolicy.
freeform_tags Gets the freeform_tags of this MaskingPolicy.
id [Required] Gets the id of this MaskingPolicy.
is_drop_temp_tables_enabled [Required] Gets the is_drop_temp_tables_enabled of this MaskingPolicy.
is_redo_logging_enabled [Required] Gets the is_redo_logging_enabled of this MaskingPolicy.
is_refresh_stats_enabled [Required] Gets the is_refresh_stats_enabled of this MaskingPolicy.
lifecycle_state [Required] Gets the lifecycle_state of this MaskingPolicy.
parallel_degree [Required] Gets the parallel_degree of this MaskingPolicy.
post_masking_script Gets the post_masking_script of this MaskingPolicy.
pre_masking_script Gets the pre_masking_script of this MaskingPolicy.
recompile [Required] Gets the recompile of this MaskingPolicy.
time_created [Required] Gets the time_created of this MaskingPolicy.
time_updated [Required] Gets the time_updated of this MaskingPolicy.

Methods

__init__(**kwargs) Initializes a new MaskingPolicy object with values from keyword arguments.
LIFECYCLE_STATE_ACTIVE = 'ACTIVE'

A constant which can be used with the lifecycle_state property of a MaskingPolicy. This constant has a value of “ACTIVE”

LIFECYCLE_STATE_CREATING = 'CREATING'

A constant which can be used with the lifecycle_state property of a MaskingPolicy. This constant has a value of “CREATING”

LIFECYCLE_STATE_DELETED = 'DELETED'

A constant which can be used with the lifecycle_state property of a MaskingPolicy. This constant has a value of “DELETED”

LIFECYCLE_STATE_DELETING = 'DELETING'

A constant which can be used with the lifecycle_state property of a MaskingPolicy. This constant has a value of “DELETING”

LIFECYCLE_STATE_FAILED = 'FAILED'

A constant which can be used with the lifecycle_state property of a MaskingPolicy. This constant has a value of “FAILED”

LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'

A constant which can be used with the lifecycle_state property of a MaskingPolicy. This constant has a value of “NEEDS_ATTENTION”

LIFECYCLE_STATE_UPDATING = 'UPDATING'

A constant which can be used with the lifecycle_state property of a MaskingPolicy. This constant has a value of “UPDATING”

RECOMPILE_NONE = 'NONE'

A constant which can be used with the recompile property of a MaskingPolicy. This constant has a value of “NONE”

RECOMPILE_PARALLEL = 'PARALLEL'

A constant which can be used with the recompile property of a MaskingPolicy. This constant has a value of “PARALLEL”

RECOMPILE_SERIAL = 'SERIAL'

A constant which can be used with the recompile property of a MaskingPolicy. This constant has a value of “SERIAL”

__init__(**kwargs)

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

Parameters:
  • id (str) – The value to assign to the id property of this MaskingPolicy.
  • compartment_id (str) – The value to assign to the compartment_id property of this MaskingPolicy.
  • display_name (str) – The value to assign to the display_name property of this MaskingPolicy.
  • time_created (datetime) – The value to assign to the time_created property of this MaskingPolicy.
  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this MaskingPolicy. Allowed values for this property are: “CREATING”, “ACTIVE”, “UPDATING”, “DELETING”, “DELETED”, “NEEDS_ATTENTION”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • time_updated (datetime) – The value to assign to the time_updated property of this MaskingPolicy.
  • description (str) – The value to assign to the description property of this MaskingPolicy.
  • is_drop_temp_tables_enabled (bool) – The value to assign to the is_drop_temp_tables_enabled property of this MaskingPolicy.
  • is_redo_logging_enabled (bool) – The value to assign to the is_redo_logging_enabled property of this MaskingPolicy.
  • is_refresh_stats_enabled (bool) – The value to assign to the is_refresh_stats_enabled property of this MaskingPolicy.
  • parallel_degree (str) – The value to assign to the parallel_degree property of this MaskingPolicy.
  • recompile (str) – The value to assign to the recompile property of this MaskingPolicy. Allowed values for this property are: “SERIAL”, “PARALLEL”, “NONE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • pre_masking_script (str) – The value to assign to the pre_masking_script property of this MaskingPolicy.
  • post_masking_script (str) – The value to assign to the post_masking_script property of this MaskingPolicy.
  • column_source (oci.data_safe.models.ColumnSourceDetails) – The value to assign to the column_source property of this MaskingPolicy.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this MaskingPolicy.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this MaskingPolicy.
column_source

Gets the column_source of this MaskingPolicy.

Returns:The column_source of this MaskingPolicy.
Return type:oci.data_safe.models.ColumnSourceDetails
compartment_id

[Required] Gets the compartment_id of this MaskingPolicy. The OCID of the compartment that contains the masking policy.

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

Gets the defined_tags of this MaskingPolicy. 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 MaskingPolicy.
Return type:dict(str, dict(str, object))
description

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

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

[Required] Gets the display_name of this MaskingPolicy. The display name of the masking policy.

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

Gets the freeform_tags of this MaskingPolicy. 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 MaskingPolicy.
Return type:dict(str, str)
id

[Required] Gets the id of this MaskingPolicy. The OCID of the masking policy.

Returns:The id of this MaskingPolicy.
Return type:str
is_drop_temp_tables_enabled

[Required] Gets the is_drop_temp_tables_enabled of this MaskingPolicy. 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 MaskingPolicy.
Return type:bool
is_redo_logging_enabled

[Required] Gets the is_redo_logging_enabled of this MaskingPolicy. 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 MaskingPolicy.
Return type:bool
is_refresh_stats_enabled

[Required] Gets the is_refresh_stats_enabled of this MaskingPolicy. 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 MaskingPolicy.
Return type:bool
lifecycle_state

[Required] Gets the lifecycle_state of this MaskingPolicy. The current state of the masking policy.

Allowed values for this property are: “CREATING”, “ACTIVE”, “UPDATING”, “DELETING”, “DELETED”, “NEEDS_ATTENTION”, “FAILED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The lifecycle_state of this MaskingPolicy.
Return type:str
parallel_degree

[Required] Gets the parallel_degree of this MaskingPolicy. 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.

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

Gets the post_masking_script of this MaskingPolicy. 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 MaskingPolicy.
Return type:str
pre_masking_script

Gets the pre_masking_script of this MaskingPolicy. 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 MaskingPolicy.
Return type:str
recompile

[Required] Gets the recompile of this MaskingPolicy. 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.

Allowed values for this property are: “SERIAL”, “PARALLEL”, “NONE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The recompile of this MaskingPolicy.
Return type:str
time_created

[Required] Gets the time_created of this MaskingPolicy. The date and time the masking policy was created, in the format defined by RFC3339.

Returns:The time_created of this MaskingPolicy.
Return type:datetime
time_updated

[Required] Gets the time_updated of this MaskingPolicy. The date and time the masking policy was last updated, in the format defined by RFC3339

Returns:The time_updated of this MaskingPolicy.
Return type:datetime