DataMaskingRule Class
Represents a database data masking rule.
Variables are only populated by the server, and will be ignored when sending a request.
Constructor
DataMaskingRule(*, alias_name: str | None = None, rule_state: str | DataMaskingRuleState | None = None, schema_name: str | None = None, table_name: str | None = None, column_name: str | None = None, masking_function: str | DataMaskingFunction | None = None, number_from: str | None = None, number_to: str | None = None, prefix_size: str | None = None, suffix_size: str | None = None, replacement_string: str | None = None, **kwargs)
Parameters
Name | Description |
---|---|
alias_name
Required
|
The alias name. This is a legacy parameter and is no longer used. |
rule_state
Required
|
The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. Possible values include: "Disabled", "Enabled". |
schema_name
Required
|
The schema name on which the data masking rule is applied. |
table_name
Required
|
The table name on which the data masking rule is applied. |
column_name
Required
|
The column name on which the data masking rule is applied. |
masking_function
Required
|
The masking function that is used for the data masking rule. Possible values include: "Default", "CCN", "Email", "Number", "SSN", "Text". |
number_from
Required
|
The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. |
number_to
Required
|
The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. |
prefix_size
Required
|
If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored. |
suffix_size
Required
|
If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored. |
replacement_string
Required
|
If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. |
Keyword-Only Parameters
Name | Description |
---|---|
alias_name
|
Default value: None
|
rule_state
|
Default value: None
|
schema_name
|
Default value: None
|
table_name
|
Default value: None
|
column_name
|
Default value: None
|
masking_function
|
Default value: None
|
number_from
|
Default value: None
|
number_to
|
Default value: None
|
prefix_size
|
Default value: None
|
suffix_size
|
Default value: None
|
replacement_string
|
Default value: None
|