Target Args
Concrete proxy resource types can be created by aliasing this type using a specific property type. Uses Azure REST API version 2024-10-01-preview. In version 2.x of the Azure Native provider, it used API version 2023-09-01-preview. Other available API versions: 2023-09-01-preview, 2024-07-19-preview, 2025-01-02. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native databasewatcher [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Targets_CreateOrUpdate - generated by MaximumSet rule
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",
});
});
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
})
}
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.
$ pulumi import azure-native:databasewatcher:Target monitoringzkndgm /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/targets/{targetName}
Constructors
Properties
The FQDN host name of the server to use in the connection string when connecting to a target. For example, for an Azure SQL logical server in the Azure commercial cloud, the value might be 'sql-logical-server-22092780.database.windows.net'; for an Azure SQL managed instance in the Azure commercial cloud, the value might be 'sql-mi-39441134.767d5869f605.database.windows.net'. Port number and instance name must be specified separately.
The name of the resource group. The name is case insensitive.
The type of authentication to use when connecting to a target.
The target resource name.
Discriminator property for TargetProperties.
To use SQL authentication when connecting to targets, specify the vault where the login name and password secrets are stored.
The database watcher name.