Skip to main content

data_masking_rules

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

Overview

Namedata_masking_rules
TypeResource
Idazure.sql.data_masking_rules

Fields

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

Methods

NameAccessible byRequired ParamsDescription
list_by_databaseSELECTdataMaskingPolicyName, databaseName, resourceGroupName, serverName, subscriptionIdGets a list of database data masking rules.
create_or_updateINSERTdataMaskingPolicyName, dataMaskingRuleName, databaseName, resourceGroupName, serverName, subscriptionIdCreates or updates a database data masking rule.

SELECT examples

Gets a list of database data masking rules.

SELECT
kind,
location,
properties
FROM azure.sql.data_masking_rules
WHERE dataMaskingPolicyName = '{{ dataMaskingPolicyName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new data_masking_rules resource.

/*+ create */
INSERT INTO azure.sql.data_masking_rules (
dataMaskingPolicyName,
dataMaskingRuleName,
databaseName,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ dataMaskingPolicyName }}',
'{{ dataMaskingRuleName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;