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

The following fields are returned by SELECT queries:

NameDatatypeDescription
kindstringThe kind of data masking policy. Metadata, used for Azure portal.
locationstringThe location of the data masking policy.
propertiesobjectThe properties of the data masking policy.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, serverName, databaseName, dataMaskingPolicyNameGets a database data masking policy.
create_or_updateinsertsubscriptionId, resourceGroupName, serverName, databaseName, dataMaskingPolicyNameCreates or updates a database data masking policy

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 database for which the data masking rule applies.
databaseNamestringThe name of the database.
resourceGroupNamestringThe name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverNamestringThe name of the server.
subscriptionIdstringThe subscription ID that identifies an Azure subscription.

SELECT examples

Gets a database data masking policy.

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

INSERT examples

Creates or updates a database data masking policy

INSERT INTO azure.sql.data_masking_policies (
data__properties,
subscriptionId,
resourceGroupName,
serverName,
databaseName,
dataMaskingPolicyName
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ databaseName }}',
'{{ dataMaskingPolicyName }}'
RETURNING
kind,
location,
properties
;