azure-native.sql.SensitivityLabel
Explore with Pulumi AI
A sensitivity label.
Uses Azure REST API version 2023-08-01. In version 2.x of the Azure Native provider, it used API version 2021-11-01.
Other available API versions: 2017-03-01-preview, 2020-02-02-preview, 2020-08-01-preview, 2020-11-01-preview, 2021-02-01-preview, 2021-05-01-preview, 2021-08-01-preview, 2021-11-01, 2021-11-01-preview, 2022-02-01-preview, 2022-05-01-preview, 2022-08-01-preview, 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native sql [ApiVersion]. See the version guide for details.
Example Usage
Updates the sensitivity label of a given column with all parameters
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var sensitivityLabel = new AzureNative.Sql.SensitivityLabel("sensitivityLabel", new()
    {
        ClientClassificationSource = AzureNative.Sql.ClientClassificationSource.Native,
        ColumnName = "myColumn",
        DatabaseName = "myDatabase",
        InformationType = "PhoneNumber",
        InformationTypeId = "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
        LabelId = "bf91e08c-f4f0-478a-b016-25164b2a65ff",
        LabelName = "PII",
        Rank = AzureNative.Sql.SensitivityLabelRank.Low,
        ResourceGroupName = "myRG",
        SchemaName = "dbo",
        SensitivityLabelSource = "current",
        ServerName = "myServer",
        TableName = "myTable",
    });
});
package main
import (
	sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sql.NewSensitivityLabel(ctx, "sensitivityLabel", &sql.SensitivityLabelArgs{
			ClientClassificationSource: pulumi.String(sql.ClientClassificationSourceNative),
			ColumnName:                 pulumi.String("myColumn"),
			DatabaseName:               pulumi.String("myDatabase"),
			InformationType:            pulumi.String("PhoneNumber"),
			InformationTypeId:          pulumi.String("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"),
			LabelId:                    pulumi.String("bf91e08c-f4f0-478a-b016-25164b2a65ff"),
			LabelName:                  pulumi.String("PII"),
			Rank:                       sql.SensitivityLabelRankLow,
			ResourceGroupName:          pulumi.String("myRG"),
			SchemaName:                 pulumi.String("dbo"),
			SensitivityLabelSource:     pulumi.String("current"),
			ServerName:                 pulumi.String("myServer"),
			TableName:                  pulumi.String("myTable"),
		})
		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.SensitivityLabel;
import com.pulumi.azurenative.sql.SensitivityLabelArgs;
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 sensitivityLabel = new SensitivityLabel("sensitivityLabel", SensitivityLabelArgs.builder()
            .clientClassificationSource("Native")
            .columnName("myColumn")
            .databaseName("myDatabase")
            .informationType("PhoneNumber")
            .informationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646")
            .labelId("bf91e08c-f4f0-478a-b016-25164b2a65ff")
            .labelName("PII")
            .rank("Low")
            .resourceGroupName("myRG")
            .schemaName("dbo")
            .sensitivityLabelSource("current")
            .serverName("myServer")
            .tableName("myTable")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const sensitivityLabel = new azure_native.sql.SensitivityLabel("sensitivityLabel", {
    clientClassificationSource: azure_native.sql.ClientClassificationSource.Native,
    columnName: "myColumn",
    databaseName: "myDatabase",
    informationType: "PhoneNumber",
    informationTypeId: "d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
    labelId: "bf91e08c-f4f0-478a-b016-25164b2a65ff",
    labelName: "PII",
    rank: azure_native.sql.SensitivityLabelRank.Low,
    resourceGroupName: "myRG",
    schemaName: "dbo",
    sensitivityLabelSource: "current",
    serverName: "myServer",
    tableName: "myTable",
});
import pulumi
import pulumi_azure_native as azure_native
sensitivity_label = azure_native.sql.SensitivityLabel("sensitivityLabel",
    client_classification_source=azure_native.sql.ClientClassificationSource.NATIVE,
    column_name="myColumn",
    database_name="myDatabase",
    information_type="PhoneNumber",
    information_type_id="d22fa6e9-5ee4-3bde-4c2b-a409604c4646",
    label_id="bf91e08c-f4f0-478a-b016-25164b2a65ff",
    label_name="PII",
    rank=azure_native.sql.SensitivityLabelRank.LOW,
    resource_group_name="myRG",
    schema_name="dbo",
    sensitivity_label_source="current",
    server_name="myServer",
    table_name="myTable")
resources:
  sensitivityLabel:
    type: azure-native:sql:SensitivityLabel
    properties:
      clientClassificationSource: Native
      columnName: myColumn
      databaseName: myDatabase
      informationType: PhoneNumber
      informationTypeId: d22fa6e9-5ee4-3bde-4c2b-a409604c4646
      labelId: bf91e08c-f4f0-478a-b016-25164b2a65ff
      labelName: PII
      rank: Low
      resourceGroupName: myRG
      schemaName: dbo
      sensitivityLabelSource: current
      serverName: myServer
      tableName: myTable
Create SensitivityLabel Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SensitivityLabel(name: string, args: SensitivityLabelArgs, opts?: CustomResourceOptions);@overload
def SensitivityLabel(resource_name: str,
                     args: SensitivityLabelArgs,
                     opts: Optional[ResourceOptions] = None)
@overload
def SensitivityLabel(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     resource_group_name: Optional[str] = None,
                     column_name: Optional[str] = None,
                     database_name: Optional[str] = None,
                     table_name: Optional[str] = None,
                     server_name: Optional[str] = None,
                     schema_name: Optional[str] = None,
                     information_type: Optional[str] = None,
                     rank: Optional[SensitivityLabelRank] = None,
                     label_name: Optional[str] = None,
                     label_id: Optional[str] = None,
                     sensitivity_label_source: Optional[str] = None,
                     information_type_id: Optional[str] = None,
                     client_classification_source: Optional[Union[str, ClientClassificationSource]] = None)func NewSensitivityLabel(ctx *Context, name string, args SensitivityLabelArgs, opts ...ResourceOption) (*SensitivityLabel, error)public SensitivityLabel(string name, SensitivityLabelArgs args, CustomResourceOptions? opts = null)
public SensitivityLabel(String name, SensitivityLabelArgs args)
public SensitivityLabel(String name, SensitivityLabelArgs args, CustomResourceOptions options)
type: azure-native:sql:SensitivityLabel
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 SensitivityLabelArgs
 - 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 SensitivityLabelArgs
 - 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 SensitivityLabelArgs
 - The arguments to resource properties.
 - opts ResourceOption
 - Bag of options to control resource's behavior.
 
- name string
 - The unique name of the resource.
 - args SensitivityLabelArgs
 - The arguments to resource properties.
 - opts CustomResourceOptions
 - Bag of options to control resource's behavior.
 
- name String
 - The unique name of the resource.
 - args SensitivityLabelArgs
 - 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 sensitivityLabelResource = new AzureNative.Sql.SensitivityLabel("sensitivityLabelResource", new()
{
    ResourceGroupName = "string",
    ColumnName = "string",
    DatabaseName = "string",
    TableName = "string",
    ServerName = "string",
    SchemaName = "string",
    InformationType = "string",
    Rank = AzureNative.Sql.SensitivityLabelRank.None,
    LabelName = "string",
    LabelId = "string",
    SensitivityLabelSource = "string",
    InformationTypeId = "string",
    ClientClassificationSource = "string",
});
example, err := sql.NewSensitivityLabel(ctx, "sensitivityLabelResource", &sql.SensitivityLabelArgs{
	ResourceGroupName:          pulumi.String("string"),
	ColumnName:                 pulumi.String("string"),
	DatabaseName:               pulumi.String("string"),
	TableName:                  pulumi.String("string"),
	ServerName:                 pulumi.String("string"),
	SchemaName:                 pulumi.String("string"),
	InformationType:            pulumi.String("string"),
	Rank:                       sql.SensitivityLabelRankNone,
	LabelName:                  pulumi.String("string"),
	LabelId:                    pulumi.String("string"),
	SensitivityLabelSource:     pulumi.String("string"),
	InformationTypeId:          pulumi.String("string"),
	ClientClassificationSource: pulumi.String("string"),
})
var sensitivityLabelResource = new SensitivityLabel("sensitivityLabelResource", SensitivityLabelArgs.builder()
    .resourceGroupName("string")
    .columnName("string")
    .databaseName("string")
    .tableName("string")
    .serverName("string")
    .schemaName("string")
    .informationType("string")
    .rank("None")
    .labelName("string")
    .labelId("string")
    .sensitivityLabelSource("string")
    .informationTypeId("string")
    .clientClassificationSource("string")
    .build());
sensitivity_label_resource = azure_native.sql.SensitivityLabel("sensitivityLabelResource",
    resource_group_name="string",
    column_name="string",
    database_name="string",
    table_name="string",
    server_name="string",
    schema_name="string",
    information_type="string",
    rank=azure_native.sql.SensitivityLabelRank.NONE,
    label_name="string",
    label_id="string",
    sensitivity_label_source="string",
    information_type_id="string",
    client_classification_source="string")
const sensitivityLabelResource = new azure_native.sql.SensitivityLabel("sensitivityLabelResource", {
    resourceGroupName: "string",
    columnName: "string",
    databaseName: "string",
    tableName: "string",
    serverName: "string",
    schemaName: "string",
    informationType: "string",
    rank: azure_native.sql.SensitivityLabelRank.None,
    labelName: "string",
    labelId: "string",
    sensitivityLabelSource: "string",
    informationTypeId: "string",
    clientClassificationSource: "string",
});
type: azure-native:sql:SensitivityLabel
properties:
    clientClassificationSource: string
    columnName: string
    databaseName: string
    informationType: string
    informationTypeId: string
    labelId: string
    labelName: string
    rank: None
    resourceGroupName: string
    schemaName: string
    sensitivityLabelSource: string
    serverName: string
    tableName: string
SensitivityLabel Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SensitivityLabel resource accepts the following input properties:
- Column
Name string - The name of the column.
 - 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.
 - Schema
Name string - The name of the schema.
 - Server
Name string - The name of the server.
 - Table
Name string - The name of the table.
 - Client
Classification string | Pulumi.Source Azure Native. Sql. Client Classification Source  - Information
Type string - The information type.
 - Information
Type stringId  - The information type ID.
 - Label
Id string - The label ID.
 - Label
Name string - The label name.
 - Rank
Pulumi.
Azure Native. Sql. Sensitivity Label Rank  - Sensitivity
Label stringSource  - The source of the sensitivity label.
 
- Column
Name string - The name of the column.
 - 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.
 - Schema
Name string - The name of the schema.
 - Server
Name string - The name of the server.
 - Table
Name string - The name of the table.
 - Client
Classification string | ClientSource Classification Source  - Information
Type string - The information type.
 - Information
Type stringId  - The information type ID.
 - Label
Id string - The label ID.
 - Label
Name string - The label name.
 - Rank
Sensitivity
Label Rank  - Sensitivity
Label stringSource  - The source of the sensitivity label.
 
- column
Name String - The name of the column.
 - 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.
 - schema
Name String - The name of the schema.
 - server
Name String - The name of the server.
 - table
Name String - The name of the table.
 - client
Classification String | ClientSource Classification Source  - information
Type String - The information type.
 - information
Type StringId  - The information type ID.
 - label
Id String - The label ID.
 - label
Name String - The label name.
 - rank
Sensitivity
Label Rank  - sensitivity
Label StringSource  - The source of the sensitivity label.
 
- column
Name string - The name of the column.
 - 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.
 - schema
Name string - The name of the schema.
 - server
Name string - The name of the server.
 - table
Name string - The name of the table.
 - client
Classification string | ClientSource Classification Source  - information
Type string - The information type.
 - information
Type stringId  - The information type ID.
 - label
Id string - The label ID.
 - label
Name string - The label name.
 - rank
Sensitivity
Label Rank  - sensitivity
Label stringSource  - The source of the sensitivity label.
 
- column_
name str - The name of the column.
 - 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.
 - schema_
name str - The name of the schema.
 - server_
name str - The name of the server.
 - table_
name str - The name of the table.
 - client_
classification_ str | Clientsource Classification Source  - information_
type str - The information type.
 - information_
type_ strid  - The information type ID.
 - label_
id str - The label ID.
 - label_
name str - The label name.
 - rank
Sensitivity
Label Rank  - sensitivity_
label_ strsource  - The source of the sensitivity label.
 
- column
Name String - The name of the column.
 - 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.
 - schema
Name String - The name of the schema.
 - server
Name String - The name of the server.
 - table
Name String - The name of the table.
 - client
Classification String | "None" | "Native" | "Recommended" | "MIP"Source  - information
Type String - The information type.
 - information
Type StringId  - The information type ID.
 - label
Id String - The label ID.
 - label
Name String - The label name.
 - rank "None" | "Low" | "Medium" | "High" | "Critical"
 - sensitivity
Label StringSource  - The source of the sensitivity label.
 
Outputs
All input properties are implicitly available as output properties. Additionally, the SensitivityLabel resource produces the following output properties:
- Azure
Api stringVersion  - The Azure API version of the resource.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Is
Disabled bool - Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.
 - Managed
By string - Resource that manages the sensitivity label.
 - Name string
 - Resource name.
 - Type string
 - Resource type.
 
- Azure
Api stringVersion  - The Azure API version of the resource.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Is
Disabled bool - Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.
 - Managed
By string - Resource that manages the sensitivity label.
 - Name string
 - Resource name.
 - Type string
 - Resource type.
 
- azure
Api StringVersion  - The Azure API version of the resource.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - is
Disabled Boolean - Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.
 - managed
By String - Resource that manages the sensitivity label.
 - name String
 - Resource name.
 - type String
 - Resource type.
 
- azure
Api stringVersion  - The Azure API version of the resource.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - is
Disabled boolean - Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.
 - managed
By string - Resource that manages the sensitivity label.
 - name string
 - Resource name.
 - type string
 - Resource type.
 
- azure_
api_ strversion  - The Azure API version of the resource.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - is_
disabled bool - Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.
 - managed_
by str - Resource that manages the sensitivity label.
 - name str
 - Resource name.
 - type str
 - Resource type.
 
- azure
Api StringVersion  - The Azure API version of the resource.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - is
Disabled Boolean - Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not.
 - managed
By String - Resource that manages the sensitivity label.
 - name String
 - Resource name.
 - type String
 - Resource type.
 
Supporting Types
ClientClassificationSource, ClientClassificationSourceArgs      
- None
 - None
 - Native
 - Native
 - Recommended
 - Recommended
 - MIP
 - MIP
 
- Client
Classification Source None  - None
 - Client
Classification Source Native  - Native
 - Client
Classification Source Recommended  - Recommended
 - Client
Classification Source MIP  - MIP
 
- None
 - None
 - Native
 - Native
 - Recommended
 - Recommended
 - MIP
 - MIP
 
- None
 - None
 - Native
 - Native
 - Recommended
 - Recommended
 - MIP
 - MIP
 
- NONE
 - None
 - NATIVE
 - Native
 - RECOMMENDED
 - Recommended
 - MIP
 - MIP
 
- "None"
 - None
 - "Native"
 - Native
 - "Recommended"
 - Recommended
 - "MIP"
 - MIP
 
SensitivityLabelRank, SensitivityLabelRankArgs      
- None
 - None
 - Low
 - Low
 - Medium
 - Medium
 - High
 - High
 - Critical
 - Critical
 
- Sensitivity
Label Rank None  - None
 - Sensitivity
Label Rank Low  - Low
 - Sensitivity
Label Rank Medium  - Medium
 - Sensitivity
Label Rank High  - High
 - Sensitivity
Label Rank Critical  - Critical
 
- None
 - None
 - Low
 - Low
 - Medium
 - Medium
 - High
 - High
 - Critical
 - Critical
 
- None
 - None
 - Low
 - Low
 - Medium
 - Medium
 - High
 - High
 - Critical
 - Critical
 
- NONE
 - None
 - LOW
 - Low
 - MEDIUM
 - Medium
 - HIGH
 - High
 - CRITICAL
 - Critical
 
- "None"
 - None
 - "Low"
 - Low
 - "Medium"
 - Medium
 - "High"
 - High
 - "Critical"
 - Critical
 
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:sql:SensitivityLabel current /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
 - Azure Native pulumi/pulumi-azure-native
 - License
 - Apache-2.0