data_masking_rules
Creates, updates, deletes, gets or lists a data_masking_rules
resource.
Overview
Name | data_masking_rules |
Type | Resource |
Id | azure.sql.data_masking_rules |
Fields
Name | Datatype | Description |
---|---|---|
kind | string | The kind of Data Masking Rule. Metadata, used for Azure portal. |
location | string | The location of the data masking rule. |
properties | object | The properties of a database data masking rule. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list_by_database | SELECT | dataMaskingPolicyName, databaseName, resourceGroupName, serverName, subscriptionId | Gets a list of database data masking rules. |
create_or_update | INSERT | dataMaskingPolicyName, dataMaskingRuleName, databaseName, resourceGroupName, serverName, subscriptionId | Creates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.data_masking_rules (
dataMaskingPolicyName,
dataMaskingRuleName,
databaseName,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ dataMaskingPolicyName }}',
'{{ dataMaskingRuleName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: id
value: string
- name: aliasName
value: string
- name: ruleState
value: string
- name: schemaName
value: string
- name: tableName
value: string
- name: columnName
value: string
- name: maskingFunction
value: string
- name: numberFrom
value: string
- name: numberTo
value: string
- name: prefixSize
value: string
- name: suffixSize
value: string
- name: replacementString
value: string
- name: location
value: string
- name: kind
value: string