Erstellt oder aktualisiert eine Datenbank-Datenmaskierungsregel.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/Default/rules/{dataMaskingRuleName}?api-version=2014-04-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
databaseName
|
path |
True
|
string
|
Der Name der Datenbank.
|
dataMaskingPolicyName
|
path |
True
|
DataMaskingPolicyName
|
Der Name der Datenbank, für die die Datenmaskierungsregel gilt.
|
dataMaskingRuleName
|
path |
True
|
string
|
Der Name der Datenmaskierungsregel.
|
resourceGroupName
|
path |
True
|
string
|
Der Name der Ressourcengruppe, die die Ressource enthält. Dieser Wert kann über die Azure-Ressourcen-Manager-API oder das Portal abgerufen werden.
|
serverName
|
path |
True
|
string
|
Name des Servers
|
subscriptionId
|
path |
True
|
string
|
Abonnement-ID für ein Azure-Abonnement.
|
api-version
|
query |
True
|
string
|
API-Version, die für die Anforderung verwendet werden soll.
|
Anforderungstext
Name |
Erforderlich |
Typ |
Beschreibung |
properties.columnName
|
True
|
string
|
Der Spaltenname, auf den die Datenmaskierungsregel angewendet wird.
|
properties.maskingFunction
|
True
|
DataMaskingFunction
|
Die Maskierungsfunktion, die für die Datenmaskierungsregel verwendet wird.
|
properties.schemaName
|
True
|
string
|
Der Schemaname, auf den die Datenmaskierungsregel angewendet wird.
|
properties.tableName
|
True
|
string
|
Der Tabellenname, auf den die Datenmaskierungsregel angewendet wird.
|
properties.aliasName
|
|
string
|
Der Aliasname. Dies ist ein Legacyparameter, der nicht mehr verwendet wird.
|
properties.numberFrom
|
|
string
|
Die numberFrom-Eigenschaft der Maskierungsregel. Erforderlich, wenn maskingFunction auf Number festgelegt ist, andernfalls wird dieser Parameter ignoriert.
|
properties.numberTo
|
|
string
|
Die numberTo-Eigenschaft der Datenmaskierungsregel. Erforderlich, wenn maskingFunction auf Number festgelegt ist, andernfalls wird dieser Parameter ignoriert.
|
properties.prefixSize
|
|
string
|
Wenn maskingFunction auf Text festgelegt ist, ist die Anzahl der Zeichen, die am Anfang der Zeichenfolge unmaskiert angezeigt werden sollen. Andernfalls wird dieser Parameter ignoriert.
|
properties.replacementString
|
|
string
|
Wenn maskingFunction auf Text festgelegt ist, ist das Zeichen, das zum Maskieren des nicht verfügbar gemachten Teils der Zeichenfolge verwendet werden soll. Andernfalls wird dieser Parameter ignoriert.
|
properties.ruleState
|
|
DataMaskingRuleState
|
Der Regelzustand. Wird verwendet, um eine Regel zu löschen. Um eine vorhandene Regel zu löschen, geben Sie schemaName, tableName, columnName, maskingFunction an, und geben Sie ruleState als deaktiviert an. Wenn die Regel jedoch noch nicht vorhanden ist, wird die Regel erstellt, wobei ruleState auf aktiviert festgelegt ist, unabhängig vom bereitgestellten Wert von ruleState.
|
properties.suffixSize
|
|
string
|
Wenn maskingFunction auf Text festgelegt ist, gibt die Anzahl der Zeichen an, die am Ende der Zeichenfolge unmaskiert angezeigt werden sollen. Andernfalls wird dieser Parameter ignoriert.
|
Antworten
Beispiele
Create/Update data masking rule for default max
Beispielanforderung
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/rule1?api-version=2014-04-01
{
"properties": {
"aliasName": "nickname",
"schemaName": "dbo",
"tableName": "Table_1",
"columnName": "test1",
"maskingFunction": "Default",
"ruleState": "Enabled"
}
}
import com.azure.core.util.Context;
import com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleInner;
import com.azure.resourcemanager.sql.models.DataMaskingFunction;
import com.azure.resourcemanager.sql.models.DataMaskingRuleState;
/** Samples for DataMaskingRules CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json
*/
/**
* Sample code: Create/Update data masking rule for default max.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void createUpdateDataMaskingRuleForDefaultMax(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.sqlServers()
.manager()
.serviceClient()
.getDataMaskingRules()
.createOrUpdateWithResponse(
"sqlcrudtest-6852",
"sqlcrudtest-2080",
"sqlcrudtest-331",
"rule1",
new DataMaskingRuleInner()
.withAliasName("nickname")
.withRuleState(DataMaskingRuleState.ENABLED)
.withSchemaName("dbo")
.withTableName("Table_1")
.withColumnName("test1")
.withMaskingFunction(DataMaskingFunction.DEFAULT),
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.sql import SqlManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-sql
# USAGE
python data_masking_rule_create_or_update_default_max.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = SqlManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-1111-2222-3333-444444444444",
)
response = client.data_masking_rules.create_or_update(
resource_group_name="sqlcrudtest-6852",
server_name="sqlcrudtest-2080",
database_name="sqlcrudtest-331",
data_masking_rule_name="rule1",
parameters={
"properties": {
"aliasName": "nickname",
"columnName": "test1",
"maskingFunction": "Default",
"ruleState": "Enabled",
"schemaName": "dbo",
"tableName": "Table_1",
}
},
)
print(response)
# x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armsql_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a3913f4b26467aed413cdc907116e99894f08994/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json
func ExampleDataMaskingRulesClient_CreateOrUpdate_createUpdateDataMaskingRuleForDefaultMax() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsql.DataMaskingRule{
Properties: &armsql.DataMaskingRuleProperties{
AliasName: to.Ptr("nickname"),
ColumnName: to.Ptr("test1"),
MaskingFunction: to.Ptr(armsql.DataMaskingFunctionDefault),
RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled),
SchemaName: to.Ptr("dbo"),
TableName: to.Ptr("Table_1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.DataMaskingRule = armsql.DataMaskingRule{
// Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies/rules"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"),
// Location: to.Ptr("Central US"),
// Properties: &armsql.DataMaskingRuleProperties{
// AliasName: to.Ptr("nickname"),
// ColumnName: to.Ptr("test1"),
// ID: to.Ptr("dbo_Table_1_test1"),
// MaskingFunction: to.Ptr(armsql.DataMaskingFunctionDefault),
// RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled),
// SchemaName: to.Ptr("dbo"),
// TableName: to.Ptr("Table_1"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SqlManagementClient } = require("@azure/arm-sql");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates a database data masking rule.
*
* @summary Creates or updates a database data masking rule.
* x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json
*/
async function createOrUpdateDataMaskingRuleForDefaultMax() {
const subscriptionId =
process.env["SQL_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
const resourceGroupName = process.env["SQL_RESOURCE_GROUP"] || "sqlcrudtest-6852";
const serverName = "sqlcrudtest-2080";
const databaseName = "sqlcrudtest-331";
const dataMaskingRuleName = "rule1";
const parameters = {
aliasName: "nickname",
columnName: "test1",
maskingFunction: "Default",
ruleState: "Enabled",
schemaName: "dbo",
tableName: "Table_1",
};
const credential = new DefaultAzureCredential();
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.dataMaskingRules.createOrUpdate(
resourceGroupName,
serverName,
databaseName,
dataMaskingRuleName,
parameters,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json
// this example is just showing the usage of "DataMaskingRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this DataMaskingPolicyResource created on azure
// for more information of creating DataMaskingPolicyResource, please refer to the document of DataMaskingPolicyResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "sqlcrudtest-6852";
string serverName = "sqlcrudtest-2080";
string databaseName = "sqlcrudtest-331";
ResourceIdentifier dataMaskingPolicyResourceId = DataMaskingPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName);
DataMaskingPolicyResource dataMaskingPolicy = client.GetDataMaskingPolicyResource(dataMaskingPolicyResourceId);
// invoke the operation
string dataMaskingRuleName = "rule1";
DataMaskingRule dataMaskingRule = new DataMaskingRule()
{
AliasName = "nickname",
RuleState = DataMaskingRuleState.Enabled,
SchemaName = "dbo",
TableName = "Table_1",
ColumnName = "test1",
MaskingFunction = DataMaskingFunction.Default,
};
DataMaskingRule result = await dataMaskingPolicy.CreateOrUpdateDataMaskingRuleAsync(dataMaskingRuleName, dataMaskingRule);
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Beispiel für eine Antwort
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/",
"name": null,
"type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules",
"location": "Central US",
"kind": null,
"properties": {
"id": "dbo_Table_1_test1",
"ruleState": "Enabled",
"schemaName": "dbo",
"tableName": "Table_1",
"columnName": "test1",
"aliasName": "nickname",
"maskingFunction": "Default",
"numberFrom": null,
"numberTo": null,
"prefixSize": null,
"suffixSize": null,
"replacementString": null
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/",
"name": null,
"type": "Microsoft.Sql/servers/databases/dataMaskingPolicies/rules",
"location": "Central US",
"kind": null,
"properties": {
"id": "dbo_Table_1_test1",
"ruleState": "Enabled",
"schemaName": "dbo",
"tableName": "Table_1",
"columnName": "test1",
"aliasName": "nickname",
"maskingFunction": "Default",
"numberFrom": null,
"numberTo": null,
"prefixSize": null,
"suffixSize": null,
"replacementString": null
}
}
Create/Update data masking rule for default min
Beispielanforderung
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/rule1?api-version=2014-04-01
{
"properties": {
"schemaName": "dbo",
"tableName": "Table_1",
"columnName": "test1",
"maskingFunction": "Default"
}
}
import com.azure.core.util.Context;
import com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleInner;
import com.azure.resourcemanager.sql.models.DataMaskingFunction;
/** Samples for DataMaskingRules CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json
*/
/**
* Sample code: Create/Update data masking rule for default min.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void createUpdateDataMaskingRuleForDefaultMin(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.sqlServers()
.manager()
.serviceClient()
.getDataMaskingRules()
.createOrUpdateWithResponse(
"sqlcrudtest-6852",
"sqlcrudtest-2080",
"sqlcrudtest-331",
"rule1",
new DataMaskingRuleInner()
.withSchemaName("dbo")
.withTableName("Table_1")
.withColumnName("test1")
.withMaskingFunction(DataMaskingFunction.DEFAULT),
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.sql import SqlManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-sql
# USAGE
python data_masking_rule_create_or_update_default_min.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = SqlManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-1111-2222-3333-444444444444",
)
response = client.data_masking_rules.create_or_update(
resource_group_name="sqlcrudtest-6852",
server_name="sqlcrudtest-2080",
database_name="sqlcrudtest-331",
data_masking_rule_name="rule1",
parameters={
"properties": {
"columnName": "test1",
"maskingFunction": "Default",
"schemaName": "dbo",
"tableName": "Table_1",
}
},
)
print(response)
# x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armsql_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a3913f4b26467aed413cdc907116e99894f08994/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json
func ExampleDataMaskingRulesClient_CreateOrUpdate_createUpdateDataMaskingRuleForDefaultMin() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsql.DataMaskingRule{
Properties: &armsql.DataMaskingRuleProperties{
ColumnName: to.Ptr("test1"),
MaskingFunction: to.Ptr(armsql.DataMaskingFunctionDefault),
SchemaName: to.Ptr("dbo"),
TableName: to.Ptr("Table_1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.DataMaskingRule = armsql.DataMaskingRule{
// Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies/rules"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"),
// Location: to.Ptr("Central US"),
// Properties: &armsql.DataMaskingRuleProperties{
// ColumnName: to.Ptr("test1"),
// ID: to.Ptr("dbo_Table_1_test1"),
// MaskingFunction: to.Ptr(armsql.DataMaskingFunctionDefault),
// RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled),
// SchemaName: to.Ptr("dbo"),
// TableName: to.Ptr("Table_1"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SqlManagementClient } = require("@azure/arm-sql");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates a database data masking rule.
*
* @summary Creates or updates a database data masking rule.
* x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json
*/
async function createOrUpdateDataMaskingRuleForDefaultMin() {
const subscriptionId =
process.env["SQL_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
const resourceGroupName = process.env["SQL_RESOURCE_GROUP"] || "sqlcrudtest-6852";
const serverName = "sqlcrudtest-2080";
const databaseName = "sqlcrudtest-331";
const dataMaskingRuleName = "rule1";
const parameters = {
columnName: "test1",
maskingFunction: "Default",
schemaName: "dbo",
tableName: "Table_1",
};
const credential = new DefaultAzureCredential();
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.dataMaskingRules.createOrUpdate(
resourceGroupName,
serverName,
databaseName,
dataMaskingRuleName,
parameters,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json
// this example is just showing the usage of "DataMaskingRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this DataMaskingPolicyResource created on azure
// for more information of creating DataMaskingPolicyResource, please refer to the document of DataMaskingPolicyResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "sqlcrudtest-6852";
string serverName = "sqlcrudtest-2080";
string databaseName = "sqlcrudtest-331";
ResourceIdentifier dataMaskingPolicyResourceId = DataMaskingPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName);
DataMaskingPolicyResource dataMaskingPolicy = client.GetDataMaskingPolicyResource(dataMaskingPolicyResourceId);
// invoke the operation
string dataMaskingRuleName = "rule1";
DataMaskingRule dataMaskingRule = new DataMaskingRule()
{
SchemaName = "dbo",
TableName = "Table_1",
ColumnName = "test1",
MaskingFunction = DataMaskingFunction.Default,
};
DataMaskingRule result = await dataMaskingPolicy.CreateOrUpdateDataMaskingRuleAsync(dataMaskingRuleName, dataMaskingRule);
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Beispiel für eine Antwort
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/",
"name": null,
"type": "Microsoft.Sql/servers/databases/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": "Default",
"numberFrom": null,
"numberTo": null,
"prefixSize": null,
"suffixSize": null,
"replacementString": null
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/",
"name": null,
"type": "Microsoft.Sql/servers/databases/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": "Default",
"numberFrom": null,
"numberTo": null,
"prefixSize": null,
"suffixSize": null,
"replacementString": null
}
}
Create/Update data masking rule for numbers
Beispielanforderung
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/rule1?api-version=2014-04-01
{
"properties": {
"schemaName": "dbo",
"tableName": "Table_1",
"columnName": "test1",
"maskingFunction": "Number",
"numberFrom": "0",
"numberTo": "2"
}
}
import com.azure.core.util.Context;
import com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleInner;
import com.azure.resourcemanager.sql.models.DataMaskingFunction;
/** Samples for DataMaskingRules CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateNumber.json
*/
/**
* Sample code: Create/Update data masking rule for numbers.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void createUpdateDataMaskingRuleForNumbers(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.sqlServers()
.manager()
.serviceClient()
.getDataMaskingRules()
.createOrUpdateWithResponse(
"sqlcrudtest-6852",
"sqlcrudtest-2080",
"sqlcrudtest-331",
"rule1",
new DataMaskingRuleInner()
.withSchemaName("dbo")
.withTableName("Table_1")
.withColumnName("test1")
.withMaskingFunction(DataMaskingFunction.NUMBER)
.withNumberFrom("0")
.withNumberTo("2"),
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.sql import SqlManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-sql
# USAGE
python data_masking_rule_create_or_update_number.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = SqlManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-1111-2222-3333-444444444444",
)
response = client.data_masking_rules.create_or_update(
resource_group_name="sqlcrudtest-6852",
server_name="sqlcrudtest-2080",
database_name="sqlcrudtest-331",
data_masking_rule_name="rule1",
parameters={
"properties": {
"columnName": "test1",
"maskingFunction": "Number",
"numberFrom": "0",
"numberTo": "2",
"schemaName": "dbo",
"tableName": "Table_1",
}
},
)
print(response)
# x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateNumber.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armsql_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a3913f4b26467aed413cdc907116e99894f08994/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateNumber.json
func ExampleDataMaskingRulesClient_CreateOrUpdate_createUpdateDataMaskingRuleForNumbers() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsql.DataMaskingRule{
Properties: &armsql.DataMaskingRuleProperties{
ColumnName: to.Ptr("test1"),
MaskingFunction: to.Ptr(armsql.DataMaskingFunctionNumber),
NumberFrom: to.Ptr("0"),
NumberTo: to.Ptr("2"),
SchemaName: to.Ptr("dbo"),
TableName: to.Ptr("Table_1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.DataMaskingRule = armsql.DataMaskingRule{
// Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies/rules"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"),
// Location: to.Ptr("Central US"),
// Properties: &armsql.DataMaskingRuleProperties{
// ColumnName: to.Ptr("test1"),
// ID: to.Ptr("dbo_Table_1_test1"),
// MaskingFunction: to.Ptr(armsql.DataMaskingFunctionNumber),
// NumberFrom: to.Ptr("0"),
// NumberTo: to.Ptr("2"),
// RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled),
// SchemaName: to.Ptr("dbo"),
// TableName: to.Ptr("Table_1"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SqlManagementClient } = require("@azure/arm-sql");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates a database data masking rule.
*
* @summary Creates or updates a database data masking rule.
* x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateNumber.json
*/
async function createOrUpdateDataMaskingRuleForNumbers() {
const subscriptionId =
process.env["SQL_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
const resourceGroupName = process.env["SQL_RESOURCE_GROUP"] || "sqlcrudtest-6852";
const serverName = "sqlcrudtest-2080";
const databaseName = "sqlcrudtest-331";
const dataMaskingRuleName = "rule1";
const parameters = {
columnName: "test1",
maskingFunction: "Number",
numberFrom: "0",
numberTo: "2",
schemaName: "dbo",
tableName: "Table_1",
};
const credential = new DefaultAzureCredential();
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.dataMaskingRules.createOrUpdate(
resourceGroupName,
serverName,
databaseName,
dataMaskingRuleName,
parameters,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateNumber.json
// this example is just showing the usage of "DataMaskingRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this DataMaskingPolicyResource created on azure
// for more information of creating DataMaskingPolicyResource, please refer to the document of DataMaskingPolicyResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "sqlcrudtest-6852";
string serverName = "sqlcrudtest-2080";
string databaseName = "sqlcrudtest-331";
ResourceIdentifier dataMaskingPolicyResourceId = DataMaskingPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName);
DataMaskingPolicyResource dataMaskingPolicy = client.GetDataMaskingPolicyResource(dataMaskingPolicyResourceId);
// invoke the operation
string dataMaskingRuleName = "rule1";
DataMaskingRule dataMaskingRule = new DataMaskingRule()
{
SchemaName = "dbo",
TableName = "Table_1",
ColumnName = "test1",
MaskingFunction = DataMaskingFunction.Number,
NumberFrom = "0",
NumberTo = "2",
};
DataMaskingRule result = await dataMaskingPolicy.CreateOrUpdateDataMaskingRuleAsync(dataMaskingRuleName, dataMaskingRule);
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Beispiel für eine Antwort
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/",
"name": null,
"type": "Microsoft.Sql/servers/databases/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": "Number",
"numberFrom": "0",
"numberTo": "2",
"prefixSize": null,
"suffixSize": null,
"replacementString": null
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/",
"name": null,
"type": "Microsoft.Sql/servers/databases/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": "Number",
"numberFrom": "0",
"numberTo": "2",
"prefixSize": null,
"suffixSize": null,
"replacementString": null
}
}
Create/Update data masking rule for text
Beispielanforderung
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/rule1?api-version=2014-04-01
{
"properties": {
"schemaName": "dbo",
"tableName": "Table_1",
"columnName": "test1",
"maskingFunction": "Text",
"prefixSize": "1",
"suffixSize": "0",
"replacementString": "asdf"
}
}
import com.azure.core.util.Context;
import com.azure.resourcemanager.sql.fluent.models.DataMaskingRuleInner;
import com.azure.resourcemanager.sql.models.DataMaskingFunction;
/** Samples for DataMaskingRules CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateText.json
*/
/**
* Sample code: Create/Update data masking rule for text.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void createUpdateDataMaskingRuleForText(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.sqlServers()
.manager()
.serviceClient()
.getDataMaskingRules()
.createOrUpdateWithResponse(
"sqlcrudtest-6852",
"sqlcrudtest-2080",
"sqlcrudtest-331",
"rule1",
new DataMaskingRuleInner()
.withSchemaName("dbo")
.withTableName("Table_1")
.withColumnName("test1")
.withMaskingFunction(DataMaskingFunction.TEXT)
.withPrefixSize("1")
.withSuffixSize("0")
.withReplacementString("asdf"),
Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.sql import SqlManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-sql
# USAGE
python data_masking_rule_create_or_update_text.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = SqlManagementClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-1111-2222-3333-444444444444",
)
response = client.data_masking_rules.create_or_update(
resource_group_name="sqlcrudtest-6852",
server_name="sqlcrudtest-2080",
database_name="sqlcrudtest-331",
data_masking_rule_name="rule1",
parameters={
"properties": {
"columnName": "test1",
"maskingFunction": "Text",
"prefixSize": "1",
"replacementString": "asdf",
"schemaName": "dbo",
"suffixSize": "0",
"tableName": "Table_1",
}
},
)
print(response)
# x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateText.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armsql_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/a3913f4b26467aed413cdc907116e99894f08994/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateText.json
func ExampleDataMaskingRulesClient_CreateOrUpdate_createUpdateDataMaskingRuleForText() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsql.DataMaskingRule{
Properties: &armsql.DataMaskingRuleProperties{
ColumnName: to.Ptr("test1"),
MaskingFunction: to.Ptr(armsql.DataMaskingFunctionText),
PrefixSize: to.Ptr("1"),
ReplacementString: to.Ptr("asdf"),
SchemaName: to.Ptr("dbo"),
SuffixSize: to.Ptr("0"),
TableName: to.Ptr("Table_1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.DataMaskingRule = armsql.DataMaskingRule{
// Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies/rules"),
// ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"),
// Location: to.Ptr("Central US"),
// Properties: &armsql.DataMaskingRuleProperties{
// ColumnName: to.Ptr("test1"),
// ID: to.Ptr("dbo_Table_1_test1"),
// MaskingFunction: to.Ptr(armsql.DataMaskingFunctionText),
// PrefixSize: to.Ptr("1"),
// ReplacementString: to.Ptr("asdf"),
// RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled),
// SchemaName: to.Ptr("dbo"),
// SuffixSize: to.Ptr("0"),
// TableName: to.Ptr("Table_1"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { SqlManagementClient } = require("@azure/arm-sql");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates a database data masking rule.
*
* @summary Creates or updates a database data masking rule.
* x-ms-original-file: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateText.json
*/
async function createOrUpdateDataMaskingRuleForText() {
const subscriptionId =
process.env["SQL_SUBSCRIPTION_ID"] || "00000000-1111-2222-3333-444444444444";
const resourceGroupName = process.env["SQL_RESOURCE_GROUP"] || "sqlcrudtest-6852";
const serverName = "sqlcrudtest-2080";
const databaseName = "sqlcrudtest-331";
const dataMaskingRuleName = "rule1";
const parameters = {
columnName: "test1",
maskingFunction: "Text",
prefixSize: "1",
replacementString: "asdf",
schemaName: "dbo",
suffixSize: "0",
tableName: "Table_1",
};
const credential = new DefaultAzureCredential();
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.dataMaskingRules.createOrUpdate(
resourceGroupName,
serverName,
databaseName,
dataMaskingRuleName,
parameters,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateText.json
// this example is just showing the usage of "DataMaskingRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this DataMaskingPolicyResource created on azure
// for more information of creating DataMaskingPolicyResource, please refer to the document of DataMaskingPolicyResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "sqlcrudtest-6852";
string serverName = "sqlcrudtest-2080";
string databaseName = "sqlcrudtest-331";
ResourceIdentifier dataMaskingPolicyResourceId = DataMaskingPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName);
DataMaskingPolicyResource dataMaskingPolicy = client.GetDataMaskingPolicyResource(dataMaskingPolicyResourceId);
// invoke the operation
string dataMaskingRuleName = "rule1";
DataMaskingRule dataMaskingRule = new DataMaskingRule()
{
SchemaName = "dbo",
TableName = "Table_1",
ColumnName = "test1",
MaskingFunction = DataMaskingFunction.Text,
PrefixSize = "1",
SuffixSize = "0",
ReplacementString = "asdf",
};
DataMaskingRule result = await dataMaskingPolicy.CreateOrUpdateDataMaskingRuleAsync(dataMaskingRuleName, dataMaskingRule);
Console.WriteLine($"Succeeded: {result}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Beispiel für eine Antwort
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/",
"name": null,
"type": "Microsoft.Sql/servers/databases/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"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/",
"name": null,
"type": "Microsoft.Sql/servers/databases/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"
}
}
Definitionen
Name |
Beschreibung |
DataMaskingFunction
|
Die Maskierungsfunktion, die für die Datenmaskierungsregel verwendet wird.
|
DataMaskingPolicyName
|
Der Name der Datenbank, für die die Datenmaskierungsregel gilt.
|
DataMaskingRule
|
Stellt eine Datenbank-Datenmaskierungsregel dar.
|
DataMaskingRuleState
|
Der Regelzustand. Wird verwendet, um eine Regel zu löschen. Um eine vorhandene Regel zu löschen, geben Sie schemaName, tableName, columnName, maskingFunction an, und geben Sie ruleState als deaktiviert an. Wenn die Regel jedoch noch nicht vorhanden ist, wird die Regel erstellt, wobei ruleState auf aktiviert festgelegt ist, unabhängig vom bereitgestellten Wert von ruleState.
|
DataMaskingFunction
Die Maskierungsfunktion, die für die Datenmaskierungsregel verwendet wird.
Name |
Typ |
Beschreibung |
CCN
|
string
|
|
Default
|
string
|
|
Email
|
string
|
|
Number
|
string
|
|
SSN
|
string
|
|
Text
|
string
|
|
DataMaskingPolicyName
Der Name der Datenbank, für die die Datenmaskierungsregel gilt.
Name |
Typ |
Beschreibung |
Default
|
string
|
|
DataMaskingRule
Stellt eine Datenbank-Datenmaskierungsregel dar.
Name |
Typ |
Beschreibung |
id
|
string
|
Ressourcen-ID
|
kind
|
string
|
Die Art der Datenmaskierungsregel. Metadaten, die für Azure-Portal verwendet werden.
|
location
|
string
|
Der Speicherort der Datenmaskierungsregel.
|
name
|
string
|
Name der Ressource.
|
properties.aliasName
|
string
|
Der Aliasname. Dies ist ein Legacyparameter, der nicht mehr verwendet wird.
|
properties.columnName
|
string
|
Der Spaltenname, auf den die Datenmaskierungsregel angewendet wird.
|
properties.id
|
string
|
Die Regel-ID.
|
properties.maskingFunction
|
DataMaskingFunction
|
Die Maskierungsfunktion, die für die Datenmaskierungsregel verwendet wird.
|
properties.numberFrom
|
string
|
Die numberFrom-Eigenschaft der Maskierungsregel. Erforderlich, wenn maskingFunction auf Number festgelegt ist, andernfalls wird dieser Parameter ignoriert.
|
properties.numberTo
|
string
|
Die numberTo-Eigenschaft der Datenmaskierungsregel. Erforderlich, wenn maskingFunction auf Number festgelegt ist, andernfalls wird dieser Parameter ignoriert.
|
properties.prefixSize
|
string
|
Wenn maskingFunction auf Text festgelegt ist, ist die Anzahl der Zeichen, die am Anfang der Zeichenfolge unmaskiert angezeigt werden sollen. Andernfalls wird dieser Parameter ignoriert.
|
properties.replacementString
|
string
|
Wenn maskingFunction auf Text festgelegt ist, ist das Zeichen, das zum Maskieren des nicht verfügbar gemachten Teils der Zeichenfolge verwendet werden soll. Andernfalls wird dieser Parameter ignoriert.
|
properties.ruleState
|
DataMaskingRuleState
|
Der Regelzustand. Wird verwendet, um eine Regel zu löschen. Um eine vorhandene Regel zu löschen, geben Sie schemaName, tableName, columnName, maskingFunction an, und geben Sie ruleState als deaktiviert an. Wenn die Regel jedoch noch nicht vorhanden ist, wird die Regel erstellt, wobei ruleState auf aktiviert festgelegt ist, unabhängig vom bereitgestellten Wert von ruleState.
|
properties.schemaName
|
string
|
Der Schemaname, auf den die Datenmaskierungsregel angewendet wird.
|
properties.suffixSize
|
string
|
Wenn maskingFunction auf Text festgelegt ist, gibt die Anzahl der Zeichen an, die am Ende der Zeichenfolge unmaskiert angezeigt werden sollen. Andernfalls wird dieser Parameter ignoriert.
|
properties.tableName
|
string
|
Der Tabellenname, auf den die Datenmaskierungsregel angewendet wird.
|
type
|
string
|
Der Ressourcentyp.
|
DataMaskingRuleState
Der Regelzustand. Wird verwendet, um eine Regel zu löschen. Um eine vorhandene Regel zu löschen, geben Sie schemaName, tableName, columnName, maskingFunction an, und geben Sie ruleState als deaktiviert an. Wenn die Regel jedoch noch nicht vorhanden ist, wird die Regel erstellt, wobei ruleState auf aktiviert festgelegt ist, unabhängig vom bereitgestellten Wert von ruleState.
Name |
Typ |
Beschreibung |
Disabled
|
string
|
|
Enabled
|
string
|
|