Watcher Args
The DatabaseWatcherProviderHub resource. 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
Watchers_CreateOrUpdate - generated by MaximumSet rule
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var watcher = new AzureNative.DatabaseWatcher.Watcher("watcher", new()
{
Datastore = new AzureNative.DatabaseWatcher.Inputs.DatastoreArgs
{
AdxClusterResourceId = "/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto",
KustoClusterDisplayName = "kustoUri-adx",
KustoClusterUri = "https://kustouri-adx.eastus.kusto.windows.net",
KustoDataIngestionUri = "https://ingest-kustouri-adx.eastus.kusto.windows.net",
KustoDatabaseName = "kustoDatabaseName1",
KustoManagementUrl = "https://portal.azure.com/",
KustoOfferingType = AzureNative.DatabaseWatcher.KustoOfferingType.Adx,
},
DefaultAlertRuleIdentityResourceId = "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest",
Identity = new AzureNative.DatabaseWatcher.Inputs.ManagedServiceIdentityArgs
{
Type = AzureNative.DatabaseWatcher.ManagedServiceIdentityType.SystemAssigned,
},
Location = "eastus2euap",
ResourceGroupName = "rgWatcher",
Tags = null,
WatcherName = "testWatcher",
});
});
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.NewWatcher(ctx, "watcher", &databasewatcher.WatcherArgs{
Datastore: &databasewatcher.DatastoreArgs{
AdxClusterResourceId: pulumi.String("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto"),
KustoClusterDisplayName: pulumi.String("kustoUri-adx"),
KustoClusterUri: pulumi.String("https://kustouri-adx.eastus.kusto.windows.net"),
KustoDataIngestionUri: pulumi.String("https://ingest-kustouri-adx.eastus.kusto.windows.net"),
KustoDatabaseName: pulumi.String("kustoDatabaseName1"),
KustoManagementUrl: pulumi.String("https://portal.azure.com/"),
KustoOfferingType: pulumi.String(databasewatcher.KustoOfferingTypeAdx),
},
DefaultAlertRuleIdentityResourceId: pulumi.String("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest"),
Identity: &databasewatcher.ManagedServiceIdentityArgs{
Type: pulumi.String(databasewatcher.ManagedServiceIdentityTypeSystemAssigned),
},
Location: pulumi.String("eastus2euap"),
ResourceGroupName: pulumi.String("rgWatcher"),
Tags: pulumi.StringMap{},
WatcherName: pulumi.String("testWatcher"),
})
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.Watcher;
import com.pulumi.azurenative.databasewatcher.WatcherArgs;
import com.pulumi.azurenative.databasewatcher.inputs.DatastoreArgs;
import com.pulumi.azurenative.databasewatcher.inputs.ManagedServiceIdentityArgs;
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 watcher = new Watcher("watcher", WatcherArgs.builder()
.datastore(DatastoreArgs.builder()
.adxClusterResourceId("/subscriptions/49e0fbd3-75e8-44e7-96fd-5b64d9ad818d/resourceGroups/apiTest/providers/Microsoft.Kusto/clusters/apiTestKusto")
.kustoClusterDisplayName("kustoUri-adx")
.kustoClusterUri("https://kustouri-adx.eastus.kusto.windows.net")
.kustoDataIngestionUri("https://ingest-kustouri-adx.eastus.kusto.windows.net")
.kustoDatabaseName("kustoDatabaseName1")
.kustoManagementUrl("https://portal.azure.com/")
.kustoOfferingType("adx")
.build())
.defaultAlertRuleIdentityResourceId("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878B/resourceGroups/rgWatcher/providers/Microsoft.ManagedIdentity/userAssignedIdentities/3pmtest")
.identity(ManagedServiceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.location("eastus2euap")
.resourceGroupName("rgWatcher")
.tags()
.watcherName("testWatcher")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:databasewatcher:Watcher myWatcher /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}
Constructors
Properties
The data store for collected monitoring data.
The resource ID of a user-assigned managed identity that will be assigned to a new alert rule.
The managed service identities assigned to this resource.
The name of the resource group. The name is case insensitive.
The database watcher name.