1. Packages
  2. Azure Native
  3. API Docs
  4. insights
  5. AlertRule
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.insights.AlertRule

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

    The alert rule resource. Azure REST API version: 2016-03-01. Prior API version in Azure Native 1.x: 2016-03-01.

    Example Usage

    Create or update an alert rule

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var alertRule = new AzureNative.Insights.AlertRule("alertRule", new()
        {
            Actions = new[] {},
            Condition = new AzureNative.Insights.Inputs.ThresholdRuleConditionArgs
            {
                DataSource = new AzureNative.Insights.Inputs.RuleMetricDataSourceArgs
                {
                    MetricName = "Requests",
                    OdataType = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
                    ResourceUri = "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest",
                },
                OdataType = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
                Operator = AzureNative.Insights.ConditionOperator.GreaterThan,
                Threshold = 3,
                TimeAggregation = AzureNative.Insights.TimeAggregationOperator.Total,
                WindowSize = "PT5M",
            },
            Description = "Pura Vida",
            IsEnabled = true,
            Location = "West US",
            Name = "chiricutin",
            ResourceGroupName = "Rac46PostSwapRG",
            RuleName = "chiricutin",
            Tags = null,
        });
    
    });
    
    package main
    
    import (
    	insights "github.com/pulumi/pulumi-azure-native-sdk/insights/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := insights.NewAlertRule(ctx, "alertRule", &insights.AlertRuleArgs{
    			Actions: pulumi.Array{},
    			Condition: &insights.ThresholdRuleConditionArgs{
    				DataSource: insights.RuleMetricDataSource{
    					MetricName:  "Requests",
    					OdataType:   "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
    					ResourceUri: "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest",
    				},
    				OdataType:       pulumi.String("Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition"),
    				Operator:        insights.ConditionOperatorGreaterThan,
    				Threshold:       pulumi.Float64(3),
    				TimeAggregation: insights.TimeAggregationOperatorTotal,
    				WindowSize:      pulumi.String("PT5M"),
    			},
    			Description:       pulumi.String("Pura Vida"),
    			IsEnabled:         pulumi.Bool(true),
    			Location:          pulumi.String("West US"),
    			Name:              pulumi.String("chiricutin"),
    			ResourceGroupName: pulumi.String("Rac46PostSwapRG"),
    			RuleName:          pulumi.String("chiricutin"),
    			Tags:              pulumi.StringMap{},
    		})
    		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.insights.AlertRule;
    import com.pulumi.azurenative.insights.AlertRuleArgs;
    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 alertRule = new AlertRule("alertRule", AlertRuleArgs.builder()
                .actions()
                .condition(LocationThresholdRuleConditionArgs.builder()
                    .dataSource(RuleManagementEventDataSourceArgs.builder()
                        .metricName("Requests")
                        .odataType("Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource")
                        .resourceUri("/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest")
                        .build())
                    .odataType("Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition")
                    .operator("GreaterThan")
                    .threshold(3)
                    .timeAggregation("Total")
                    .windowSize("PT5M")
                    .build())
                .description("Pura Vida")
                .isEnabled(true)
                .location("West US")
                .name("chiricutin")
                .resourceGroupName("Rac46PostSwapRG")
                .ruleName("chiricutin")
                .tags()
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    alert_rule = azure_native.insights.AlertRule("alertRule",
        actions=[],
        condition={
            "data_source": {
                "metric_name": "Requests",
                "odata_type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
                "resource_uri": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest",
            },
            "odata_type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
            "operator": azure_native.insights.ConditionOperator.GREATER_THAN,
            "threshold": 3,
            "time_aggregation": azure_native.insights.TimeAggregationOperator.TOTAL,
            "window_size": "PT5M",
        },
        description="Pura Vida",
        is_enabled=True,
        location="West US",
        name="chiricutin",
        resource_group_name="Rac46PostSwapRG",
        rule_name="chiricutin",
        tags={})
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const alertRule = new azure_native.insights.AlertRule("alertRule", {
        actions: [],
        condition: {
            dataSource: {
                metricName: "Requests",
                odataType: "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
                resourceUri: "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest",
            },
            odataType: "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
            operator: azure_native.insights.ConditionOperator.GreaterThan,
            threshold: 3,
            timeAggregation: azure_native.insights.TimeAggregationOperator.Total,
            windowSize: "PT5M",
        },
        description: "Pura Vida",
        isEnabled: true,
        location: "West US",
        name: "chiricutin",
        resourceGroupName: "Rac46PostSwapRG",
        ruleName: "chiricutin",
        tags: {},
    });
    
    resources:
      alertRule:
        type: azure-native:insights:AlertRule
        properties:
          actions: []
          condition:
            dataSource:
              metricName: Requests
              odataType: Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource
              resourceUri: /subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest
            odataType: Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition
            operator: GreaterThan
            threshold: 3
            timeAggregation: Total
            windowSize: PT5M
          description: Pura Vida
          isEnabled: true
          location: West US
          name: chiricutin
          resourceGroupName: Rac46PostSwapRG
          ruleName: chiricutin
          tags: {}
    

    Create AlertRule Resource

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

    Constructor syntax

    new AlertRule(name: string, args: AlertRuleArgs, opts?: CustomResourceOptions);
    @overload
    def AlertRule(resource_name: str,
                  args: AlertRuleArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AlertRule(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  condition: Optional[Union[LocationThresholdRuleConditionArgs, ManagementEventRuleConditionArgs, ThresholdRuleConditionArgs]] = None,
                  is_enabled: Optional[bool] = None,
                  name: Optional[str] = None,
                  resource_group_name: Optional[str] = None,
                  action: Optional[Union[RuleEmailActionArgs, RuleWebhookActionArgs]] = None,
                  actions: Optional[Sequence[Union[RuleEmailActionArgs, RuleWebhookActionArgs]]] = None,
                  description: Optional[str] = None,
                  location: Optional[str] = None,
                  provisioning_state: Optional[str] = None,
                  rule_name: Optional[str] = None,
                  tags: Optional[Mapping[str, str]] = None)
    func NewAlertRule(ctx *Context, name string, args AlertRuleArgs, opts ...ResourceOption) (*AlertRule, error)
    public AlertRule(string name, AlertRuleArgs args, CustomResourceOptions? opts = null)
    public AlertRule(String name, AlertRuleArgs args)
    public AlertRule(String name, AlertRuleArgs args, CustomResourceOptions options)
    
    type: azure-native:insights:AlertRule
    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 AlertRuleArgs
    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 AlertRuleArgs
    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 AlertRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertRuleArgs
    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 alertRuleResource = new AzureNative.Insights.AlertRule("alertRuleResource", new()
    {
        Condition = new AzureNative.Insights.Inputs.LocationThresholdRuleConditionArgs
        {
            FailedLocationCount = 0,
            OdataType = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition",
            DataSource = new AzureNative.Insights.Inputs.RuleManagementEventDataSourceArgs
            {
                OdataType = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource",
                LegacyResourceId = "string",
                EventSource = "string",
                Claims = new AzureNative.Insights.Inputs.RuleManagementEventClaimsDataSourceArgs
                {
                    EmailAddress = "string",
                },
                Level = "string",
                MetricNamespace = "string",
                EventName = "string",
                OperationName = "string",
                ResourceGroupName = "string",
                ResourceLocation = "string",
                ResourceProviderName = "string",
                ResourceUri = "string",
                Status = "string",
                SubStatus = "string",
            },
            WindowSize = "string",
        },
        IsEnabled = false,
        Name = "string",
        ResourceGroupName = "string",
        Action = new AzureNative.Insights.Inputs.RuleEmailActionArgs
        {
            OdataType = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
            CustomEmails = new[]
            {
                "string",
            },
            SendToServiceOwners = false,
        },
        Actions = new[]
        {
            new AzureNative.Insights.Inputs.RuleEmailActionArgs
            {
                OdataType = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
                CustomEmails = new[]
                {
                    "string",
                },
                SendToServiceOwners = false,
            },
        },
        Description = "string",
        Location = "string",
        ProvisioningState = "string",
        RuleName = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := insights.NewAlertRule(ctx, "alertRuleResource", &insights.AlertRuleArgs{
    	Condition: &insights.LocationThresholdRuleConditionArgs{
    		FailedLocationCount: pulumi.Int(0),
    		OdataType:           pulumi.String("Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition"),
    		DataSource: insights.RuleManagementEventDataSource{
    			OdataType:        "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource",
    			LegacyResourceId: "string",
    			EventSource:      "string",
    			Claims: insights.RuleManagementEventClaimsDataSource{
    				EmailAddress: "string",
    			},
    			Level:                "string",
    			MetricNamespace:      "string",
    			EventName:            "string",
    			OperationName:        "string",
    			ResourceGroupName:    "string",
    			ResourceLocation:     "string",
    			ResourceProviderName: "string",
    			ResourceUri:          "string",
    			Status:               "string",
    			SubStatus:            "string",
    		},
    		WindowSize: pulumi.String("string"),
    	},
    	IsEnabled:         pulumi.Bool(false),
    	Name:              pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	Action: &insights.RuleEmailActionArgs{
    		OdataType: pulumi.String("Microsoft.Azure.Management.Insights.Models.RuleEmailAction"),
    		CustomEmails: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		SendToServiceOwners: pulumi.Bool(false),
    	},
    	Actions: pulumi.Array{
    		insights.RuleEmailAction{
    			OdataType: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
    			CustomEmails: []string{
    				"string",
    			},
    			SendToServiceOwners: false,
    		},
    	},
    	Description:       pulumi.String("string"),
    	Location:          pulumi.String("string"),
    	ProvisioningState: pulumi.String("string"),
    	RuleName:          pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var alertRuleResource = new AlertRule("alertRuleResource", AlertRuleArgs.builder()
        .condition(LocationThresholdRuleConditionArgs.builder()
            .failedLocationCount(0)
            .odataType("Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition")
            .dataSource(RuleManagementEventDataSourceArgs.builder()
                .odataType("Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource")
                .legacyResourceId("string")
                .eventSource("string")
                .claims(RuleManagementEventClaimsDataSourceArgs.builder()
                    .emailAddress("string")
                    .build())
                .level("string")
                .metricNamespace("string")
                .eventName("string")
                .operationName("string")
                .resourceGroupName("string")
                .resourceLocation("string")
                .resourceProviderName("string")
                .resourceUri("string")
                .status("string")
                .subStatus("string")
                .build())
            .windowSize("string")
            .build())
        .isEnabled(false)
        .name("string")
        .resourceGroupName("string")
        .action(RuleEmailActionArgs.builder()
            .odataType("Microsoft.Azure.Management.Insights.Models.RuleEmailAction")
            .customEmails("string")
            .sendToServiceOwners(false)
            .build())
        .actions(RuleEmailActionArgs.builder()
            .odataType("Microsoft.Azure.Management.Insights.Models.RuleEmailAction")
            .customEmails("string")
            .sendToServiceOwners(false)
            .build())
        .description("string")
        .location("string")
        .provisioningState("string")
        .ruleName("string")
        .tags(Map.of("string", "string"))
        .build());
    
    alert_rule_resource = azure_native.insights.AlertRule("alertRuleResource",
        condition={
            "failed_location_count": 0,
            "odata_type": "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition",
            "data_source": {
                "odata_type": "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource",
                "legacy_resource_id": "string",
                "event_source": "string",
                "claims": {
                    "email_address": "string",
                },
                "level": "string",
                "metric_namespace": "string",
                "event_name": "string",
                "operation_name": "string",
                "resource_group_name": "string",
                "resource_location": "string",
                "resource_provider_name": "string",
                "resource_uri": "string",
                "status": "string",
                "sub_status": "string",
            },
            "window_size": "string",
        },
        is_enabled=False,
        name="string",
        resource_group_name="string",
        action={
            "odata_type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
            "custom_emails": ["string"],
            "send_to_service_owners": False,
        },
        actions=[{
            "odata_type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
            "custom_emails": ["string"],
            "send_to_service_owners": False,
        }],
        description="string",
        location="string",
        provisioning_state="string",
        rule_name="string",
        tags={
            "string": "string",
        })
    
    const alertRuleResource = new azure_native.insights.AlertRule("alertRuleResource", {
        condition: {
            failedLocationCount: 0,
            odataType: "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition",
            dataSource: {
                odataType: "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource",
                legacyResourceId: "string",
                eventSource: "string",
                claims: {
                    emailAddress: "string",
                },
                level: "string",
                metricNamespace: "string",
                eventName: "string",
                operationName: "string",
                resourceGroupName: "string",
                resourceLocation: "string",
                resourceProviderName: "string",
                resourceUri: "string",
                status: "string",
                subStatus: "string",
            },
            windowSize: "string",
        },
        isEnabled: false,
        name: "string",
        resourceGroupName: "string",
        action: {
            odataType: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
            customEmails: ["string"],
            sendToServiceOwners: false,
        },
        actions: [{
            odataType: "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
            customEmails: ["string"],
            sendToServiceOwners: false,
        }],
        description: "string",
        location: "string",
        provisioningState: "string",
        ruleName: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure-native:insights:AlertRule
    properties:
        action:
            customEmails:
                - string
            odataType: Microsoft.Azure.Management.Insights.Models.RuleEmailAction
            sendToServiceOwners: false
        actions:
            - customEmails:
                - string
              odataType: Microsoft.Azure.Management.Insights.Models.RuleEmailAction
              sendToServiceOwners: false
        condition:
            dataSource:
                claims:
                    emailAddress: string
                eventName: string
                eventSource: string
                legacyResourceId: string
                level: string
                metricNamespace: string
                odataType: Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource
                operationName: string
                resourceGroupName: string
                resourceLocation: string
                resourceProviderName: string
                resourceUri: string
                status: string
                subStatus: string
            failedLocationCount: 0
            odataType: Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition
            windowSize: string
        description: string
        isEnabled: false
        location: string
        name: string
        provisioningState: string
        resourceGroupName: string
        ruleName: string
        tags:
            string: string
    

    AlertRule 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 AlertRule resource accepts the following input properties:

    Condition Pulumi.AzureNative.Insights.Inputs.LocationThresholdRuleCondition | Pulumi.AzureNative.Insights.Inputs.ManagementEventRuleCondition | Pulumi.AzureNative.Insights.Inputs.ThresholdRuleCondition
    the condition that results in the alert rule being activated.
    IsEnabled bool
    the flag that indicates whether the alert rule is enabled.
    Name string
    the name of the alert rule.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    Action Pulumi.AzureNative.Insights.Inputs.RuleEmailAction | Pulumi.AzureNative.Insights.Inputs.RuleWebhookAction
    action that is performed when the alert rule becomes active, and when an alert condition is resolved.
    Actions List<Union<Pulumi.AzureNative.Insights.Inputs.RuleEmailAction, Pulumi.AzureNative.Insights.Inputs.RuleWebhookActionArgs>>
    the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    Description string
    the description of the alert rule that will be included in the alert email.
    Location string
    Resource location
    ProvisioningState string
    the provisioning state.
    RuleName string
    The name of the rule.
    Tags Dictionary<string, string>
    Resource tags
    Condition LocationThresholdRuleConditionArgs | ManagementEventRuleConditionArgs | ThresholdRuleConditionArgs
    the condition that results in the alert rule being activated.
    IsEnabled bool
    the flag that indicates whether the alert rule is enabled.
    Name string
    the name of the alert rule.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    Action RuleEmailActionArgs | RuleWebhookActionArgs
    action that is performed when the alert rule becomes active, and when an alert condition is resolved.
    Actions []interface{}
    the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    Description string
    the description of the alert rule that will be included in the alert email.
    Location string
    Resource location
    ProvisioningState string
    the provisioning state.
    RuleName string
    The name of the rule.
    Tags map[string]string
    Resource tags
    condition LocationThresholdRuleCondition | ManagementEventRuleCondition | ThresholdRuleCondition
    the condition that results in the alert rule being activated.
    isEnabled Boolean
    the flag that indicates whether the alert rule is enabled.
    name String
    the name of the alert rule.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    action RuleEmailAction | RuleWebhookAction
    action that is performed when the alert rule becomes active, and when an alert condition is resolved.
    actions List<Either<RuleEmailAction,RuleWebhookActionArgs>>
    the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    description String
    the description of the alert rule that will be included in the alert email.
    location String
    Resource location
    provisioningState String
    the provisioning state.
    ruleName String
    The name of the rule.
    tags Map<String,String>
    Resource tags
    condition LocationThresholdRuleCondition | ManagementEventRuleCondition | ThresholdRuleCondition
    the condition that results in the alert rule being activated.
    isEnabled boolean
    the flag that indicates whether the alert rule is enabled.
    name string
    the name of the alert rule.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    action RuleEmailAction | RuleWebhookAction
    action that is performed when the alert rule becomes active, and when an alert condition is resolved.
    actions (RuleEmailAction | RuleWebhookActionArgs)[]
    the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    description string
    the description of the alert rule that will be included in the alert email.
    location string
    Resource location
    provisioningState string
    the provisioning state.
    ruleName string
    The name of the rule.
    tags {[key: string]: string}
    Resource tags
    condition LocationThresholdRuleConditionArgs | ManagementEventRuleConditionArgs | ThresholdRuleConditionArgs
    the condition that results in the alert rule being activated.
    is_enabled bool
    the flag that indicates whether the alert rule is enabled.
    name str
    the name of the alert rule.
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    action RuleEmailActionArgs | RuleWebhookActionArgs
    action that is performed when the alert rule becomes active, and when an alert condition is resolved.
    actions Sequence[Union[RuleEmailActionArgs, RuleWebhookActionArgs]]
    the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    description str
    the description of the alert rule that will be included in the alert email.
    location str
    Resource location
    provisioning_state str
    the provisioning state.
    rule_name str
    The name of the rule.
    tags Mapping[str, str]
    Resource tags
    condition Property Map | Property Map | Property Map
    the condition that results in the alert rule being activated.
    isEnabled Boolean
    the flag that indicates whether the alert rule is enabled.
    name String
    the name of the alert rule.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    action Property Map | Property Map
    action that is performed when the alert rule becomes active, and when an alert condition is resolved.
    actions List<Property Map | Property Map>
    the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    description String
    the description of the alert rule that will be included in the alert email.
    location String
    Resource location
    provisioningState String
    the provisioning state.
    ruleName String
    The name of the rule.
    tags Map<String>
    Resource tags

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedTime string
    Last time the rule was updated in ISO8601 format.
    Type string
    Azure resource type
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedTime string
    Last time the rule was updated in ISO8601 format.
    Type string
    Azure resource type
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedTime String
    Last time the rule was updated in ISO8601 format.
    type String
    Azure resource type
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdatedTime string
    Last time the rule was updated in ISO8601 format.
    type string
    Azure resource type
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated_time str
    Last time the rule was updated in ISO8601 format.
    type str
    Azure resource type
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedTime String
    Last time the rule was updated in ISO8601 format.
    type String
    Azure resource type

    Supporting Types

    ConditionOperator, ConditionOperatorArgs

    EqualsValue
    Equals
    GreaterThan
    GreaterThan
    GreaterThanOrEqual
    GreaterThanOrEqual
    LessThan
    LessThan
    LessThanOrEqual
    LessThanOrEqual
    ConditionOperatorEquals
    Equals
    ConditionOperatorGreaterThan
    GreaterThan
    ConditionOperatorGreaterThanOrEqual
    GreaterThanOrEqual
    ConditionOperatorLessThan
    LessThan
    ConditionOperatorLessThanOrEqual
    LessThanOrEqual
    Equals
    Equals
    GreaterThan
    GreaterThan
    GreaterThanOrEqual
    GreaterThanOrEqual
    LessThan
    LessThan
    LessThanOrEqual
    LessThanOrEqual
    Equals
    Equals
    GreaterThan
    GreaterThan
    GreaterThanOrEqual
    GreaterThanOrEqual
    LessThan
    LessThan
    LessThanOrEqual
    LessThanOrEqual
    EQUALS
    Equals
    GREATER_THAN
    GreaterThan
    GREATER_THAN_OR_EQUAL
    GreaterThanOrEqual
    LESS_THAN
    LessThan
    LESS_THAN_OR_EQUAL
    LessThanOrEqual
    "Equals"
    Equals
    "GreaterThan"
    GreaterThan
    "GreaterThanOrEqual"
    GreaterThanOrEqual
    "LessThan"
    LessThan
    "LessThanOrEqual"
    LessThanOrEqual

    LocationThresholdRuleCondition, LocationThresholdRuleConditionArgs

    FailedLocationCount int
    the number of locations that must fail to activate the alert.
    DataSource Pulumi.AzureNative.Insights.Inputs.RuleManagementEventDataSource | Pulumi.AzureNative.Insights.Inputs.RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    FailedLocationCount int
    the number of locations that must fail to activate the alert.
    DataSource RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    failedLocationCount Integer
    the number of locations that must fail to activate the alert.
    dataSource RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    failedLocationCount number
    the number of locations that must fail to activate the alert.
    dataSource RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    windowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    failed_location_count int
    the number of locations that must fail to activate the alert.
    data_source RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    window_size str
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    failedLocationCount Number
    the number of locations that must fail to activate the alert.
    dataSource Property Map | Property Map
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

    LocationThresholdRuleConditionResponse, LocationThresholdRuleConditionResponseArgs

    FailedLocationCount int
    the number of locations that must fail to activate the alert.
    DataSource Pulumi.AzureNative.Insights.Inputs.RuleManagementEventDataSourceResponse | Pulumi.AzureNative.Insights.Inputs.RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    FailedLocationCount int
    the number of locations that must fail to activate the alert.
    DataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    failedLocationCount Integer
    the number of locations that must fail to activate the alert.
    dataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    failedLocationCount number
    the number of locations that must fail to activate the alert.
    dataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    windowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    failed_location_count int
    the number of locations that must fail to activate the alert.
    data_source RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    window_size str
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    failedLocationCount Number
    the number of locations that must fail to activate the alert.
    dataSource Property Map | Property Map
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

    ManagementEventAggregationCondition, ManagementEventAggregationConditionArgs

    Operator Pulumi.AzureNative.Insights.ConditionOperator
    the condition operator.
    Threshold double
    The threshold value that activates the alert.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    Operator ConditionOperator
    the condition operator.
    Threshold float64
    The threshold value that activates the alert.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator ConditionOperator
    the condition operator.
    threshold Double
    The threshold value that activates the alert.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator ConditionOperator
    the condition operator.
    threshold number
    The threshold value that activates the alert.
    windowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator ConditionOperator
    the condition operator.
    threshold float
    The threshold value that activates the alert.
    window_size str
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator "Equals" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual"
    the condition operator.
    threshold Number
    The threshold value that activates the alert.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

    ManagementEventAggregationConditionResponse, ManagementEventAggregationConditionResponseArgs

    Operator string
    the condition operator.
    Threshold double
    The threshold value that activates the alert.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    Operator string
    the condition operator.
    Threshold float64
    The threshold value that activates the alert.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator String
    the condition operator.
    threshold Double
    The threshold value that activates the alert.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator string
    the condition operator.
    threshold number
    The threshold value that activates the alert.
    windowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator str
    the condition operator.
    threshold float
    The threshold value that activates the alert.
    window_size str
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator String
    the condition operator.
    threshold Number
    The threshold value that activates the alert.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

    ManagementEventRuleCondition, ManagementEventRuleConditionArgs

    Aggregation Pulumi.AzureNative.Insights.Inputs.ManagementEventAggregationCondition
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    DataSource Pulumi.AzureNative.Insights.Inputs.RuleManagementEventDataSource | Pulumi.AzureNative.Insights.Inputs.RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    Aggregation ManagementEventAggregationCondition
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    DataSource RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    aggregation ManagementEventAggregationCondition
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    dataSource RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    aggregation ManagementEventAggregationCondition
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    dataSource RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    aggregation ManagementEventAggregationCondition
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    data_source RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    aggregation Property Map
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    dataSource Property Map | Property Map
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.

    ManagementEventRuleConditionResponse, ManagementEventRuleConditionResponseArgs

    Aggregation Pulumi.AzureNative.Insights.Inputs.ManagementEventAggregationConditionResponse
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    DataSource Pulumi.AzureNative.Insights.Inputs.RuleManagementEventDataSourceResponse | Pulumi.AzureNative.Insights.Inputs.RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    Aggregation ManagementEventAggregationConditionResponse
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    DataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    aggregation ManagementEventAggregationConditionResponse
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    dataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    aggregation ManagementEventAggregationConditionResponse
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    dataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    aggregation ManagementEventAggregationConditionResponse
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    data_source RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    aggregation Property Map
    How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
    dataSource Property Map | Property Map
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.

    RuleEmailAction, RuleEmailActionArgs

    CustomEmails List<string>
    the list of administrator's custom email addresses to notify of the activation of the alert.
    SendToServiceOwners bool
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    CustomEmails []string
    the list of administrator's custom email addresses to notify of the activation of the alert.
    SendToServiceOwners bool
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    customEmails List<String>
    the list of administrator's custom email addresses to notify of the activation of the alert.
    sendToServiceOwners Boolean
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    customEmails string[]
    the list of administrator's custom email addresses to notify of the activation of the alert.
    sendToServiceOwners boolean
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    custom_emails Sequence[str]
    the list of administrator's custom email addresses to notify of the activation of the alert.
    send_to_service_owners bool
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    customEmails List<String>
    the list of administrator's custom email addresses to notify of the activation of the alert.
    sendToServiceOwners Boolean
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.

    RuleEmailActionResponse, RuleEmailActionResponseArgs

    CustomEmails List<string>
    the list of administrator's custom email addresses to notify of the activation of the alert.
    SendToServiceOwners bool
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    CustomEmails []string
    the list of administrator's custom email addresses to notify of the activation of the alert.
    SendToServiceOwners bool
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    customEmails List<String>
    the list of administrator's custom email addresses to notify of the activation of the alert.
    sendToServiceOwners Boolean
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    customEmails string[]
    the list of administrator's custom email addresses to notify of the activation of the alert.
    sendToServiceOwners boolean
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    custom_emails Sequence[str]
    the list of administrator's custom email addresses to notify of the activation of the alert.
    send_to_service_owners bool
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    customEmails List<String>
    the list of administrator's custom email addresses to notify of the activation of the alert.
    sendToServiceOwners Boolean
    Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.

    RuleManagementEventClaimsDataSource, RuleManagementEventClaimsDataSourceArgs

    EmailAddress string
    the email address.
    EmailAddress string
    the email address.
    emailAddress String
    the email address.
    emailAddress string
    the email address.
    email_address str
    the email address.
    emailAddress String
    the email address.

    RuleManagementEventClaimsDataSourceResponse, RuleManagementEventClaimsDataSourceResponseArgs

    EmailAddress string
    the email address.
    EmailAddress string
    the email address.
    emailAddress String
    the email address.
    emailAddress string
    the email address.
    email_address str
    the email address.
    emailAddress String
    the email address.

    RuleManagementEventDataSource, RuleManagementEventDataSourceArgs

    Claims Pulumi.AzureNative.Insights.Inputs.RuleManagementEventClaimsDataSource
    the claims.
    EventName string
    the event name.
    EventSource string
    the event source.
    LegacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    Level string
    the level.
    MetricNamespace string
    the namespace of the metric.
    OperationName string
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    ResourceGroupName string
    the resource group name.
    ResourceLocation string
    the location of the resource.
    ResourceProviderName string
    the resource provider name.
    ResourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    Status string
    The status of the operation that should be checked for. If no status is provided, any status will match.
    SubStatus string
    the substatus.
    Claims RuleManagementEventClaimsDataSource
    the claims.
    EventName string
    the event name.
    EventSource string
    the event source.
    LegacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    Level string
    the level.
    MetricNamespace string
    the namespace of the metric.
    OperationName string
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    ResourceGroupName string
    the resource group name.
    ResourceLocation string
    the location of the resource.
    ResourceProviderName string
    the resource provider name.
    ResourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    Status string
    The status of the operation that should be checked for. If no status is provided, any status will match.
    SubStatus string
    the substatus.
    claims RuleManagementEventClaimsDataSource
    the claims.
    eventName String
    the event name.
    eventSource String
    the event source.
    legacyResourceId String
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    level String
    the level.
    metricNamespace String
    the namespace of the metric.
    operationName String
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    resourceGroupName String
    the resource group name.
    resourceLocation String
    the location of the resource.
    resourceProviderName String
    the resource provider name.
    resourceUri String
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    status String
    The status of the operation that should be checked for. If no status is provided, any status will match.
    subStatus String
    the substatus.
    claims RuleManagementEventClaimsDataSource
    the claims.
    eventName string
    the event name.
    eventSource string
    the event source.
    legacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    level string
    the level.
    metricNamespace string
    the namespace of the metric.
    operationName string
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    resourceGroupName string
    the resource group name.
    resourceLocation string
    the location of the resource.
    resourceProviderName string
    the resource provider name.
    resourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    status string
    The status of the operation that should be checked for. If no status is provided, any status will match.
    subStatus string
    the substatus.
    claims RuleManagementEventClaimsDataSource
    the claims.
    event_name str
    the event name.
    event_source str
    the event source.
    legacy_resource_id str
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    level str
    the level.
    metric_namespace str
    the namespace of the metric.
    operation_name str
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    resource_group_name str
    the resource group name.
    resource_location str
    the location of the resource.
    resource_provider_name str
    the resource provider name.
    resource_uri str
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    status str
    The status of the operation that should be checked for. If no status is provided, any status will match.
    sub_status str
    the substatus.
    claims Property Map
    the claims.
    eventName String
    the event name.
    eventSource String
    the event source.
    legacyResourceId String
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    level String
    the level.
    metricNamespace String
    the namespace of the metric.
    operationName String
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    resourceGroupName String
    the resource group name.
    resourceLocation String
    the location of the resource.
    resourceProviderName String
    the resource provider name.
    resourceUri String
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    status String
    The status of the operation that should be checked for. If no status is provided, any status will match.
    subStatus String
    the substatus.

    RuleManagementEventDataSourceResponse, RuleManagementEventDataSourceResponseArgs

    Claims Pulumi.AzureNative.Insights.Inputs.RuleManagementEventClaimsDataSourceResponse
    the claims.
    EventName string
    the event name.
    EventSource string
    the event source.
    LegacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    Level string
    the level.
    MetricNamespace string
    the namespace of the metric.
    OperationName string
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    ResourceGroupName string
    the resource group name.
    ResourceLocation string
    the location of the resource.
    ResourceProviderName string
    the resource provider name.
    ResourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    Status string
    The status of the operation that should be checked for. If no status is provided, any status will match.
    SubStatus string
    the substatus.
    Claims RuleManagementEventClaimsDataSourceResponse
    the claims.
    EventName string
    the event name.
    EventSource string
    the event source.
    LegacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    Level string
    the level.
    MetricNamespace string
    the namespace of the metric.
    OperationName string
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    ResourceGroupName string
    the resource group name.
    ResourceLocation string
    the location of the resource.
    ResourceProviderName string
    the resource provider name.
    ResourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    Status string
    The status of the operation that should be checked for. If no status is provided, any status will match.
    SubStatus string
    the substatus.
    claims RuleManagementEventClaimsDataSourceResponse
    the claims.
    eventName String
    the event name.
    eventSource String
    the event source.
    legacyResourceId String
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    level String
    the level.
    metricNamespace String
    the namespace of the metric.
    operationName String
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    resourceGroupName String
    the resource group name.
    resourceLocation String
    the location of the resource.
    resourceProviderName String
    the resource provider name.
    resourceUri String
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    status String
    The status of the operation that should be checked for. If no status is provided, any status will match.
    subStatus String
    the substatus.
    claims RuleManagementEventClaimsDataSourceResponse
    the claims.
    eventName string
    the event name.
    eventSource string
    the event source.
    legacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    level string
    the level.
    metricNamespace string
    the namespace of the metric.
    operationName string
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    resourceGroupName string
    the resource group name.
    resourceLocation string
    the location of the resource.
    resourceProviderName string
    the resource provider name.
    resourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    status string
    The status of the operation that should be checked for. If no status is provided, any status will match.
    subStatus string
    the substatus.
    claims RuleManagementEventClaimsDataSourceResponse
    the claims.
    event_name str
    the event name.
    event_source str
    the event source.
    legacy_resource_id str
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    level str
    the level.
    metric_namespace str
    the namespace of the metric.
    operation_name str
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    resource_group_name str
    the resource group name.
    resource_location str
    the location of the resource.
    resource_provider_name str
    the resource provider name.
    resource_uri str
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    status str
    The status of the operation that should be checked for. If no status is provided, any status will match.
    sub_status str
    the substatus.
    claims Property Map
    the claims.
    eventName String
    the event name.
    eventSource String
    the event source.
    legacyResourceId String
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    level String
    the level.
    metricNamespace String
    the namespace of the metric.
    operationName String
    The name of the operation that should be checked for. If no name is provided, any operation will match.
    resourceGroupName String
    the resource group name.
    resourceLocation String
    the location of the resource.
    resourceProviderName String
    the resource provider name.
    resourceUri String
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    status String
    The status of the operation that should be checked for. If no status is provided, any status will match.
    subStatus String
    the substatus.

    RuleMetricDataSource, RuleMetricDataSourceArgs

    LegacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    MetricName string
    the name of the metric that defines what the rule monitors.
    MetricNamespace string
    the namespace of the metric.
    ResourceLocation string
    the location of the resource.
    ResourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    LegacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    MetricName string
    the name of the metric that defines what the rule monitors.
    MetricNamespace string
    the namespace of the metric.
    ResourceLocation string
    the location of the resource.
    ResourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    legacyResourceId String
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    metricName String
    the name of the metric that defines what the rule monitors.
    metricNamespace String
    the namespace of the metric.
    resourceLocation String
    the location of the resource.
    resourceUri String
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    legacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    metricName string
    the name of the metric that defines what the rule monitors.
    metricNamespace string
    the namespace of the metric.
    resourceLocation string
    the location of the resource.
    resourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    legacy_resource_id str
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    metric_name str
    the name of the metric that defines what the rule monitors.
    metric_namespace str
    the namespace of the metric.
    resource_location str
    the location of the resource.
    resource_uri str
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    legacyResourceId String
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    metricName String
    the name of the metric that defines what the rule monitors.
    metricNamespace String
    the namespace of the metric.
    resourceLocation String
    the location of the resource.
    resourceUri String
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.

    RuleMetricDataSourceResponse, RuleMetricDataSourceResponseArgs

    LegacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    MetricName string
    the name of the metric that defines what the rule monitors.
    MetricNamespace string
    the namespace of the metric.
    ResourceLocation string
    the location of the resource.
    ResourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    LegacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    MetricName string
    the name of the metric that defines what the rule monitors.
    MetricNamespace string
    the namespace of the metric.
    ResourceLocation string
    the location of the resource.
    ResourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    legacyResourceId String
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    metricName String
    the name of the metric that defines what the rule monitors.
    metricNamespace String
    the namespace of the metric.
    resourceLocation String
    the location of the resource.
    resourceUri String
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    legacyResourceId string
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    metricName string
    the name of the metric that defines what the rule monitors.
    metricNamespace string
    the namespace of the metric.
    resourceLocation string
    the location of the resource.
    resourceUri string
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    legacy_resource_id str
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    metric_name str
    the name of the metric that defines what the rule monitors.
    metric_namespace str
    the namespace of the metric.
    resource_location str
    the location of the resource.
    resource_uri str
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    legacyResourceId String
    the legacy resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.
    metricName String
    the name of the metric that defines what the rule monitors.
    metricNamespace String
    the namespace of the metric.
    resourceLocation String
    the location of the resource.
    resourceUri String
    the resource identifier of the resource the rule monitors. NOTE: this property cannot be updated for an existing rule.

    RuleWebhookAction, RuleWebhookActionArgs

    Properties Dictionary<string, string>
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    ServiceUri string
    the service uri to Post the notification when the alert activates or resolves.
    Properties map[string]string
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    ServiceUri string
    the service uri to Post the notification when the alert activates or resolves.
    properties Map<String,String>
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    serviceUri String
    the service uri to Post the notification when the alert activates or resolves.
    properties {[key: string]: string}
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    serviceUri string
    the service uri to Post the notification when the alert activates or resolves.
    properties Mapping[str, str]
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    service_uri str
    the service uri to Post the notification when the alert activates or resolves.
    properties Map<String>
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    serviceUri String
    the service uri to Post the notification when the alert activates or resolves.

    RuleWebhookActionResponse, RuleWebhookActionResponseArgs

    Properties Dictionary<string, string>
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    ServiceUri string
    the service uri to Post the notification when the alert activates or resolves.
    Properties map[string]string
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    ServiceUri string
    the service uri to Post the notification when the alert activates or resolves.
    properties Map<String,String>
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    serviceUri String
    the service uri to Post the notification when the alert activates or resolves.
    properties {[key: string]: string}
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    serviceUri string
    the service uri to Post the notification when the alert activates or resolves.
    properties Mapping[str, str]
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    service_uri str
    the service uri to Post the notification when the alert activates or resolves.
    properties Map<String>
    the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
    serviceUri String
    the service uri to Post the notification when the alert activates or resolves.

    ThresholdRuleCondition, ThresholdRuleConditionArgs

    Operator Pulumi.AzureNative.Insights.ConditionOperator
    the operator used to compare the data and the threshold.
    Threshold double
    the threshold value that activates the alert.
    DataSource Pulumi.AzureNative.Insights.Inputs.RuleManagementEventDataSource | Pulumi.AzureNative.Insights.Inputs.RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    TimeAggregation Pulumi.AzureNative.Insights.TimeAggregationOperator
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    Operator ConditionOperator
    the operator used to compare the data and the threshold.
    Threshold float64
    the threshold value that activates the alert.
    DataSource RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    TimeAggregation TimeAggregationOperator
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator ConditionOperator
    the operator used to compare the data and the threshold.
    threshold Double
    the threshold value that activates the alert.
    dataSource RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    timeAggregation TimeAggregationOperator
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator ConditionOperator
    the operator used to compare the data and the threshold.
    threshold number
    the threshold value that activates the alert.
    dataSource RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    timeAggregation TimeAggregationOperator
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    windowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator ConditionOperator
    the operator used to compare the data and the threshold.
    threshold float
    the threshold value that activates the alert.
    data_source RuleManagementEventDataSource | RuleMetricDataSource
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    time_aggregation TimeAggregationOperator
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    window_size str
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator "Equals" | "GreaterThan" | "GreaterThanOrEqual" | "LessThan" | "LessThanOrEqual"
    the operator used to compare the data and the threshold.
    threshold Number
    the threshold value that activates the alert.
    dataSource Property Map | Property Map
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    timeAggregation "Average" | "Minimum" | "Maximum" | "Total" | "Last"
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

    ThresholdRuleConditionResponse, ThresholdRuleConditionResponseArgs

    Operator string
    the operator used to compare the data and the threshold.
    Threshold double
    the threshold value that activates the alert.
    DataSource Pulumi.AzureNative.Insights.Inputs.RuleManagementEventDataSourceResponse | Pulumi.AzureNative.Insights.Inputs.RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    TimeAggregation string
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    Operator string
    the operator used to compare the data and the threshold.
    Threshold float64
    the threshold value that activates the alert.
    DataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    TimeAggregation string
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    WindowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator String
    the operator used to compare the data and the threshold.
    threshold Double
    the threshold value that activates the alert.
    dataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    timeAggregation String
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator string
    the operator used to compare the data and the threshold.
    threshold number
    the threshold value that activates the alert.
    dataSource RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    timeAggregation string
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    windowSize string
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator str
    the operator used to compare the data and the threshold.
    threshold float
    the threshold value that activates the alert.
    data_source RuleManagementEventDataSourceResponse | RuleMetricDataSourceResponse
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    time_aggregation str
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    window_size str
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
    operator String
    the operator used to compare the data and the threshold.
    threshold Number
    the threshold value that activates the alert.
    dataSource Property Map | Property Map
    the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
    timeAggregation String
    the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric.
    windowSize String
    the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

    TimeAggregationOperator, TimeAggregationOperatorArgs

    Average
    Average
    Minimum
    Minimum
    Maximum
    Maximum
    Total
    Total
    Last
    Last
    TimeAggregationOperatorAverage
    Average
    TimeAggregationOperatorMinimum
    Minimum
    TimeAggregationOperatorMaximum
    Maximum
    TimeAggregationOperatorTotal
    Total
    TimeAggregationOperatorLast
    Last
    Average
    Average
    Minimum
    Minimum
    Maximum
    Maximum
    Total
    Total
    Last
    Last
    Average
    Average
    Minimum
    Minimum
    Maximum
    Maximum
    Total
    Total
    Last
    Last
    AVERAGE
    Average
    MINIMUM
    Minimum
    MAXIMUM
    Maximum
    TOTAL
    Total
    LAST
    Last
    "Average"
    Average
    "Minimum"
    Minimum
    "Maximum"
    Maximum
    "Total"
    Total
    "Last"
    Last

    Import

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

    $ pulumi import azure-native:insights:AlertRule chiricutin /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName} 
    

    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