Data Masking Rules - Get

Gets the specific Sql pool data masking rule.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/Default/rules/{dataMaskingRuleName}?api-version=2021-06-01

URI Parameters

Name In Required Type Description
dataMaskingPolicyName
path True

DataMaskingPolicyName

The name of the data masking policy for which the masking rule applies.

dataMaskingRuleName
path True

string

The name of the data masking rule.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

sqlPoolName
path True

string

SQL pool name

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

workspaceName
path True

string

The name of the workspace.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

DataMaskingRule

OK

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

Get data masking rule

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-2080/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default/rules/rule1?api-version=2021-06-01

Sample response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Synapse/workspaces/sqlcrudtest-6852/sqlPools/sqlcrudtest-331/dataMaskingPolicies/Default/rules/",
  "name": "rule1",
  "type": "Microsoft.Synapse/workspaces/sqlPools/dataMaskingPolicies/rules",
  "location": "Central US",
  "kind": null,
  "properties": {
    "id": "dbo_Table_1_test1",
    "ruleState": "Enabled",
    "schemaName": "dbo",
    "tableName": "Table_1",
    "columnName": "test1",
    "aliasName": null,
    "maskingFunction": "Text",
    "numberFrom": null,
    "numberTo": null,
    "prefixSize": "1",
    "suffixSize": "0",
    "replacementString": "asdf"
  }
}

Definitions

Name Description
DataMaskingFunction

The masking function that is used for the data masking rule.

DataMaskingPolicyName

The name of the data masking policy for which the masking rule applies.

DataMaskingRule

Represents a Sql pool data masking rule.

DataMaskingRuleState

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.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

DataMaskingFunction

The masking function that is used for the data masking rule.

Value Description
Default
CCN
Email
Number
SSN
Text

DataMaskingPolicyName

The name of the data masking policy for which the masking rule applies.

Value Description
Default

DataMaskingRule

Represents a Sql pool data masking rule.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

kind

string

The kind of Data Masking Rule. Metadata, used for Azure portal.

location

string

The location of the data masking rule.

name

string

The name of the resource

properties.aliasName

string

The alias name. This is a legacy parameter and is no longer used.

properties.columnName

string

The column name on which the data masking rule is applied.

properties.id

string

The rule Id.

properties.maskingFunction

DataMaskingFunction

The masking function that is used for the data masking rule.

properties.numberFrom

string

The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.

properties.numberTo

string

The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored.

properties.prefixSize

string

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.

properties.replacementString

string

If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored.

properties.ruleState

DataMaskingRuleState

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.

properties.schemaName

string

The schema name on which the data masking rule is applied.

properties.suffixSize

string

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.

properties.tableName

string

The table name on which the data masking rule is applied.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

DataMaskingRuleState

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.

Value Description
Disabled
Enabled

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.