AlertRuleResource

class AlertRuleResource : KotlinCustomResource

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}

Properties

Link copied to clipboard

The resource ID of the alert rule resource.

Link copied to clipboard

The template ID associated with alert rule resource.

Link copied to clipboard

The alert rule template version.

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard

The properties with which the alert rule resource was created.

Link copied to clipboard
val creationTime: Output<String>

The creation time of the alert rule resource.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

The provisioning state of the alert rule resource.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>