Skip to main content

data_masking_policies

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

Overview

Namedata_masking_policies
TypeResource
Idazure.sql.data_masking_policies

Fields

NameDatatypeDescription
application_principalstextfield from the properties object
dataMaskingPolicyNametextfield from the properties object
data_masking_statetextfield from the properties object
databaseNametextfield from the properties object
exempt_principalstextfield from the properties object
kindtextThe kind of data masking policy. Metadata, used for Azure portal.
locationtextThe location of the data masking policy.
masking_leveltextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdataMaskingPolicyName, databaseName, resourceGroupName, serverName, subscriptionIdGets a database data masking policy.
create_or_updateINSERTdataMaskingPolicyName, databaseName, resourceGroupName, serverName, subscriptionIdCreates or updates a database data masking policy

SELECT examples

Gets a database data masking policy.

SELECT
application_principals,
dataMaskingPolicyName,
data_masking_state,
databaseName,
exempt_principals,
kind,
location,
masking_level,
resourceGroupName,
serverName,
subscriptionId
FROM azure.sql.vw_data_masking_policies
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_policies resource.

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