Creates a data masking rule for a database.
Syntax Default (Default)New-AzSqlDatabaseDataMaskingRule
-MaskingFunction <String>
[-PrefixSize <UInt32>]
[-ReplacementString <String>]
[-SuffixSize <UInt32>]
[-NumberFrom <Double>]
[-NumberTo <Double>]
[-PassThru]
-SchemaName <String>
-TableName <String>
-ColumnName <String>
[-ServerName] <String>
[-DatabaseName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzSqlDatabaseDataMaskingRule cmdlet creates a data masking rule for an Azure SQL database. To use the cmdlet, use the ResourceGroupName, ServerName, and DatabaseName parameters to identify the rule. Provide the TableName and ColumnName to specify the target of the rule and the MaskingFunction parameter to define how the data is masked. If MaskingFunction has a value of Number or Text, you can specify the NumberFrom and NumberTo parameters, for number masking, or the PrefixSize, ReplacementString, and SuffixSize for text masking. If the command succeeds and the PassThru parameter is used, the cmdlet returns an object describing the data masking rule properties in addition to the rule identifiers. Rule identifiers include, but are not limited to, ResourceGroupName, ServerName, DatabaseName, and RuleID. This cmdlet is also supported by the SQL Server Stretch Database service on Azure.
Examples Example 1: Create a data masking rule for a number column in a databaseNew-AzSqlDatabaseDataMaskingRule -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -SchemaName "Schema01" -TableName "Table01" -ColumnName "Column01" -MaskingFunction "Number" -NumberFrom 5 -NumberTo 14
This command creates a data masking rule for the column named Column01 in the table named Table01 in the schema named Schema01. The database named Database01 contains all these items. The rule is a number masking rule that uses a random number between 5 and 14 as the mask value.
Parameters -ColumnNameSpecifies the name of the column targeted by the masking rule.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: True Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -ConfirmPrompts you for confirmation before running the cmdlet.
Parameter properties Type: SwitchParameter Default value: False Supports wildcards: False DontShow: False Aliases: cf Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -DatabaseNameSpecifies the name of the database.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: 2 Mandatory: True Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -DefaultProfileThe credentials, account, tenant, and subscription used for communication with azure
Parameter properties Type: IAzureContextContainer Default value: None Supports wildcards: False DontShow: False Aliases: AzContext, AzureRmContext, AzureCredential Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -MaskingFunctionSpecifies the masking function that the rule uses. The acceptable values for this parameter are:
Specifies the lower bound number of the interval from which a random value is selected. Specify this parameter only if you specify a value of Number for the MaskingFunction parameter. The default value is 0.
Parameter properties Type: Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -NumberToSpecifies the upper bound number of the interval from which a random value is selected. Specify this parameter only if you specify a value of Number for the MaskingFunction parameter. The default value is 0.
Parameter properties Type: Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -PassThruReturns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Parameter properties Type: SwitchParameter Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False -PrefixSizeSpecifies the number of characters at the start of the text that are not masked. Specify this parameter only if you specify a value of Text for the MaskingFunction parameter. The default value is 0.
Parameter properties Type: Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -ReplacementStringSpecifies the number of characters in the end of the text that are not masked. Specify this parameter only if you specify a value of Text for the MaskingFunction parameter. The default value is an empty string.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -ResourceGroupNameSpecifies the name of the resource group to which the database is assigned.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: 0 Mandatory: True Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -SchemaNameSpecifies the name of a schema.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: True Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -ServerNameSpecifies the name of the server that hosts the database.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: 1 Mandatory: True Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -SuffixSizeSpecifies the number of characters at the end of the text that are not masked. Specify this parameter only if you specify a value of Text for the MaskingFunction parameter. The default value is 0.
Parameter properties Type: Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -TableNameSpecifies the name of the database table that contains the masked column.
Parameter properties Type: String Default value: None Supports wildcards: False DontShow: False Parameter sets (All) Position: Named Mandatory: True Value from pipeline: False Value from pipeline by property name: True Value from remaining arguments: False -WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties Type: SwitchParameter Default value: False Supports wildcards: False DontShow: False Aliases: wi Parameter sets (All) Position: Named Mandatory: False Value from pipeline: False Value from pipeline by property name: False Value from remaining arguments: False CommonParametersThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs String Nullable<T> Nullable<T> Outputs DatabaseDataMaskingRuleModelRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4