AlertRuleResourceArgs

data class AlertRuleResourceArgs(val alertRuleResourceId: Output<String>? = null, val alertRuleResourceName: Output<String>? = null, val alertRuleTemplateId: Output<String>? = null, val alertRuleTemplateVersion: Output<String>? = null, val createdWithProperties: Output<Either<String, AlertRuleCreationProperties>>? = null, val creationTime: Output<String>? = null, val resourceGroupName: Output<String>? = null, val watcherName: Output<String>? = null) : ConvertibleToJava<AlertRuleResourceArgs>

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 2024-07-19-preview. Other available API versions: 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

AlertRuleResources_CreateOrUpdate - generated by MaximumSet rule

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var alertRuleResource = new AzureNative.DatabaseWatcher.AlertRuleResource("alertRuleResource", new()
{
AlertRuleResourceId = "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
AlertRuleResourceName = "testAlert",
AlertRuleTemplateId = "someTemplateId",
AlertRuleTemplateVersion = "1.0",
CreatedWithProperties = AzureNative.DatabaseWatcher.AlertRuleCreationProperties.CreatedWithActionGroup,
CreationTime = "2024-07-25T15:38:47.798Z",
ResourceGroupName = "rgWatcher",
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.NewAlertRuleResource(ctx, "alertRuleResource", &databasewatcher.AlertRuleResourceArgs{
AlertRuleResourceId: pulumi.String("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo"),
AlertRuleResourceName: pulumi.String("testAlert"),
AlertRuleTemplateId: pulumi.String("someTemplateId"),
AlertRuleTemplateVersion: pulumi.String("1.0"),
CreatedWithProperties: pulumi.String(databasewatcher.AlertRuleCreationPropertiesCreatedWithActionGroup),
CreationTime: pulumi.String("2024-07-25T15:38:47.798Z"),
ResourceGroupName: pulumi.String("rgWatcher"),
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.AlertRuleResource;
import com.pulumi.azurenative.databasewatcher.AlertRuleResourceArgs;
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 alertRuleResource = new AlertRuleResource("alertRuleResource", AlertRuleResourceArgs.builder()
.alertRuleResourceId("/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo")
.alertRuleResourceName("testAlert")
.alertRuleTemplateId("someTemplateId")
.alertRuleTemplateVersion("1.0")
.createdWithProperties("CreatedWithActionGroup")
.creationTime("2024-07-25T15:38:47.798Z")
.resourceGroupName("rgWatcher")
.watcherName("testWatcher")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:databasewatcher:AlertRuleResource testAlert /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseWatcher/watchers/{watcherName}/alertRuleResources/{alertRuleResourceName}

Constructors

Link copied to clipboard
constructor(alertRuleResourceId: Output<String>? = null, alertRuleResourceName: Output<String>? = null, alertRuleTemplateId: Output<String>? = null, alertRuleTemplateVersion: Output<String>? = null, createdWithProperties: Output<Either<String, AlertRuleCreationProperties>>? = null, creationTime: Output<String>? = null, resourceGroupName: Output<String>? = null, watcherName: Output<String>? = null)

Properties

Link copied to clipboard
val alertRuleResourceId: Output<String>? = null

The resource ID of the alert rule resource.

Link copied to clipboard
val alertRuleResourceName: Output<String>? = null

The alert rule proxy resource name.

Link copied to clipboard
val alertRuleTemplateId: Output<String>? = null

The template ID associated with alert rule resource.

Link copied to clipboard
val alertRuleTemplateVersion: Output<String>? = null

The alert rule template version.

Link copied to clipboard

The properties with which the alert rule resource was created.

Link copied to clipboard
val creationTime: Output<String>? = null

The creation time of the alert rule resource.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val watcherName: Output<String>? = null

The database watcher name.

Functions

Link copied to clipboard
open override fun toJava(): AlertRuleResourceArgs