Skip to main content

data_masking_rules

Creates, updates, deletes, gets or lists a data_masking_rules resource.

Overview

Namedata_masking_rules
TypeResource
Idazure.synapse.data_masking_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
kindstringThe kind of Data Masking Rule. Metadata, used for Azure portal.
locationstringThe location of the data masking rule.
propertiesobjectThe properties of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, workspaceName, sqlPoolName, dataMaskingPolicyName, dataMaskingRuleNameGets the specific Sql pool data masking rule.
list_by_sql_poolselectsubscriptionId, resourceGroupName, workspaceName, sqlPoolName, dataMaskingPolicyNameGets a list of Sql pool data masking rules.
create_or_updateinsertsubscriptionId, resourceGroupName, workspaceName, sqlPoolName, dataMaskingPolicyName, dataMaskingRuleNameCreates 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.

NameDatatypeDescription
dataMaskingPolicyNamestringThe name of the data masking policy for which the masking rule applies.
dataMaskingRuleNamestringThe name of the data masking rule.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
sqlPoolNamestringSQL pool name
subscriptionIdstringThe ID of the target subscription.
workspaceNamestringThe name of the workspace.

SELECT examples

Gets the specific Sql pool data masking rule.

SELECT
kind,
location,
properties
FROM azure.synapse.data_masking_rules
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND workspaceName = '{{ workspaceName }}' -- required
AND sqlPoolName = '{{ sqlPoolName }}' -- required
AND dataMaskingPolicyName = '{{ dataMaskingPolicyName }}' -- required
AND dataMaskingRuleName = '{{ dataMaskingRuleName }}' -- required
;

INSERT examples

Creates or updates a Sql pool data masking rule.

INSERT INTO azure.synapse.data_masking_rules (
data__properties,
subscriptionId,
resourceGroupName,
workspaceName,
sqlPoolName,
dataMaskingPolicyName,
dataMaskingRuleName
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ workspaceName }}',
'{{ sqlPoolName }}',
'{{ dataMaskingPolicyName }}',
'{{ dataMaskingRuleName }}'
RETURNING
kind,
location,
properties
;