Microsoft.Sql servers/databases/dataMaskingPolicies/rules 2021-11-01

Bicep resource definition

The servers/databases/dataMaskingPolicies/rules resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Sql/servers/databases/dataMaskingPolicies/rules resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Sql/servers/databases/dataMaskingPolicies/rules@2021-11-01' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    aliasName: 'string'
    columnName: 'string'
    maskingFunction: 'string'
    numberFrom: 'string'
    numberTo: 'string'
    prefixSize: 'string'
    replacementString: 'string'
    ruleState: 'string'
    schemaName: 'string'
    suffixSize: 'string'
    tableName: 'string'
  }
}

Property values

servers/databases/dataMaskingPolicies/rules

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: dataMaskingPolicies
properties Resource properties. DataMaskingRuleProperties

DataMaskingRuleProperties

Name Description Value
aliasName The alias name. This is a legacy parameter and is no longer used. string
columnName The column name on which the data masking rule is applied. string (required)
maskingFunction The masking function that is used for the data masking rule. 'CCN'
'Default'
'Email'
'Number'
'SSN'
'Text' (required)
numberFrom The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. string
numberTo The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. string
prefixSize If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored. string
replacementString If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. string
ruleState The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. 'Disabled'
'Enabled'
schemaName The schema name on which the data masking rule is applied. string (required)
suffixSize If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored. string
tableName The table name on which the data masking rule is applied. string (required)

ARM template resource definition

The servers/databases/dataMaskingPolicies/rules resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Sql/servers/databases/dataMaskingPolicies/rules resource, add the following JSON to your template.

{
  "type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules",
  "apiVersion": "2021-11-01",
  "name": "string",
  "properties": {
    "aliasName": "string",
    "columnName": "string",
    "maskingFunction": "string",
    "numberFrom": "string",
    "numberTo": "string",
    "prefixSize": "string",
    "replacementString": "string",
    "ruleState": "string",
    "schemaName": "string",
    "suffixSize": "string",
    "tableName": "string"
  }
}

Property values

servers/databases/dataMaskingPolicies/rules

Name Description Value
type The resource type 'Microsoft.Sql/servers/databases/dataMaskingPolicies/rules'
apiVersion The resource api version '2021-11-01'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
string (required)
properties Resource properties. DataMaskingRuleProperties

DataMaskingRuleProperties

Name Description Value
aliasName The alias name. This is a legacy parameter and is no longer used. string
columnName The column name on which the data masking rule is applied. string (required)
maskingFunction The masking function that is used for the data masking rule. 'CCN'
'Default'
'Email'
'Number'
'SSN'
'Text' (required)
numberFrom The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. string
numberTo The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. string
prefixSize If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored. string
replacementString If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. string
ruleState The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. 'Disabled'
'Enabled'
schemaName The schema name on which the data masking rule is applied. string (required)
suffixSize If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored. string
tableName The table name on which the data masking rule is applied. string (required)

Terraform (AzAPI provider) resource definition

The servers/databases/dataMaskingPolicies/rules resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Sql/servers/databases/dataMaskingPolicies/rules resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules@2021-11-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      aliasName = "string"
      columnName = "string"
      maskingFunction = "string"
      numberFrom = "string"
      numberTo = "string"
      prefixSize = "string"
      replacementString = "string"
      ruleState = "string"
      schemaName = "string"
      suffixSize = "string"
      tableName = "string"
    }
  })
}

Property values

servers/databases/dataMaskingPolicies/rules

Name Description Value
type The resource type "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules@2021-11-01"
name The resource name string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: dataMaskingPolicies
properties Resource properties. DataMaskingRuleProperties

DataMaskingRuleProperties

Name Description Value
aliasName The alias name. This is a legacy parameter and is no longer used. string
columnName The column name on which the data masking rule is applied. string (required)
maskingFunction The masking function that is used for the data masking rule. "CCN"
"Default"
"Email"
"Number"
"SSN"
"Text" (required)
numberFrom The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. string
numberTo The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. string
prefixSize If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored. string
replacementString If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. string
ruleState The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. "Disabled"
"Enabled"
schemaName The schema name on which the data masking rule is applied. string (required)
suffixSize If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored. string
tableName The table name on which the data masking rule is applied. string (required)