azure-native.sql.DataMaskingPolicy
Explore with Pulumi AI
A database data masking policy. Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2014-04-01.
Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.
Example Usage
Create or update data masking policy max
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var dataMaskingPolicy = new AzureNative.Sql.DataMaskingPolicy("dataMaskingPolicy", new()
{
DataMaskingPolicyName = "Default",
DataMaskingState = AzureNative.Sql.DataMaskingState.Enabled,
DatabaseName = "sqlcrudtest-331",
ExemptPrincipals = "testuser;",
ResourceGroupName = "sqlcrudtest-6852",
ServerName = "sqlcrudtest-2080",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewDataMaskingPolicy(ctx, "dataMaskingPolicy", &sql.DataMaskingPolicyArgs{
DataMaskingPolicyName: pulumi.String("Default"),
DataMaskingState: sql.DataMaskingStateEnabled,
DatabaseName: pulumi.String("sqlcrudtest-331"),
ExemptPrincipals: pulumi.String("testuser;"),
ResourceGroupName: pulumi.String("sqlcrudtest-6852"),
ServerName: pulumi.String("sqlcrudtest-2080"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.DataMaskingPolicy;
import com.pulumi.azurenative.sql.DataMaskingPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var dataMaskingPolicy = new DataMaskingPolicy("dataMaskingPolicy", DataMaskingPolicyArgs.builder()
.dataMaskingPolicyName("Default")
.dataMaskingState("Enabled")
.databaseName("sqlcrudtest-331")
.exemptPrincipals("testuser;")
.resourceGroupName("sqlcrudtest-6852")
.serverName("sqlcrudtest-2080")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
data_masking_policy = azure_native.sql.DataMaskingPolicy("dataMaskingPolicy",
data_masking_policy_name="Default",
data_masking_state=azure_native.sql.DataMaskingState.ENABLED,
database_name="sqlcrudtest-331",
exempt_principals="testuser;",
resource_group_name="sqlcrudtest-6852",
server_name="sqlcrudtest-2080")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const dataMaskingPolicy = new azure_native.sql.DataMaskingPolicy("dataMaskingPolicy", {
dataMaskingPolicyName: "Default",
dataMaskingState: azure_native.sql.DataMaskingState.Enabled,
databaseName: "sqlcrudtest-331",
exemptPrincipals: "testuser;",
resourceGroupName: "sqlcrudtest-6852",
serverName: "sqlcrudtest-2080",
});
resources:
dataMaskingPolicy:
type: azure-native:sql:DataMaskingPolicy
properties:
dataMaskingPolicyName: Default
dataMaskingState: Enabled
databaseName: sqlcrudtest-331
exemptPrincipals: testuser;
resourceGroupName: sqlcrudtest-6852
serverName: sqlcrudtest-2080
Create or update data masking policy min.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var dataMaskingPolicy = new AzureNative.Sql.DataMaskingPolicy("dataMaskingPolicy", new()
{
DataMaskingPolicyName = "Default",
DataMaskingState = AzureNative.Sql.DataMaskingState.Enabled,
DatabaseName = "sqlcrudtest-331",
ResourceGroupName = "sqlcrudtest-6852",
ServerName = "sqlcrudtest-2080",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewDataMaskingPolicy(ctx, "dataMaskingPolicy", &sql.DataMaskingPolicyArgs{
DataMaskingPolicyName: pulumi.String("Default"),
DataMaskingState: sql.DataMaskingStateEnabled,
DatabaseName: pulumi.String("sqlcrudtest-331"),
ResourceGroupName: pulumi.String("sqlcrudtest-6852"),
ServerName: pulumi.String("sqlcrudtest-2080"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.DataMaskingPolicy;
import com.pulumi.azurenative.sql.DataMaskingPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var dataMaskingPolicy = new DataMaskingPolicy("dataMaskingPolicy", DataMaskingPolicyArgs.builder()
.dataMaskingPolicyName("Default")
.dataMaskingState("Enabled")
.databaseName("sqlcrudtest-331")
.resourceGroupName("sqlcrudtest-6852")
.serverName("sqlcrudtest-2080")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
data_masking_policy = azure_native.sql.DataMaskingPolicy("dataMaskingPolicy",
data_masking_policy_name="Default",
data_masking_state=azure_native.sql.DataMaskingState.ENABLED,
database_name="sqlcrudtest-331",
resource_group_name="sqlcrudtest-6852",
server_name="sqlcrudtest-2080")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const dataMaskingPolicy = new azure_native.sql.DataMaskingPolicy("dataMaskingPolicy", {
dataMaskingPolicyName: "Default",
dataMaskingState: azure_native.sql.DataMaskingState.Enabled,
databaseName: "sqlcrudtest-331",
resourceGroupName: "sqlcrudtest-6852",
serverName: "sqlcrudtest-2080",
});
resources:
dataMaskingPolicy:
type: azure-native:sql:DataMaskingPolicy
properties:
dataMaskingPolicyName: Default
dataMaskingState: Enabled
databaseName: sqlcrudtest-331
resourceGroupName: sqlcrudtest-6852
serverName: sqlcrudtest-2080
Create DataMaskingPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DataMaskingPolicy(name: string, args: DataMaskingPolicyArgs, opts?: CustomResourceOptions);
@overload
def DataMaskingPolicy(resource_name: str,
args: DataMaskingPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DataMaskingPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
data_masking_state: Optional[DataMaskingState] = None,
database_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
data_masking_policy_name: Optional[str] = None,
exempt_principals: Optional[str] = None)
func NewDataMaskingPolicy(ctx *Context, name string, args DataMaskingPolicyArgs, opts ...ResourceOption) (*DataMaskingPolicy, error)
public DataMaskingPolicy(string name, DataMaskingPolicyArgs args, CustomResourceOptions? opts = null)
public DataMaskingPolicy(String name, DataMaskingPolicyArgs args)
public DataMaskingPolicy(String name, DataMaskingPolicyArgs args, CustomResourceOptions options)
type: azure-native:sql:DataMaskingPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DataMaskingPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DataMaskingPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DataMaskingPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DataMaskingPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DataMaskingPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var dataMaskingPolicyResource = new AzureNative.Sql.DataMaskingPolicy("dataMaskingPolicyResource", new()
{
DataMaskingState = AzureNative.Sql.DataMaskingState.Enabled,
DatabaseName = "string",
ResourceGroupName = "string",
ServerName = "string",
DataMaskingPolicyName = "string",
ExemptPrincipals = "string",
});
example, err := sql.NewDataMaskingPolicy(ctx, "dataMaskingPolicyResource", &sql.DataMaskingPolicyArgs{
DataMaskingState: sql.DataMaskingStateEnabled,
DatabaseName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
ServerName: pulumi.String("string"),
DataMaskingPolicyName: pulumi.String("string"),
ExemptPrincipals: pulumi.String("string"),
})
var dataMaskingPolicyResource = new DataMaskingPolicy("dataMaskingPolicyResource", DataMaskingPolicyArgs.builder()
.dataMaskingState("Enabled")
.databaseName("string")
.resourceGroupName("string")
.serverName("string")
.dataMaskingPolicyName("string")
.exemptPrincipals("string")
.build());
data_masking_policy_resource = azure_native.sql.DataMaskingPolicy("dataMaskingPolicyResource",
data_masking_state=azure_native.sql.DataMaskingState.ENABLED,
database_name="string",
resource_group_name="string",
server_name="string",
data_masking_policy_name="string",
exempt_principals="string")
const dataMaskingPolicyResource = new azure_native.sql.DataMaskingPolicy("dataMaskingPolicyResource", {
dataMaskingState: azure_native.sql.DataMaskingState.Enabled,
databaseName: "string",
resourceGroupName: "string",
serverName: "string",
dataMaskingPolicyName: "string",
exemptPrincipals: "string",
});
type: azure-native:sql:DataMaskingPolicy
properties:
dataMaskingPolicyName: string
dataMaskingState: Enabled
databaseName: string
exemptPrincipals: string
resourceGroupName: string
serverName: string
DataMaskingPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The DataMaskingPolicy resource accepts the following input properties:
- Data
Masking Pulumi.State Azure Native. Sql. Data Masking State - The state of the data masking policy.
- Database
Name string - The name of the database.
- Resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Server
Name string - The name of the server.
- Data
Masking stringPolicy Name - The name of the database for which the data masking policy applies.
- Exempt
Principals string - The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries.
- Data
Masking DataState Masking State - The state of the data masking policy.
- Database
Name string - The name of the database.
- Resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Server
Name string - The name of the server.
- Data
Masking stringPolicy Name - The name of the database for which the data masking policy applies.
- Exempt
Principals string - The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries.
- data
Masking DataState Masking State - The state of the data masking policy.
- database
Name String - The name of the database.
- resource
Group StringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name String - The name of the server.
- data
Masking StringPolicy Name - The name of the database for which the data masking policy applies.
- exempt
Principals String - The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries.
- data
Masking DataState Masking State - The state of the data masking policy.
- database
Name string - The name of the database.
- resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name string - The name of the server.
- data
Masking stringPolicy Name - The name of the database for which the data masking policy applies.
- exempt
Principals string - The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries.
- data_
masking_ Datastate Masking State - The state of the data masking policy.
- database_
name str - The name of the database.
- resource_
group_ strname - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server_
name str - The name of the server.
- data_
masking_ strpolicy_ name - The name of the database for which the data masking policy applies.
- exempt_
principals str - The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries.
- data
Masking "Enabled" | "Disabled"State - The state of the data masking policy.
- database
Name String - The name of the database.
- resource
Group StringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name String - The name of the server.
- data
Masking StringPolicy Name - The name of the database for which the data masking policy applies.
- exempt
Principals String - The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries.
Outputs
All input properties are implicitly available as output properties. Additionally, the DataMaskingPolicy resource produces the following output properties:
- Application
Principals string - The list of the application principals. This is a legacy parameter and is no longer used.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kind string
- The kind of Data Masking Policy. Metadata, used for Azure portal.
- Location string
- The location of the data masking policy.
- Masking
Level string - The masking level. This is a legacy parameter and is no longer used.
- Name string
- Resource name.
- Type string
- Resource type.
- Application
Principals string - The list of the application principals. This is a legacy parameter and is no longer used.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kind string
- The kind of Data Masking Policy. Metadata, used for Azure portal.
- Location string
- The location of the data masking policy.
- Masking
Level string - The masking level. This is a legacy parameter and is no longer used.
- Name string
- Resource name.
- Type string
- Resource type.
- application
Principals String - The list of the application principals. This is a legacy parameter and is no longer used.
- id String
- The provider-assigned unique ID for this managed resource.
- kind String
- The kind of Data Masking Policy. Metadata, used for Azure portal.
- location String
- The location of the data masking policy.
- masking
Level String - The masking level. This is a legacy parameter and is no longer used.
- name String
- Resource name.
- type String
- Resource type.
- application
Principals string - The list of the application principals. This is a legacy parameter and is no longer used.
- id string
- The provider-assigned unique ID for this managed resource.
- kind string
- The kind of Data Masking Policy. Metadata, used for Azure portal.
- location string
- The location of the data masking policy.
- masking
Level string - The masking level. This is a legacy parameter and is no longer used.
- name string
- Resource name.
- type string
- Resource type.
- application_
principals str - The list of the application principals. This is a legacy parameter and is no longer used.
- id str
- The provider-assigned unique ID for this managed resource.
- kind str
- The kind of Data Masking Policy. Metadata, used for Azure portal.
- location str
- The location of the data masking policy.
- masking_
level str - The masking level. This is a legacy parameter and is no longer used.
- name str
- Resource name.
- type str
- Resource type.
- application
Principals String - The list of the application principals. This is a legacy parameter and is no longer used.
- id String
- The provider-assigned unique ID for this managed resource.
- kind String
- The kind of Data Masking Policy. Metadata, used for Azure portal.
- location String
- The location of the data masking policy.
- masking
Level String - The masking level. This is a legacy parameter and is no longer used.
- name String
- Resource name.
- type String
- Resource type.
Supporting Types
DataMaskingState, DataMaskingStateArgs
- Enabled
- Enabled
- Disabled
- Disabled
- Data
Masking State Enabled - Enabled
- Data
Masking State Disabled - Disabled
- Enabled
- Enabled
- Disabled
- Disabled
- Enabled
- Enabled
- Disabled
- Disabled
- ENABLED
- Enabled
- DISABLED
- Disabled
- "Enabled"
- Enabled
- "Disabled"
- Disabled
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:sql:DataMaskingPolicy Default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0