DataMaskingRule Class
Represents a database data masking rule.
Variables are only populated by the server, and will be ignored when sending a request.
- Inheritance
-
azure.mgmt.sql.models._models_py3.ProxyResourceDataMaskingRule
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
Required
|
|
rule_state
Required
|
|
schema_name
Required
|
|
table_name
Required
|
|
column_name
Required
|
|
masking_function
Required
|
|
number_from
Required
|
|
number_to
Required
|
|
prefix_size
Required
|
|
suffix_size
Required
|
|
replacement_string
Required
|
|
Variables
Name | Description |
---|---|
id
|
Resource ID. |
name
|
Resource name. |
type
|
Resource type. |
location
|
The location of the data masking rule. |
kind
|
The kind of Data Masking Rule. Metadata, used for Azure portal. |
id_properties_id
|
The rule Id. |
Azure SDK for Python