azure-native.sql.DataMaskingPolicy

Explore with Pulumi AI

Represents a database data masking policy. API Version: 2014-04-01.

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"
	"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"
	"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

new DataMaskingPolicy(name: string, args: DataMaskingPolicyArgs, opts?: CustomResourceOptions);
@overload
def DataMaskingPolicy(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      data_masking_policy_name: Optional[str] = None,
                      data_masking_state: Optional[DataMaskingState] = None,
                      database_name: Optional[str] = None,
                      exempt_principals: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      server_name: Optional[str] = None)
@overload
def DataMaskingPolicy(resource_name: str,
                      args: DataMaskingPolicyArgs,
                      opts: Optional[ResourceOptions] = 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.

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.

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:

DataMaskingState Pulumi.AzureNative.Sql.DataMaskingState

The state of the data masking policy.

DatabaseName string

The name of the database.

ResourceGroupName string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

ServerName string

The name of the server.

DataMaskingPolicyName string

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

ExemptPrincipals 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.

DataMaskingState DataMaskingState

The state of the data masking policy.

DatabaseName string

The name of the database.

ResourceGroupName string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

ServerName string

The name of the server.

DataMaskingPolicyName string

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

ExemptPrincipals 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.

dataMaskingState DataMaskingState

The state of the data masking policy.

databaseName String

The name of the database.

resourceGroupName String

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName String

The name of the server.

dataMaskingPolicyName String

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

exemptPrincipals 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.

dataMaskingState DataMaskingState

The state of the data masking policy.

databaseName string

The name of the database.

resourceGroupName string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName string

The name of the server.

dataMaskingPolicyName string

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

exemptPrincipals 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_state DataMaskingState

The state of the data masking policy.

database_name str

The name of the database.

resource_group_name str

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_policy_name str

The name of the database for which the data masking rule 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.

dataMaskingState "Disabled" | "Enabled"

The state of the data masking policy.

databaseName String

The name of the database.

resourceGroupName String

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName String

The name of the server.

dataMaskingPolicyName String

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

exemptPrincipals 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:

ApplicationPrincipals 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.

MaskingLevel string

The masking level. This is a legacy parameter and is no longer used.

Name string

Resource name.

Type string

Resource type.

ApplicationPrincipals 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.

MaskingLevel string

The masking level. This is a legacy parameter and is no longer used.

Name string

Resource name.

Type string

Resource type.

applicationPrincipals 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.

maskingLevel String

The masking level. This is a legacy parameter and is no longer used.

name String

Resource name.

type String

Resource type.

applicationPrincipals 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.

maskingLevel 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.

applicationPrincipals 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.

maskingLevel 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

Disabled
Disabled
Enabled
Enabled
DataMaskingStateDisabled
Disabled
DataMaskingStateEnabled
Enabled
Disabled
Disabled
Enabled
Enabled
Disabled
Disabled
Enabled
Enabled
DISABLED
Disabled
ENABLED
Enabled
"Disabled"
Disabled
"Enabled"
Enabled

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:sql:DataMaskingPolicy Default /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default 

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0