Target Args
data class TargetArgs(val connectionServerName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val targetAuthenticationType: Output<Either<String, TargetAuthenticationType>>? = null, val targetName: Output<String>? = null, val targetType: Output<String>? = null, val targetVault: Output<VaultSecretArgs>? = null, val watcherName: Output<String>? = null) : ConvertibleToJava<TargetArgs>
Concrete proxy resource types can be created by aliasing this type using a specific property type. Azure REST API version: 2023-09-01-preview.
Example Usage
Targets_CreateOrUpdate
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",
});
});
Content copied to clipboard
package main
import (
"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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:databasewatcher:Target monitoringh22eed /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(connectionServerName: Output<String>? = null, resourceGroupName: Output<String>? = null, targetAuthenticationType: Output<Either<String, TargetAuthenticationType>>? = null, targetName: Output<String>? = null, targetType: Output<String>? = null, targetVault: Output<VaultSecretArgs>? = null, watcherName: Output<String>? = null)
Properties
Link copied to clipboard
The server name to use in the connection string when connecting to a target. Port number and instance name must be specified separately.
Link copied to clipboard
The name of the resource group. The name is case insensitive.
Link copied to clipboard
The type of authentication to use when connecting to a target.
Link copied to clipboard
The target resource name.
Link copied to clipboard
Discriminator property for TargetProperties.
Link copied to clipboard
To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
Link copied to clipboard
The database watcher name.