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.ProxyResource
DataMaskingRule

Constructor

DataMaskingRule(*, alias_name: Optional[str] = None, rule_state: Optional[Union[str, azure.mgmt.sql.models._sql_management_client_enums.DataMaskingRuleState]] = None, schema_name: Optional[str] = None, table_name: Optional[str] = None, column_name: Optional[str] = None, masking_function: Optional[Union[str, azure.mgmt.sql.models._sql_management_client_enums.DataMaskingFunction]] = None, number_from: Optional[str] = None, number_to: Optional[str] = None, prefix_size: Optional[str] = None, suffix_size: Optional[str] = None, replacement_string: Optional[str] = None, **kwargs)

Parameters

alias_name
str
Required

The alias name. This is a legacy parameter and is no longer used.

rule_state
str or DataMaskingRuleState
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
str
Required

The schema name on which the data masking rule is applied.

table_name
str
Required

The table name on which the data masking rule is applied.

column_name
str
Required

The column name on which the data masking rule is applied.

masking_function
str or DataMaskingFunction
Required

The masking function that is used for the data masking rule. Possible values include: "Default", "CCN", "Email", "Number", "SSN", "Text".

number_from
str
Required

The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.

number_to
str
Required

The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.

prefix_size
str
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
str
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
str
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.

Variables

id
str

Resource ID.

name
str

Resource name.

type
str

Resource type.

location
str

The location of the data masking rule.

kind
str

The kind of Data Masking Rule. Metadata, used for Azure portal.

id_properties_id
str

The rule Id.