1. Packages
  2. Azure Native
  3. API Docs
  4. databasewatcher
  5. AlertRuleResource
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

azure-native.databasewatcher.AlertRuleResource

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

    Concrete proxy resource types can be created by aliasing this type using a specific property type. Azure REST API version: 2024-07-19-preview.

    Other available API versions: 2024-10-01-preview.

    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 pulumi
    import pulumi_azure_native as azure_native
    
    alert_rule_resource = azure_native.databasewatcher.AlertRuleResource("alertRuleResource",
        alert_rule_resource_id="/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
        alert_rule_resource_name="testAlert",
        alert_rule_template_id="someTemplateId",
        alert_rule_template_version="1.0",
        created_with_properties=azure_native.databasewatcher.AlertRuleCreationProperties.CREATED_WITH_ACTION_GROUP,
        creation_time="2024-07-25T15:38:47.798Z",
        resource_group_name="rgWatcher",
        watcher_name="testWatcher")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const alertRuleResource = new azure_native.databasewatcher.AlertRuleResource("alertRuleResource", {
        alertRuleResourceId: "/subscriptions/469DD77C-C8DB-47B7-B9E1-72D29F8C878Be/resourceGroups/rgWatcher/providers/microsoft.insights/scheduledqueryrules/alerts-demo",
        alertRuleResourceName: "testAlert",
        alertRuleTemplateId: "someTemplateId",
        alertRuleTemplateVersion: "1.0",
        createdWithProperties: azure_native.databasewatcher.AlertRuleCreationProperties.CreatedWithActionGroup,
        creationTime: "2024-07-25T15:38:47.798Z",
        resourceGroupName: "rgWatcher",
        watcherName: "testWatcher",
    });
    
    resources:
      alertRuleResource:
        type: azure-native:databasewatcher:AlertRuleResource
        properties:
          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
    

    Create AlertRuleResource Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AlertRuleResource(name: string, args: AlertRuleResourceArgs, opts?: CustomResourceOptions);
    @overload
    def AlertRuleResource(resource_name: str,
                          args: AlertRuleResourceArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def AlertRuleResource(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          alert_rule_resource_id: Optional[str] = None,
                          alert_rule_template_id: Optional[str] = None,
                          alert_rule_template_version: Optional[str] = None,
                          created_with_properties: Optional[Union[str, AlertRuleCreationProperties]] = None,
                          creation_time: Optional[str] = None,
                          resource_group_name: Optional[str] = None,
                          watcher_name: Optional[str] = None,
                          alert_rule_resource_name: Optional[str] = None)
    func NewAlertRuleResource(ctx *Context, name string, args AlertRuleResourceArgs, opts ...ResourceOption) (*AlertRuleResource, error)
    public AlertRuleResource(string name, AlertRuleResourceArgs args, CustomResourceOptions? opts = null)
    public AlertRuleResource(String name, AlertRuleResourceArgs args)
    public AlertRuleResource(String name, AlertRuleResourceArgs args, CustomResourceOptions options)
    
    type: azure-native:databasewatcher:AlertRuleResource
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AlertRuleResourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AlertRuleResourceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AlertRuleResourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertRuleResourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertRuleResourceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var alertRuleResourceResource = new AzureNative.DatabaseWatcher.AlertRuleResource("alertRuleResourceResource", new()
    {
        AlertRuleResourceId = "string",
        AlertRuleTemplateId = "string",
        AlertRuleTemplateVersion = "string",
        CreatedWithProperties = "string",
        CreationTime = "string",
        ResourceGroupName = "string",
        WatcherName = "string",
        AlertRuleResourceName = "string",
    });
    
    example, err := databasewatcher.NewAlertRuleResource(ctx, "alertRuleResourceResource", &databasewatcher.AlertRuleResourceArgs{
    	AlertRuleResourceId:      pulumi.String("string"),
    	AlertRuleTemplateId:      pulumi.String("string"),
    	AlertRuleTemplateVersion: pulumi.String("string"),
    	CreatedWithProperties:    pulumi.String("string"),
    	CreationTime:             pulumi.String("string"),
    	ResourceGroupName:        pulumi.String("string"),
    	WatcherName:              pulumi.String("string"),
    	AlertRuleResourceName:    pulumi.String("string"),
    })
    
    var alertRuleResourceResource = new AlertRuleResource("alertRuleResourceResource", AlertRuleResourceArgs.builder()
        .alertRuleResourceId("string")
        .alertRuleTemplateId("string")
        .alertRuleTemplateVersion("string")
        .createdWithProperties("string")
        .creationTime("string")
        .resourceGroupName("string")
        .watcherName("string")
        .alertRuleResourceName("string")
        .build());
    
    alert_rule_resource_resource = azure_native.databasewatcher.AlertRuleResource("alertRuleResourceResource",
        alert_rule_resource_id="string",
        alert_rule_template_id="string",
        alert_rule_template_version="string",
        created_with_properties="string",
        creation_time="string",
        resource_group_name="string",
        watcher_name="string",
        alert_rule_resource_name="string")
    
    const alertRuleResourceResource = new azure_native.databasewatcher.AlertRuleResource("alertRuleResourceResource", {
        alertRuleResourceId: "string",
        alertRuleTemplateId: "string",
        alertRuleTemplateVersion: "string",
        createdWithProperties: "string",
        creationTime: "string",
        resourceGroupName: "string",
        watcherName: "string",
        alertRuleResourceName: "string",
    });
    
    type: azure-native:databasewatcher:AlertRuleResource
    properties:
        alertRuleResourceId: string
        alertRuleResourceName: string
        alertRuleTemplateId: string
        alertRuleTemplateVersion: string
        createdWithProperties: string
        creationTime: string
        resourceGroupName: string
        watcherName: string
    

    AlertRuleResource Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AlertRuleResource resource accepts the following input properties:

    AlertRuleResourceId string
    The resource ID of the alert rule resource.
    AlertRuleTemplateId string
    The template ID associated with alert rule resource.
    AlertRuleTemplateVersion string
    The alert rule template version.
    CreatedWithProperties string | Pulumi.AzureNative.DatabaseWatcher.AlertRuleCreationProperties
    The properties with which the alert rule resource was created.
    CreationTime string
    The creation time of the alert rule resource.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    WatcherName string
    The database watcher name.
    AlertRuleResourceName string
    The alert rule proxy resource name.
    AlertRuleResourceId string
    The resource ID of the alert rule resource.
    AlertRuleTemplateId string
    The template ID associated with alert rule resource.
    AlertRuleTemplateVersion string
    The alert rule template version.
    CreatedWithProperties string | AlertRuleCreationProperties
    The properties with which the alert rule resource was created.
    CreationTime string
    The creation time of the alert rule resource.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    WatcherName string
    The database watcher name.
    AlertRuleResourceName string
    The alert rule proxy resource name.
    alertRuleResourceId String
    The resource ID of the alert rule resource.
    alertRuleTemplateId String
    The template ID associated with alert rule resource.
    alertRuleTemplateVersion String
    The alert rule template version.
    createdWithProperties String | AlertRuleCreationProperties
    The properties with which the alert rule resource was created.
    creationTime String
    The creation time of the alert rule resource.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    watcherName String
    The database watcher name.
    alertRuleResourceName String
    The alert rule proxy resource name.
    alertRuleResourceId string
    The resource ID of the alert rule resource.
    alertRuleTemplateId string
    The template ID associated with alert rule resource.
    alertRuleTemplateVersion string
    The alert rule template version.
    createdWithProperties string | AlertRuleCreationProperties
    The properties with which the alert rule resource was created.
    creationTime string
    The creation time of the alert rule resource.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    watcherName string
    The database watcher name.
    alertRuleResourceName string
    The alert rule proxy resource name.
    alert_rule_resource_id str
    The resource ID of the alert rule resource.
    alert_rule_template_id str
    The template ID associated with alert rule resource.
    alert_rule_template_version str
    The alert rule template version.
    created_with_properties str | AlertRuleCreationProperties
    The properties with which the alert rule resource was created.
    creation_time str
    The creation time of the alert rule resource.
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    watcher_name str
    The database watcher name.
    alert_rule_resource_name str
    The alert rule proxy resource name.
    alertRuleResourceId String
    The resource ID of the alert rule resource.
    alertRuleTemplateId String
    The template ID associated with alert rule resource.
    alertRuleTemplateVersion String
    The alert rule template version.
    createdWithProperties String | "CreatedWithActionGroup" | "None"
    The properties with which the alert rule resource was created.
    creationTime String
    The creation time of the alert rule resource.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    watcherName String
    The database watcher name.
    alertRuleResourceName String
    The alert rule proxy resource name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AlertRuleResource resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    ProvisioningState string
    The provisioning state of the alert rule resource.
    SystemData Pulumi.AzureNative.DatabaseWatcher.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    ProvisioningState string
    The provisioning state of the alert rule resource.
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    provisioningState String
    The provisioning state of the alert rule resource.
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    provisioningState string
    The provisioning state of the alert rule resource.
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource
    provisioning_state str
    The provisioning state of the alert rule resource.
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    provisioningState String
    The provisioning state of the alert rule resource.
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Supporting Types

    AlertRuleCreationProperties, AlertRuleCreationPropertiesArgs

    CreatedWithActionGroup
    CreatedWithActionGroupThe alert rule was created with an action group.
    None
    NoneThe alert rule was created with no properties.
    AlertRuleCreationPropertiesCreatedWithActionGroup
    CreatedWithActionGroupThe alert rule was created with an action group.
    AlertRuleCreationPropertiesNone
    NoneThe alert rule was created with no properties.
    CreatedWithActionGroup
    CreatedWithActionGroupThe alert rule was created with an action group.
    None
    NoneThe alert rule was created with no properties.
    CreatedWithActionGroup
    CreatedWithActionGroupThe alert rule was created with an action group.
    None
    NoneThe alert rule was created with no properties.
    CREATED_WITH_ACTION_GROUP
    CreatedWithActionGroupThe alert rule was created with an action group.
    NONE
    NoneThe alert rule was created with no properties.
    "CreatedWithActionGroup"
    CreatedWithActionGroupThe alert rule was created with an action group.
    "None"
    NoneThe alert rule was created with no properties.

    SystemDataResponse, SystemDataResponseArgs

    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    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} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi