data_masking_policies
Creates, updates, deletes, gets or lists a data_masking_policies
resource.
Overview
Name | data_masking_policies |
Type | Resource |
Id | azure.sql.data_masking_policies |
Fields
- vw_data_masking_policies
- data_masking_policies
Name | Datatype | Description |
---|---|---|
application_principals | text | field from the properties object |
dataMaskingPolicyName | text | field from the properties object |
data_masking_state | text | field from the properties object |
databaseName | text | field from the properties object |
exempt_principals | text | field from the properties object |
kind | text | The kind of data masking policy. Metadata, used for Azure portal. |
location | text | The location of the data masking policy. |
masking_level | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
kind | string | The kind of data masking policy. Metadata, used for Azure portal. |
location | string | The location of the data masking policy. |
properties | object | The properties of a database data masking policy. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | dataMaskingPolicyName, databaseName, resourceGroupName, serverName, subscriptionId | Gets a database data masking policy. |
create_or_update | INSERT | dataMaskingPolicyName, databaseName, resourceGroupName, serverName, subscriptionId | Creates or updates a database data masking policy |
SELECT
examples
Gets a database data masking policy.
- vw_data_masking_policies
- data_masking_policies
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 }}';
SELECT
kind,
location,
properties
FROM azure.sql.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.data_masking_policies (
dataMaskingPolicyName,
databaseName,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ dataMaskingPolicyName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: dataMaskingState
value: string
- name: exemptPrincipals
value: string
- name: applicationPrincipals
value: string
- name: maskingLevel
value: string
- name: location
value: string
- name: kind
value: string