data_masking_rules
Creates, updates, deletes, gets or lists a data_masking_rules resource.
Overview
| Name | data_masking_rules |
| Type | Resource |
| Id | azure.synapse.data_masking_rules |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_sql_pool
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
aliasName | string | The alias name. This is a legacy parameter and is no longer used. |
columnName | string | The column name on which the data masking rule is applied. |
kind | string | The kind of Data Masking Rule. Metadata, used for Azure portal. |
location | string | The location of the data masking rule. |
maskingFunction | string | The masking function that is used for the data masking rule. Known values are: "Default", "CCN", "Email", "Number", "SSN", and "Text". |
numberFrom | string | The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. |
numberTo | string | The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. |
prefixSize | string | 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. |
replacementString | string | If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. |
ruleState | string | 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. Known values are: "Disabled" and "Enabled". |
schemaName | string | The schema name on which the data masking rule is applied. |
suffixSize | string | 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. |
tableName | string | The table name on which the data masking rule is applied. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
aliasName | string | The alias name. This is a legacy parameter and is no longer used. |
columnName | string | The column name on which the data masking rule is applied. |
kind | string | The kind of Data Masking Rule. Metadata, used for Azure portal. |
location | string | The location of the data masking rule. |
maskingFunction | string | The masking function that is used for the data masking rule. Known values are: "Default", "CCN", "Email", "Number", "SSN", and "Text". |
numberFrom | string | The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. |
numberTo | string | The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. |
prefixSize | string | 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. |
replacementString | string | If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. |
ruleState | string | 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. Known values are: "Disabled" and "Enabled". |
schemaName | string | The schema name on which the data masking rule is applied. |
suffixSize | string | 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. |
tableName | string | The table name on which the data masking rule is applied. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, workspace_name, sql_pool_name, data_masking_rule_name, subscription_id | Gets the specific Sql pool data masking rule. | |
list_by_sql_pool | select | resource_group_name, workspace_name, sql_pool_name, subscription_id | Gets a list of Sql pool data masking rules. | |
create_or_update | insert | resource_group_name, workspace_name, sql_pool_name, data_masking_rule_name, subscription_id | Creates or updates a Sql pool data masking rule. | |
create_or_update | replace | resource_group_name, workspace_name, sql_pool_name, data_masking_rule_name, subscription_id | Creates or updates a Sql pool data masking rule. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
data_masking_rule_name | string | The name of the data masking rule. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
sql_pool_name | string | SQL pool name. Required. |
subscription_id | string | |
workspace_name | string | The name of the workspace. Required. |
SELECT examples
- get
- list_by_sql_pool
Gets the specific Sql pool data masking rule.
SELECT
id,
name,
aliasName,
columnName,
kind,
location,
maskingFunction,
numberFrom,
numberTo,
prefixSize,
replacementString,
ruleState,
schemaName,
suffixSize,
tableName,
type
FROM azure.synapse.data_masking_rules
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND sql_pool_name = '{{ sql_pool_name }}' -- required
AND data_masking_rule_name = '{{ data_masking_rule_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets a list of Sql pool data masking rules.
SELECT
id,
name,
aliasName,
columnName,
kind,
location,
maskingFunction,
numberFrom,
numberTo,
prefixSize,
replacementString,
ruleState,
schemaName,
suffixSize,
tableName,
type
FROM azure.synapse.data_masking_rules
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND sql_pool_name = '{{ sql_pool_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a Sql pool data masking rule.
INSERT INTO azure.synapse.data_masking_rules (
properties,
resource_group_name,
workspace_name,
sql_pool_name,
data_masking_rule_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ workspace_name }}',
'{{ sql_pool_name }}',
'{{ data_masking_rule_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
kind,
location,
properties,
type
;
# Description fields are for documentation purposes
- name: data_masking_rules
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the data_masking_rules resource.
- name: workspace_name
value: "{{ workspace_name }}"
description: Required parameter for the data_masking_rules resource.
- name: sql_pool_name
value: "{{ sql_pool_name }}"
description: Required parameter for the data_masking_rules resource.
- name: data_masking_rule_name
value: "{{ data_masking_rule_name }}"
description: Required parameter for the data_masking_rules resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the data_masking_rules resource.
- name: properties
value:
aliasName: "{{ aliasName }}"
ruleState: "{{ ruleState }}"
schemaName: "{{ schemaName }}"
tableName: "{{ tableName }}"
columnName: "{{ columnName }}"
maskingFunction: "{{ maskingFunction }}"
numberFrom: "{{ numberFrom }}"
numberTo: "{{ numberTo }}"
prefixSize: "{{ prefixSize }}"
suffixSize: "{{ suffixSize }}"
replacementString: "{{ replacementString }}"
REPLACE examples
- create_or_update
Creates or updates a Sql pool data masking rule.
REPLACE azure.synapse.data_masking_rules
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND sql_pool_name = '{{ sql_pool_name }}' --required
AND data_masking_rule_name = '{{ data_masking_rule_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
kind,
location,
properties,
type;