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.databasewatcher.kotlin
import com.pulumi.azurenative.databasewatcher.TargetArgs.builder
import com.pulumi.azurenative.databasewatcher.kotlin.enums.TargetAuthenticationType
import com.pulumi.azurenative.databasewatcher.kotlin.inputs.VaultSecretArgs
import com.pulumi.azurenative.databasewatcher.kotlin.inputs.VaultSecretArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Concrete proxy resource types can be created by aliasing this type using a specific property type.
* Azure REST API version: 2023-09-01-preview.
* Other available API versions: 2024-07-19-preview.
* ## Example Usage
* ### Targets_CreateOrUpdate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var target = new AzureNative.DatabaseWatcher.Target("target", new()
* {
* ConnectionServerName = "sqlServero1ihe2",
* ResourceGroupName = "apiTest-ddat4p",
* TargetAuthenticationType = AzureNative.DatabaseWatcher.TargetAuthenticationType.Aad,
* TargetName = "monitoringh22eed",
* TargetType = "SqlDb",
* WatcherName = "databasemo3ej9ih",
* });
* });
* ```
* ```go
* package main
* import (
* databasewatcher "github.com/pulumi/pulumi-azure-native-sdk/databasewatcher/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := databasewatcher.NewTarget(ctx, "target", &databasewatcher.TargetArgs{
* ConnectionServerName: pulumi.String("sqlServero1ihe2"),
* ResourceGroupName: pulumi.String("apiTest-ddat4p"),
* TargetAuthenticationType: pulumi.String(databasewatcher.TargetAuthenticationTypeAad),
* TargetName: pulumi.String("monitoringh22eed"),
* TargetType: pulumi.String("SqlDb"),
* WatcherName: pulumi.String("databasemo3ej9ih"),
* })
* 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.databasewatcher.Target;
* import com.pulumi.azurenative.databasewatcher.TargetArgs;
* 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 target = new Target("target", TargetArgs.builder()
* .connectionServerName("sqlServero1ihe2")
* .resourceGroupName("apiTest-ddat4p")
* .targetAuthenticationType("Aad")
* .targetName("monitoringh22eed")
* .targetType("SqlDb")
* .watcherName("databasemo3ej9ih")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:databasewatcher:Target monitoringh22eed /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName}
* ```
* @property connectionServerName The server name to use in the connection string when connecting to a target. Port number and instance name must be specified separately.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property targetAuthenticationType The type of authentication to use when connecting to a target.
* @property targetName The target resource name.
* @property targetType Discriminator property for TargetProperties.
* @property targetVault To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
* @property watcherName The database watcher name.
*/
public data class TargetArgs(
public val connectionServerName: Output? = null,
public val resourceGroupName: Output? = null,
public val targetAuthenticationType: Output>? = null,
public val targetName: Output? = null,
public val targetType: Output? = null,
public val targetVault: Output? = null,
public val watcherName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.databasewatcher.TargetArgs =
com.pulumi.azurenative.databasewatcher.TargetArgs.builder()
.connectionServerName(connectionServerName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.targetAuthenticationType(
targetAuthenticationType?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.targetName(targetName?.applyValue({ args0 -> args0 }))
.targetType(targetType?.applyValue({ args0 -> args0 }))
.targetVault(targetVault?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.watcherName(watcherName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [TargetArgs].
*/
@PulumiTagMarker
public class TargetArgsBuilder internal constructor() {
private var connectionServerName: Output? = null
private var resourceGroupName: Output? = null
private var targetAuthenticationType: Output>? = null
private var targetName: Output? = null
private var targetType: Output? = null
private var targetVault: Output? = null
private var watcherName: Output? = null
/**
* @param value The server name to use in the connection string when connecting to a target. Port number and instance name must be specified separately.
*/
@JvmName("bfuokbydanghyaju")
public suspend fun connectionServerName(`value`: Output) {
this.connectionServerName = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("ieqxauhnyepkyvdu")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The type of authentication to use when connecting to a target.
*/
@JvmName("ggaaqhqpcvunsuxq")
public suspend fun targetAuthenticationType(`value`: Output>) {
this.targetAuthenticationType = value
}
/**
* @param value The target resource name.
*/
@JvmName("rhngjxkugcqxqndo")
public suspend fun targetName(`value`: Output) {
this.targetName = value
}
/**
* @param value Discriminator property for TargetProperties.
*/
@JvmName("aibhriicledoohwb")
public suspend fun targetType(`value`: Output) {
this.targetType = value
}
/**
* @param value To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
*/
@JvmName("eyhpacwtfxxbravk")
public suspend fun targetVault(`value`: Output) {
this.targetVault = value
}
/**
* @param value The database watcher name.
*/
@JvmName("hsmlpvjdsfaushdq")
public suspend fun watcherName(`value`: Output) {
this.watcherName = value
}
/**
* @param value The server name to use in the connection string when connecting to a target. Port number and instance name must be specified separately.
*/
@JvmName("hgjenxltycuvldtc")
public suspend fun connectionServerName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.connectionServerName = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("dyqncqlbneejinll")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The type of authentication to use when connecting to a target.
*/
@JvmName("uwwrmdcsqtxjtrns")
public suspend fun targetAuthenticationType(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetAuthenticationType = mapped
}
/**
* @param value The type of authentication to use when connecting to a target.
*/
@JvmName("tmpotpbkjjqnyuns")
public fun targetAuthenticationType(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.targetAuthenticationType = mapped
}
/**
* @param value The type of authentication to use when connecting to a target.
*/
@JvmName("ivlklvrrhksdxhtw")
public fun targetAuthenticationType(`value`: TargetAuthenticationType) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.targetAuthenticationType = mapped
}
/**
* @param value The target resource name.
*/
@JvmName("eaphpummcalwwcsb")
public suspend fun targetName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetName = mapped
}
/**
* @param value Discriminator property for TargetProperties.
*/
@JvmName("kwbqmblvujnracwb")
public suspend fun targetType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetType = mapped
}
/**
* @param value To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
*/
@JvmName("ykdtgjrlteprpssg")
public suspend fun targetVault(`value`: VaultSecretArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetVault = mapped
}
/**
* @param argument To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
*/
@JvmName("pjhushreqrajefin")
public suspend fun targetVault(argument: suspend VaultSecretArgsBuilder.() -> Unit) {
val toBeMapped = VaultSecretArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.targetVault = mapped
}
/**
* @param value The database watcher name.
*/
@JvmName("hgoyfjekhhqksjes")
public suspend fun watcherName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.watcherName = mapped
}
internal fun build(): TargetArgs = TargetArgs(
connectionServerName = connectionServerName,
resourceGroupName = resourceGroupName,
targetAuthenticationType = targetAuthenticationType,
targetName = targetName,
targetType = targetType,
targetVault = targetVault,
watcherName = watcherName,
)
}