Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.sql.kotlin
import com.pulumi.azurenative.sql.SensitivityLabelArgs.builder
import com.pulumi.azurenative.sql.kotlin.enums.SensitivityLabelRank
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* A sensitivity label.
* Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.
* Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview.
* ## Example Usage
* ### Updates the sensitivity label of a given column with all parameters
* ```csharp
* 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()
* {
* 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",
* });
* });
* ```
* ```go
* 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.NewSensitivityLabel(ctx, "sensitivityLabel", &sql.SensitivityLabelArgs{
* 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
* })
* }
* ```
* ```java
* 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()
* .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
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ 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}
* ```
* @property columnName The name of the column.
* @property databaseName The name of the database.
* @property informationType The information type.
* @property informationTypeId The information type ID.
* @property labelId The label ID.
* @property labelName The label name.
* @property rank
* @property resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @property schemaName The name of the schema.
* @property sensitivityLabelSource The source of the sensitivity label.
* @property serverName The name of the server.
* @property tableName The name of the table.
*/
public data class SensitivityLabelArgs(
public val columnName: Output? = null,
public val databaseName: Output? = null,
public val informationType: Output? = null,
public val informationTypeId: Output? = null,
public val labelId: Output? = null,
public val labelName: Output? = null,
public val rank: Output? = null,
public val resourceGroupName: Output? = null,
public val schemaName: Output? = null,
public val sensitivityLabelSource: Output? = null,
public val serverName: Output? = null,
public val tableName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.sql.SensitivityLabelArgs =
com.pulumi.azurenative.sql.SensitivityLabelArgs.builder()
.columnName(columnName?.applyValue({ args0 -> args0 }))
.databaseName(databaseName?.applyValue({ args0 -> args0 }))
.informationType(informationType?.applyValue({ args0 -> args0 }))
.informationTypeId(informationTypeId?.applyValue({ args0 -> args0 }))
.labelId(labelId?.applyValue({ args0 -> args0 }))
.labelName(labelName?.applyValue({ args0 -> args0 }))
.rank(rank?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.schemaName(schemaName?.applyValue({ args0 -> args0 }))
.sensitivityLabelSource(sensitivityLabelSource?.applyValue({ args0 -> args0 }))
.serverName(serverName?.applyValue({ args0 -> args0 }))
.tableName(tableName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SensitivityLabelArgs].
*/
@PulumiTagMarker
public class SensitivityLabelArgsBuilder internal constructor() {
private var columnName: Output? = null
private var databaseName: Output? = null
private var informationType: Output? = null
private var informationTypeId: Output? = null
private var labelId: Output? = null
private var labelName: Output? = null
private var rank: Output? = null
private var resourceGroupName: Output? = null
private var schemaName: Output? = null
private var sensitivityLabelSource: Output? = null
private var serverName: Output? = null
private var tableName: Output? = null
/**
* @param value The name of the column.
*/
@JvmName("dwxkuoketgqcptpn")
public suspend fun columnName(`value`: Output) {
this.columnName = value
}
/**
* @param value The name of the database.
*/
@JvmName("nddjqfjhrftnrgkg")
public suspend fun databaseName(`value`: Output) {
this.databaseName = value
}
/**
* @param value The information type.
*/
@JvmName("lwyrajmjnfgqkbnp")
public suspend fun informationType(`value`: Output) {
this.informationType = value
}
/**
* @param value The information type ID.
*/
@JvmName("tmlqtlpwpsnnfnag")
public suspend fun informationTypeId(`value`: Output) {
this.informationTypeId = value
}
/**
* @param value The label ID.
*/
@JvmName("ttgrfqawdjhdifwc")
public suspend fun labelId(`value`: Output) {
this.labelId = value
}
/**
* @param value The label name.
*/
@JvmName("pfgpirwsrodyeygj")
public suspend fun labelName(`value`: Output) {
this.labelName = value
}
/**
* @param value
*/
@JvmName("pcvpggrphjaanutk")
public suspend fun rank(`value`: Output) {
this.rank = value
}
/**
* @param value The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
*/
@JvmName("yqyqfmaqhpnseakw")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the schema.
*/
@JvmName("vbqdeduogwmfpbrw")
public suspend fun schemaName(`value`: Output) {
this.schemaName = value
}
/**
* @param value The source of the sensitivity label.
*/
@JvmName("kcltpagosikurmoe")
public suspend fun sensitivityLabelSource(`value`: Output) {
this.sensitivityLabelSource = value
}
/**
* @param value The name of the server.
*/
@JvmName("gopcwwdvoomwhppf")
public suspend fun serverName(`value`: Output) {
this.serverName = value
}
/**
* @param value The name of the table.
*/
@JvmName("nvolrfnsyjupekrd")
public suspend fun tableName(`value`: Output) {
this.tableName = value
}
/**
* @param value The name of the column.
*/
@JvmName("bxjajlptrefaynmr")
public suspend fun columnName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.columnName = mapped
}
/**
* @param value The name of the database.
*/
@JvmName("fxmjsjdsmvtyxwrk")
public suspend fun databaseName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.databaseName = mapped
}
/**
* @param value The information type.
*/
@JvmName("afknilkixuuvduaf")
public suspend fun informationType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.informationType = mapped
}
/**
* @param value The information type ID.
*/
@JvmName("syksowpydqekospk")
public suspend fun informationTypeId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.informationTypeId = mapped
}
/**
* @param value The label ID.
*/
@JvmName("wngqafrgublxmuvm")
public suspend fun labelId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labelId = mapped
}
/**
* @param value The label name.
*/
@JvmName("loiqpogpoyyhvxro")
public suspend fun labelName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labelName = mapped
}
/**
* @param value
*/
@JvmName("xslirxwqmmymbooj")
public suspend fun rank(`value`: SensitivityLabelRank?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.rank = mapped
}
/**
* @param value The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
*/
@JvmName("uwrbolycgrmroarn")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The name of the schema.
*/
@JvmName("cmtsoxtuskoivohv")
public suspend fun schemaName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.schemaName = mapped
}
/**
* @param value The source of the sensitivity label.
*/
@JvmName("ptifuxthlrkbthbn")
public suspend fun sensitivityLabelSource(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sensitivityLabelSource = mapped
}
/**
* @param value The name of the server.
*/
@JvmName("sidruhgdxlhgwshl")
public suspend fun serverName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serverName = mapped
}
/**
* @param value The name of the table.
*/
@JvmName("khautwwobakncddb")
public suspend fun tableName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tableName = mapped
}
internal fun build(): SensitivityLabelArgs = SensitivityLabelArgs(
columnName = columnName,
databaseName = databaseName,
informationType = informationType,
informationTypeId = informationTypeId,
labelId = labelId,
labelName = labelName,
rank = rank,
resourceGroupName = resourceGroupName,
schemaName = schemaName,
sensitivityLabelSource = sensitivityLabelSource,
serverName = serverName,
tableName = tableName,
)
}