1. Packages
  2. Azure Native
  3. API Docs
  4. alertsmanagement
  5. PrometheusRuleGroup
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.39.0 published on Monday, Apr 29, 2024 by Pulumi

azure-native.alertsmanagement.PrometheusRuleGroup

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.39.0 published on Monday, Apr 29, 2024 by Pulumi

    The Prometheus rule group resource. Azure REST API version: 2023-03-01.

    Example Usage

    Create or Update a PrometheusRuleGroup

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var prometheusRuleGroup = new AzureNative.AlertsManagement.PrometheusRuleGroup("prometheusRuleGroup", new()
        {
            ClusterName = "myClusterName",
            Description = "This is the description of the following rule group",
            Enabled = true,
            Interval = "PT10M",
            Location = "East US",
            ResourceGroupName = "promResourceGroup",
            RuleGroupName = "myPrometheusRuleGroup",
            Rules = new[]
            {
                new AzureNative.AlertsManagement.Inputs.PrometheusRuleArgs
                {
                    Expression = "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))",
                    Labels = 
                    {
                        { "team", "prod" },
                    },
                    Record = "job_type:billing_jobs_duration_seconds:99p5m",
                },
                new AzureNative.AlertsManagement.Inputs.PrometheusRuleArgs
                {
                    Actions = new[]
                    {
                        new AzureNative.AlertsManagement.Inputs.PrometheusRuleGroupActionArgs
                        {
                            ActionGroupId = "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup",
                            ActionProperties = 
                            {
                                { "key11", "value11" },
                                { "key12", "value12" },
                            },
                        },
                        new AzureNative.AlertsManagement.Inputs.PrometheusRuleGroupActionArgs
                        {
                            ActionGroupId = "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup",
                            ActionProperties = 
                            {
                                { "key21", "value21" },
                                { "key22", "value22" },
                            },
                        },
                    },
                    Alert = "Billing_Processing_Very_Slow",
                    Annotations = 
                    {
                        { "annotationName1", "annotationValue1" },
                    },
                    Enabled = true,
                    Expression = "job_type:billing_jobs_duration_seconds:99p5m > 30",
                    For = "PT5M",
                    Labels = 
                    {
                        { "team", "prod" },
                    },
                    ResolveConfiguration = new AzureNative.AlertsManagement.Inputs.PrometheusRuleResolveConfigurationArgs
                    {
                        AutoResolved = true,
                        TimeToResolve = "PT10M",
                    },
                    Severity = 2,
                },
            },
            Scopes = new[]
            {
                "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/alertsmanagement/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := alertsmanagement.NewPrometheusRuleGroup(ctx, "prometheusRuleGroup", &alertsmanagement.PrometheusRuleGroupArgs{
    			ClusterName:       pulumi.String("myClusterName"),
    			Description:       pulumi.String("This is the description of the following rule group"),
    			Enabled:           pulumi.Bool(true),
    			Interval:          pulumi.String("PT10M"),
    			Location:          pulumi.String("East US"),
    			ResourceGroupName: pulumi.String("promResourceGroup"),
    			RuleGroupName:     pulumi.String("myPrometheusRuleGroup"),
    			Rules: alertsmanagement.PrometheusRuleArray{
    				&alertsmanagement.PrometheusRuleArgs{
    					Expression: pulumi.String("histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))"),
    					Labels: pulumi.StringMap{
    						"team": pulumi.String("prod"),
    					},
    					Record: pulumi.String("job_type:billing_jobs_duration_seconds:99p5m"),
    				},
    				&alertsmanagement.PrometheusRuleArgs{
    					Actions: alertsmanagement.PrometheusRuleGroupActionArray{
    						&alertsmanagement.PrometheusRuleGroupActionArgs{
    							ActionGroupId: pulumi.String("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup"),
    							ActionProperties: pulumi.StringMap{
    								"key11": pulumi.String("value11"),
    								"key12": pulumi.String("value12"),
    							},
    						},
    						&alertsmanagement.PrometheusRuleGroupActionArgs{
    							ActionGroupId: pulumi.String("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup"),
    							ActionProperties: pulumi.StringMap{
    								"key21": pulumi.String("value21"),
    								"key22": pulumi.String("value22"),
    							},
    						},
    					},
    					Alert: pulumi.String("Billing_Processing_Very_Slow"),
    					Annotations: pulumi.StringMap{
    						"annotationName1": pulumi.String("annotationValue1"),
    					},
    					Enabled:    pulumi.Bool(true),
    					Expression: pulumi.String("job_type:billing_jobs_duration_seconds:99p5m > 30"),
    					For:        pulumi.String("PT5M"),
    					Labels: pulumi.StringMap{
    						"team": pulumi.String("prod"),
    					},
    					ResolveConfiguration: &alertsmanagement.PrometheusRuleResolveConfigurationArgs{
    						AutoResolved:  pulumi.Bool(true),
    						TimeToResolve: pulumi.String("PT10M"),
    					},
    					Severity: pulumi.Int(2),
    				},
    			},
    			Scopes: pulumi.StringArray{
    				pulumi.String("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"),
    			},
    		})
    		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.alertsmanagement.PrometheusRuleGroup;
    import com.pulumi.azurenative.alertsmanagement.PrometheusRuleGroupArgs;
    import com.pulumi.azurenative.alertsmanagement.inputs.PrometheusRuleArgs;
    import com.pulumi.azurenative.alertsmanagement.inputs.PrometheusRuleResolveConfigurationArgs;
    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 prometheusRuleGroup = new PrometheusRuleGroup("prometheusRuleGroup", PrometheusRuleGroupArgs.builder()        
                .clusterName("myClusterName")
                .description("This is the description of the following rule group")
                .enabled(true)
                .interval("PT10M")
                .location("East US")
                .resourceGroupName("promResourceGroup")
                .ruleGroupName("myPrometheusRuleGroup")
                .rules(            
                    PrometheusRuleArgs.builder()
                        .expression("histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))")
                        .labels(Map.of("team", "prod"))
                        .record("job_type:billing_jobs_duration_seconds:99p5m")
                        .build(),
                    PrometheusRuleArgs.builder()
                        .actions(                    
                            PrometheusRuleGroupActionArgs.builder()
                                .actionGroupId("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup")
                                .actionProperties(Map.ofEntries(
                                    Map.entry("key11", "value11"),
                                    Map.entry("key12", "value12")
                                ))
                                .build(),
                            PrometheusRuleGroupActionArgs.builder()
                                .actionGroupId("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup")
                                .actionProperties(Map.ofEntries(
                                    Map.entry("key21", "value21"),
                                    Map.entry("key22", "value22")
                                ))
                                .build())
                        .alert("Billing_Processing_Very_Slow")
                        .annotations(Map.of("annotationName1", "annotationValue1"))
                        .enabled(true)
                        .expression("job_type:billing_jobs_duration_seconds:99p5m > 30")
                        .for_("PT5M")
                        .labels(Map.of("team", "prod"))
                        .resolveConfiguration(PrometheusRuleResolveConfigurationArgs.builder()
                            .autoResolved(true)
                            .timeToResolve("PT10M")
                            .build())
                        .severity(2)
                        .build())
                .scopes("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    prometheus_rule_group = azure_native.alertsmanagement.PrometheusRuleGroup("prometheusRuleGroup",
        cluster_name="myClusterName",
        description="This is the description of the following rule group",
        enabled=True,
        interval="PT10M",
        location="East US",
        resource_group_name="promResourceGroup",
        rule_group_name="myPrometheusRuleGroup",
        rules=[
            azure_native.alertsmanagement.PrometheusRuleArgs(
                expression="histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))",
                labels={
                    "team": "prod",
                },
                record="job_type:billing_jobs_duration_seconds:99p5m",
            ),
            azure_native.alertsmanagement.PrometheusRuleArgs(
                actions=[
                    azure_native.alertsmanagement.PrometheusRuleGroupActionArgs(
                        action_group_id="/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup",
                        action_properties={
                            "key11": "value11",
                            "key12": "value12",
                        },
                    ),
                    azure_native.alertsmanagement.PrometheusRuleGroupActionArgs(
                        action_group_id="/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup",
                        action_properties={
                            "key21": "value21",
                            "key22": "value22",
                        },
                    ),
                ],
                alert="Billing_Processing_Very_Slow",
                annotations={
                    "annotationName1": "annotationValue1",
                },
                enabled=True,
                expression="job_type:billing_jobs_duration_seconds:99p5m > 30",
                for_="PT5M",
                labels={
                    "team": "prod",
                },
                resolve_configuration=azure_native.alertsmanagement.PrometheusRuleResolveConfigurationArgs(
                    auto_resolved=True,
                    time_to_resolve="PT10M",
                ),
                severity=2,
            ),
        ],
        scopes=["/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const prometheusRuleGroup = new azure_native.alertsmanagement.PrometheusRuleGroup("prometheusRuleGroup", {
        clusterName: "myClusterName",
        description: "This is the description of the following rule group",
        enabled: true,
        interval: "PT10M",
        location: "East US",
        resourceGroupName: "promResourceGroup",
        ruleGroupName: "myPrometheusRuleGroup",
        rules: [
            {
                expression: "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))",
                labels: {
                    team: "prod",
                },
                record: "job_type:billing_jobs_duration_seconds:99p5m",
            },
            {
                actions: [
                    {
                        actionGroupId: "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup",
                        actionProperties: {
                            key11: "value11",
                            key12: "value12",
                        },
                    },
                    {
                        actionGroupId: "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup",
                        actionProperties: {
                            key21: "value21",
                            key22: "value22",
                        },
                    },
                ],
                alert: "Billing_Processing_Very_Slow",
                annotations: {
                    annotationName1: "annotationValue1",
                },
                enabled: true,
                expression: "job_type:billing_jobs_duration_seconds:99p5m > 30",
                "for": "PT5M",
                labels: {
                    team: "prod",
                },
                resolveConfiguration: {
                    autoResolved: true,
                    timeToResolve: "PT10M",
                },
                severity: 2,
            },
        ],
        scopes: ["/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"],
    });
    
    resources:
      prometheusRuleGroup:
        type: azure-native:alertsmanagement:PrometheusRuleGroup
        properties:
          clusterName: myClusterName
          description: This is the description of the following rule group
          enabled: true
          interval: PT10M
          location: East US
          resourceGroupName: promResourceGroup
          ruleGroupName: myPrometheusRuleGroup
          rules:
            - expression: histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service="billing-processing"}[5m])) by (job_type))
              labels:
                team: prod
              record: job_type:billing_jobs_duration_seconds:99p5m
            - actions:
                - actionGroupId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup
                  actionProperties:
                    key11: value11
                    key12: value12
                - actionGroupId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup
                  actionProperties:
                    key21: value21
                    key22: value22
              alert: Billing_Processing_Very_Slow
              annotations:
                annotationName1: annotationValue1
              enabled: true
              expression: job_type:billing_jobs_duration_seconds:99p5m > 30
              for: PT5M
              labels:
                team: prod
              resolveConfiguration:
                autoResolved: true
                timeToResolve: PT10M
              severity: 2
          scopes:
            - /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace
    

    Create or Update a cluster centric PrometheusRuleGroup

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var prometheusRuleGroup = new AzureNative.AlertsManagement.PrometheusRuleGroup("prometheusRuleGroup", new()
        {
            ClusterName = "myClusterName",
            Description = "This is a rule group with culster centric configuration",
            Interval = "PT10M",
            Location = "East US",
            ResourceGroupName = "promResourceGroup",
            RuleGroupName = "myPrometheusRuleGroup",
            Rules = new[]
            {
                new AzureNative.AlertsManagement.Inputs.PrometheusRuleArgs
                {
                    Actions = new() { },
                    Alert = "Billing_Processing_Very_Slow",
                    Annotations = 
                    {
                        { "annotationName1", "annotationValue1" },
                    },
                    Enabled = true,
                    Expression = "job_type:billing_jobs_duration_seconds:99p5m > 30",
                    For = "PT5M",
                    Labels = 
                    {
                        { "team", "prod" },
                    },
                    ResolveConfiguration = new AzureNative.AlertsManagement.Inputs.PrometheusRuleResolveConfigurationArgs
                    {
                        AutoResolved = true,
                        TimeToResolve = "PT10M",
                    },
                    Severity = 2,
                },
            },
            Scopes = new[]
            {
                "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace",
                "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myClusterName",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/alertsmanagement/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := alertsmanagement.NewPrometheusRuleGroup(ctx, "prometheusRuleGroup", &alertsmanagement.PrometheusRuleGroupArgs{
    			ClusterName:       pulumi.String("myClusterName"),
    			Description:       pulumi.String("This is a rule group with culster centric configuration"),
    			Interval:          pulumi.String("PT10M"),
    			Location:          pulumi.String("East US"),
    			ResourceGroupName: pulumi.String("promResourceGroup"),
    			RuleGroupName:     pulumi.String("myPrometheusRuleGroup"),
    			Rules: alertsmanagement.PrometheusRuleArray{
    				&alertsmanagement.PrometheusRuleArgs{
    					Actions: alertsmanagement.PrometheusRuleGroupActionArray{},
    					Alert:   pulumi.String("Billing_Processing_Very_Slow"),
    					Annotations: pulumi.StringMap{
    						"annotationName1": pulumi.String("annotationValue1"),
    					},
    					Enabled:    pulumi.Bool(true),
    					Expression: pulumi.String("job_type:billing_jobs_duration_seconds:99p5m > 30"),
    					For:        pulumi.String("PT5M"),
    					Labels: pulumi.StringMap{
    						"team": pulumi.String("prod"),
    					},
    					ResolveConfiguration: &alertsmanagement.PrometheusRuleResolveConfigurationArgs{
    						AutoResolved:  pulumi.Bool(true),
    						TimeToResolve: pulumi.String("PT10M"),
    					},
    					Severity: pulumi.Int(2),
    				},
    			},
    			Scopes: pulumi.StringArray{
    				pulumi.String("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"),
    				pulumi.String("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myClusterName"),
    			},
    		})
    		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.alertsmanagement.PrometheusRuleGroup;
    import com.pulumi.azurenative.alertsmanagement.PrometheusRuleGroupArgs;
    import com.pulumi.azurenative.alertsmanagement.inputs.PrometheusRuleArgs;
    import com.pulumi.azurenative.alertsmanagement.inputs.PrometheusRuleResolveConfigurationArgs;
    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 prometheusRuleGroup = new PrometheusRuleGroup("prometheusRuleGroup", PrometheusRuleGroupArgs.builder()        
                .clusterName("myClusterName")
                .description("This is a rule group with culster centric configuration")
                .interval("PT10M")
                .location("East US")
                .resourceGroupName("promResourceGroup")
                .ruleGroupName("myPrometheusRuleGroup")
                .rules(PrometheusRuleArgs.builder()
                    .actions()
                    .alert("Billing_Processing_Very_Slow")
                    .annotations(Map.of("annotationName1", "annotationValue1"))
                    .enabled(true)
                    .expression("job_type:billing_jobs_duration_seconds:99p5m > 30")
                    .for_("PT5M")
                    .labels(Map.of("team", "prod"))
                    .resolveConfiguration(PrometheusRuleResolveConfigurationArgs.builder()
                        .autoResolved(true)
                        .timeToResolve("PT10M")
                        .build())
                    .severity(2)
                    .build())
                .scopes(            
                    "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace",
                    "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myClusterName")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    prometheus_rule_group = azure_native.alertsmanagement.PrometheusRuleGroup("prometheusRuleGroup",
        cluster_name="myClusterName",
        description="This is a rule group with culster centric configuration",
        interval="PT10M",
        location="East US",
        resource_group_name="promResourceGroup",
        rule_group_name="myPrometheusRuleGroup",
        rules=[azure_native.alertsmanagement.PrometheusRuleArgs(
            actions=[],
            alert="Billing_Processing_Very_Slow",
            annotations={
                "annotationName1": "annotationValue1",
            },
            enabled=True,
            expression="job_type:billing_jobs_duration_seconds:99p5m > 30",
            for_="PT5M",
            labels={
                "team": "prod",
            },
            resolve_configuration=azure_native.alertsmanagement.PrometheusRuleResolveConfigurationArgs(
                auto_resolved=True,
                time_to_resolve="PT10M",
            ),
            severity=2,
        )],
        scopes=[
            "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace",
            "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myClusterName",
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const prometheusRuleGroup = new azure_native.alertsmanagement.PrometheusRuleGroup("prometheusRuleGroup", {
        clusterName: "myClusterName",
        description: "This is a rule group with culster centric configuration",
        interval: "PT10M",
        location: "East US",
        resourceGroupName: "promResourceGroup",
        ruleGroupName: "myPrometheusRuleGroup",
        rules: [{
            actions: [],
            alert: "Billing_Processing_Very_Slow",
            annotations: {
                annotationName1: "annotationValue1",
            },
            enabled: true,
            expression: "job_type:billing_jobs_duration_seconds:99p5m > 30",
            "for": "PT5M",
            labels: {
                team: "prod",
            },
            resolveConfiguration: {
                autoResolved: true,
                timeToResolve: "PT10M",
            },
            severity: 2,
        }],
        scopes: [
            "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace",
            "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myClusterName",
        ],
    });
    
    resources:
      prometheusRuleGroup:
        type: azure-native:alertsmanagement:PrometheusRuleGroup
        properties:
          clusterName: myClusterName
          description: This is a rule group with culster centric configuration
          interval: PT10M
          location: East US
          resourceGroupName: promResourceGroup
          ruleGroupName: myPrometheusRuleGroup
          rules:
            - actions: []
              alert: Billing_Processing_Very_Slow
              annotations:
                annotationName1: annotationValue1
              enabled: true
              expression: job_type:billing_jobs_duration_seconds:99p5m > 30
              for: PT5M
              labels:
                team: prod
              resolveConfiguration:
                autoResolved: true
                timeToResolve: PT10M
              severity: 2
          scopes:
            - /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace
            - /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myClusterName
    

    Create PrometheusRuleGroup Resource

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

    Constructor syntax

    new PrometheusRuleGroup(name: string, args: PrometheusRuleGroupArgs, opts?: CustomResourceOptions);
    @overload
    def PrometheusRuleGroup(resource_name: str,
                            args: PrometheusRuleGroupArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def PrometheusRuleGroup(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            resource_group_name: Optional[str] = None,
                            rules: Optional[Sequence[PrometheusRuleArgs]] = None,
                            scopes: Optional[Sequence[str]] = None,
                            cluster_name: Optional[str] = None,
                            description: Optional[str] = None,
                            enabled: Optional[bool] = None,
                            interval: Optional[str] = None,
                            location: Optional[str] = None,
                            rule_group_name: Optional[str] = None,
                            tags: Optional[Mapping[str, str]] = None)
    func NewPrometheusRuleGroup(ctx *Context, name string, args PrometheusRuleGroupArgs, opts ...ResourceOption) (*PrometheusRuleGroup, error)
    public PrometheusRuleGroup(string name, PrometheusRuleGroupArgs args, CustomResourceOptions? opts = null)
    public PrometheusRuleGroup(String name, PrometheusRuleGroupArgs args)
    public PrometheusRuleGroup(String name, PrometheusRuleGroupArgs args, CustomResourceOptions options)
    
    type: azure-native:alertsmanagement:PrometheusRuleGroup
    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 PrometheusRuleGroupArgs
    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 PrometheusRuleGroupArgs
    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 PrometheusRuleGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrometheusRuleGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrometheusRuleGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var prometheusRuleGroupResource = new AzureNative.AlertsManagement.PrometheusRuleGroup("prometheusRuleGroupResource", new()
    {
        ResourceGroupName = "string",
        Rules = new[]
        {
            new AzureNative.AlertsManagement.Inputs.PrometheusRuleArgs
            {
                Expression = "string",
                Actions = new[]
                {
                    new AzureNative.AlertsManagement.Inputs.PrometheusRuleGroupActionArgs
                    {
                        ActionGroupId = "string",
                        ActionProperties = 
                        {
                            { "string", "string" },
                        },
                    },
                },
                Alert = "string",
                Annotations = 
                {
                    { "string", "string" },
                },
                Enabled = false,
                For = "string",
                Labels = 
                {
                    { "string", "string" },
                },
                Record = "string",
                ResolveConfiguration = new AzureNative.AlertsManagement.Inputs.PrometheusRuleResolveConfigurationArgs
                {
                    AutoResolved = false,
                    TimeToResolve = "string",
                },
                Severity = 0,
            },
        },
        Scopes = new[]
        {
            "string",
        },
        ClusterName = "string",
        Description = "string",
        Enabled = false,
        Interval = "string",
        Location = "string",
        RuleGroupName = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := alertsmanagement.NewPrometheusRuleGroup(ctx, "prometheusRuleGroupResource", &alertsmanagement.PrometheusRuleGroupArgs{
    ResourceGroupName: pulumi.String("string"),
    Rules: alertsmanagement.PrometheusRuleArray{
    &alertsmanagement.PrometheusRuleArgs{
    Expression: pulumi.String("string"),
    Actions: alertsmanagement.PrometheusRuleGroupActionArray{
    &alertsmanagement.PrometheusRuleGroupActionArgs{
    ActionGroupId: pulumi.String("string"),
    ActionProperties: pulumi.StringMap{
    "string": pulumi.String("string"),
    },
    },
    },
    Alert: pulumi.String("string"),
    Annotations: pulumi.StringMap{
    "string": pulumi.String("string"),
    },
    Enabled: pulumi.Bool(false),
    For: pulumi.String("string"),
    Labels: pulumi.StringMap{
    "string": pulumi.String("string"),
    },
    Record: pulumi.String("string"),
    ResolveConfiguration: &alertsmanagement.PrometheusRuleResolveConfigurationArgs{
    AutoResolved: pulumi.Bool(false),
    TimeToResolve: pulumi.String("string"),
    },
    Severity: pulumi.Int(0),
    },
    },
    Scopes: pulumi.StringArray{
    pulumi.String("string"),
    },
    ClusterName: pulumi.String("string"),
    Description: pulumi.String("string"),
    Enabled: pulumi.Bool(false),
    Interval: pulumi.String("string"),
    Location: pulumi.String("string"),
    RuleGroupName: pulumi.String("string"),
    Tags: pulumi.StringMap{
    "string": pulumi.String("string"),
    },
    })
    
    var prometheusRuleGroupResource = new PrometheusRuleGroup("prometheusRuleGroupResource", PrometheusRuleGroupArgs.builder()        
        .resourceGroupName("string")
        .rules(PrometheusRuleArgs.builder()
            .expression("string")
            .actions(PrometheusRuleGroupActionArgs.builder()
                .actionGroupId("string")
                .actionProperties(Map.of("string", "string"))
                .build())
            .alert("string")
            .annotations(Map.of("string", "string"))
            .enabled(false)
            .for_("string")
            .labels(Map.of("string", "string"))
            .record("string")
            .resolveConfiguration(PrometheusRuleResolveConfigurationArgs.builder()
                .autoResolved(false)
                .timeToResolve("string")
                .build())
            .severity(0)
            .build())
        .scopes("string")
        .clusterName("string")
        .description("string")
        .enabled(false)
        .interval("string")
        .location("string")
        .ruleGroupName("string")
        .tags(Map.of("string", "string"))
        .build());
    
    prometheus_rule_group_resource = azure_native.alertsmanagement.PrometheusRuleGroup("prometheusRuleGroupResource",
        resource_group_name="string",
        rules=[azure_native.alertsmanagement.PrometheusRuleArgs(
            expression="string",
            actions=[azure_native.alertsmanagement.PrometheusRuleGroupActionArgs(
                action_group_id="string",
                action_properties={
                    "string": "string",
                },
            )],
            alert="string",
            annotations={
                "string": "string",
            },
            enabled=False,
            for_="string",
            labels={
                "string": "string",
            },
            record="string",
            resolve_configuration=azure_native.alertsmanagement.PrometheusRuleResolveConfigurationArgs(
                auto_resolved=False,
                time_to_resolve="string",
            ),
            severity=0,
        )],
        scopes=["string"],
        cluster_name="string",
        description="string",
        enabled=False,
        interval="string",
        location="string",
        rule_group_name="string",
        tags={
            "string": "string",
        })
    
    const prometheusRuleGroupResource = new azure_native.alertsmanagement.PrometheusRuleGroup("prometheusRuleGroupResource", {
        resourceGroupName: "string",
        rules: [{
            expression: "string",
            actions: [{
                actionGroupId: "string",
                actionProperties: {
                    string: "string",
                },
            }],
            alert: "string",
            annotations: {
                string: "string",
            },
            enabled: false,
            "for": "string",
            labels: {
                string: "string",
            },
            record: "string",
            resolveConfiguration: {
                autoResolved: false,
                timeToResolve: "string",
            },
            severity: 0,
        }],
        scopes: ["string"],
        clusterName: "string",
        description: "string",
        enabled: false,
        interval: "string",
        location: "string",
        ruleGroupName: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure-native:alertsmanagement:PrometheusRuleGroup
    properties:
        clusterName: string
        description: string
        enabled: false
        interval: string
        location: string
        resourceGroupName: string
        ruleGroupName: string
        rules:
            - actions:
                - actionGroupId: string
                  actionProperties:
                    string: string
              alert: string
              annotations:
                string: string
              enabled: false
              expression: string
              for: string
              labels:
                string: string
              record: string
              resolveConfiguration:
                autoResolved: false
                timeToResolve: string
              severity: 0
        scopes:
            - string
        tags:
            string: string
    

    PrometheusRuleGroup Resource Properties

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

    Inputs

    The PrometheusRuleGroup resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    Rules List<Pulumi.AzureNative.AlertsManagement.Inputs.PrometheusRule>
    Defines the rules in the Prometheus rule group.
    Scopes List<string>
    Target Azure Monitor workspaces resource ids. This api-version is currently limited to creating with one scope. This may change in future.
    ClusterName string
    Apply rule to data from a specific cluster.
    Description string
    Rule group description.
    Enabled bool
    Enable/disable rule group.
    Interval string
    The interval in which to run the Prometheus rule group represented in ISO 8601 duration format. Should be between 1 and 15 minutes
    Location string
    The geo-location where the resource lives
    RuleGroupName string
    The name of the rule group.
    Tags Dictionary<string, string>
    Resource tags.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    Rules []PrometheusRuleArgs
    Defines the rules in the Prometheus rule group.
    Scopes []string
    Target Azure Monitor workspaces resource ids. This api-version is currently limited to creating with one scope. This may change in future.
    ClusterName string
    Apply rule to data from a specific cluster.
    Description string
    Rule group description.
    Enabled bool
    Enable/disable rule group.
    Interval string
    The interval in which to run the Prometheus rule group represented in ISO 8601 duration format. Should be between 1 and 15 minutes
    Location string
    The geo-location where the resource lives
    RuleGroupName string
    The name of the rule group.
    Tags map[string]string
    Resource tags.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    rules List<PrometheusRule>
    Defines the rules in the Prometheus rule group.
    scopes List<String>
    Target Azure Monitor workspaces resource ids. This api-version is currently limited to creating with one scope. This may change in future.
    clusterName String
    Apply rule to data from a specific cluster.
    description String
    Rule group description.
    enabled Boolean
    Enable/disable rule group.
    interval String
    The interval in which to run the Prometheus rule group represented in ISO 8601 duration format. Should be between 1 and 15 minutes
    location String
    The geo-location where the resource lives
    ruleGroupName String
    The name of the rule group.
    tags Map<String,String>
    Resource tags.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    rules PrometheusRule[]
    Defines the rules in the Prometheus rule group.
    scopes string[]
    Target Azure Monitor workspaces resource ids. This api-version is currently limited to creating with one scope. This may change in future.
    clusterName string
    Apply rule to data from a specific cluster.
    description string
    Rule group description.
    enabled boolean
    Enable/disable rule group.
    interval string
    The interval in which to run the Prometheus rule group represented in ISO 8601 duration format. Should be between 1 and 15 minutes
    location string
    The geo-location where the resource lives
    ruleGroupName string
    The name of the rule group.
    tags {[key: string]: string}
    Resource tags.
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    rules Sequence[PrometheusRuleArgs]
    Defines the rules in the Prometheus rule group.
    scopes Sequence[str]
    Target Azure Monitor workspaces resource ids. This api-version is currently limited to creating with one scope. This may change in future.
    cluster_name str
    Apply rule to data from a specific cluster.
    description str
    Rule group description.
    enabled bool
    Enable/disable rule group.
    interval str
    The interval in which to run the Prometheus rule group represented in ISO 8601 duration format. Should be between 1 and 15 minutes
    location str
    The geo-location where the resource lives
    rule_group_name str
    The name of the rule group.
    tags Mapping[str, str]
    Resource tags.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    rules List<Property Map>
    Defines the rules in the Prometheus rule group.
    scopes List<String>
    Target Azure Monitor workspaces resource ids. This api-version is currently limited to creating with one scope. This may change in future.
    clusterName String
    Apply rule to data from a specific cluster.
    description String
    Rule group description.
    enabled Boolean
    Enable/disable rule group.
    interval String
    The interval in which to run the Prometheus rule group represented in ISO 8601 duration format. Should be between 1 and 15 minutes
    location String
    The geo-location where the resource lives
    ruleGroupName String
    The name of the rule group.
    tags Map<String>
    Resource tags.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    SystemData Pulumi.AzureNative.AlertsManagement.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
    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
    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
    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
    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
    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

    PrometheusRule, PrometheusRuleArgs

    Expression string
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    Actions List<Pulumi.AzureNative.AlertsManagement.Inputs.PrometheusRuleGroupAction>
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    Alert string
    Alert rule name.
    Annotations Dictionary<string, string>
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    Enabled bool
    Enable/disable rule.
    For string
    The amount of time alert must be active before firing.
    Labels Dictionary<string, string>
    Labels to add or overwrite before storing the result.
    Record string
    Recorded metrics name.
    ResolveConfiguration Pulumi.AzureNative.AlertsManagement.Inputs.PrometheusRuleResolveConfiguration
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    Severity int
    The severity of the alerts fired by the rule. Must be between 0 and 4.
    Expression string
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    Actions []PrometheusRuleGroupAction
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    Alert string
    Alert rule name.
    Annotations map[string]string
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    Enabled bool
    Enable/disable rule.
    For string
    The amount of time alert must be active before firing.
    Labels map[string]string
    Labels to add or overwrite before storing the result.
    Record string
    Recorded metrics name.
    ResolveConfiguration PrometheusRuleResolveConfiguration
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    Severity int
    The severity of the alerts fired by the rule. Must be between 0 and 4.
    expression String
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    actions List<PrometheusRuleGroupAction>
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    alert String
    Alert rule name.
    annotations Map<String,String>
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    enabled Boolean
    Enable/disable rule.
    for_ String
    The amount of time alert must be active before firing.
    labels Map<String,String>
    Labels to add or overwrite before storing the result.
    record String
    Recorded metrics name.
    resolveConfiguration PrometheusRuleResolveConfiguration
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    severity Integer
    The severity of the alerts fired by the rule. Must be between 0 and 4.
    expression string
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    actions PrometheusRuleGroupAction[]
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    alert string
    Alert rule name.
    annotations {[key: string]: string}
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    enabled boolean
    Enable/disable rule.
    for string
    The amount of time alert must be active before firing.
    labels {[key: string]: string}
    Labels to add or overwrite before storing the result.
    record string
    Recorded metrics name.
    resolveConfiguration PrometheusRuleResolveConfiguration
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    severity number
    The severity of the alerts fired by the rule. Must be between 0 and 4.
    expression str
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    actions Sequence[PrometheusRuleGroupAction]
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    alert str
    Alert rule name.
    annotations Mapping[str, str]
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    enabled bool
    Enable/disable rule.
    for_ str
    The amount of time alert must be active before firing.
    labels Mapping[str, str]
    Labels to add or overwrite before storing the result.
    record str
    Recorded metrics name.
    resolve_configuration PrometheusRuleResolveConfiguration
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    severity int
    The severity of the alerts fired by the rule. Must be between 0 and 4.
    expression String
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    actions List<Property Map>
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    alert String
    Alert rule name.
    annotations Map<String>
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    enabled Boolean
    Enable/disable rule.
    for String
    The amount of time alert must be active before firing.
    labels Map<String>
    Labels to add or overwrite before storing the result.
    record String
    Recorded metrics name.
    resolveConfiguration Property Map
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    severity Number
    The severity of the alerts fired by the rule. Must be between 0 and 4.

    PrometheusRuleGroupAction, PrometheusRuleGroupActionArgs

    ActionGroupId string
    The resource id of the action group to use.
    ActionProperties Dictionary<string, string>
    The properties of an action group object.
    ActionGroupId string
    The resource id of the action group to use.
    ActionProperties map[string]string
    The properties of an action group object.
    actionGroupId String
    The resource id of the action group to use.
    actionProperties Map<String,String>
    The properties of an action group object.
    actionGroupId string
    The resource id of the action group to use.
    actionProperties {[key: string]: string}
    The properties of an action group object.
    action_group_id str
    The resource id of the action group to use.
    action_properties Mapping[str, str]
    The properties of an action group object.
    actionGroupId String
    The resource id of the action group to use.
    actionProperties Map<String>
    The properties of an action group object.

    PrometheusRuleGroupActionResponse, PrometheusRuleGroupActionResponseArgs

    ActionGroupId string
    The resource id of the action group to use.
    ActionProperties Dictionary<string, string>
    The properties of an action group object.
    ActionGroupId string
    The resource id of the action group to use.
    ActionProperties map[string]string
    The properties of an action group object.
    actionGroupId String
    The resource id of the action group to use.
    actionProperties Map<String,String>
    The properties of an action group object.
    actionGroupId string
    The resource id of the action group to use.
    actionProperties {[key: string]: string}
    The properties of an action group object.
    action_group_id str
    The resource id of the action group to use.
    action_properties Mapping[str, str]
    The properties of an action group object.
    actionGroupId String
    The resource id of the action group to use.
    actionProperties Map<String>
    The properties of an action group object.

    PrometheusRuleResolveConfiguration, PrometheusRuleResolveConfigurationArgs

    AutoResolved bool
    Enable alert auto-resolution.
    TimeToResolve string
    Alert auto-resolution timeout.
    AutoResolved bool
    Enable alert auto-resolution.
    TimeToResolve string
    Alert auto-resolution timeout.
    autoResolved Boolean
    Enable alert auto-resolution.
    timeToResolve String
    Alert auto-resolution timeout.
    autoResolved boolean
    Enable alert auto-resolution.
    timeToResolve string
    Alert auto-resolution timeout.
    auto_resolved bool
    Enable alert auto-resolution.
    time_to_resolve str
    Alert auto-resolution timeout.
    autoResolved Boolean
    Enable alert auto-resolution.
    timeToResolve String
    Alert auto-resolution timeout.

    PrometheusRuleResolveConfigurationResponse, PrometheusRuleResolveConfigurationResponseArgs

    AutoResolved bool
    Enable alert auto-resolution.
    TimeToResolve string
    Alert auto-resolution timeout.
    AutoResolved bool
    Enable alert auto-resolution.
    TimeToResolve string
    Alert auto-resolution timeout.
    autoResolved Boolean
    Enable alert auto-resolution.
    timeToResolve String
    Alert auto-resolution timeout.
    autoResolved boolean
    Enable alert auto-resolution.
    timeToResolve string
    Alert auto-resolution timeout.
    auto_resolved bool
    Enable alert auto-resolution.
    time_to_resolve str
    Alert auto-resolution timeout.
    autoResolved Boolean
    Enable alert auto-resolution.
    timeToResolve String
    Alert auto-resolution timeout.

    PrometheusRuleResponse, PrometheusRuleResponseArgs

    Expression string
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    Actions List<Pulumi.AzureNative.AlertsManagement.Inputs.PrometheusRuleGroupActionResponse>
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    Alert string
    Alert rule name.
    Annotations Dictionary<string, string>
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    Enabled bool
    Enable/disable rule.
    For string
    The amount of time alert must be active before firing.
    Labels Dictionary<string, string>
    Labels to add or overwrite before storing the result.
    Record string
    Recorded metrics name.
    ResolveConfiguration Pulumi.AzureNative.AlertsManagement.Inputs.PrometheusRuleResolveConfigurationResponse
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    Severity int
    The severity of the alerts fired by the rule. Must be between 0 and 4.
    Expression string
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    Actions []PrometheusRuleGroupActionResponse
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    Alert string
    Alert rule name.
    Annotations map[string]string
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    Enabled bool
    Enable/disable rule.
    For string
    The amount of time alert must be active before firing.
    Labels map[string]string
    Labels to add or overwrite before storing the result.
    Record string
    Recorded metrics name.
    ResolveConfiguration PrometheusRuleResolveConfigurationResponse
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    Severity int
    The severity of the alerts fired by the rule. Must be between 0 and 4.
    expression String
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    actions List<PrometheusRuleGroupActionResponse>
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    alert String
    Alert rule name.
    annotations Map<String,String>
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    enabled Boolean
    Enable/disable rule.
    for_ String
    The amount of time alert must be active before firing.
    labels Map<String,String>
    Labels to add or overwrite before storing the result.
    record String
    Recorded metrics name.
    resolveConfiguration PrometheusRuleResolveConfigurationResponse
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    severity Integer
    The severity of the alerts fired by the rule. Must be between 0 and 4.
    expression string
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    actions PrometheusRuleGroupActionResponse[]
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    alert string
    Alert rule name.
    annotations {[key: string]: string}
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    enabled boolean
    Enable/disable rule.
    for string
    The amount of time alert must be active before firing.
    labels {[key: string]: string}
    Labels to add or overwrite before storing the result.
    record string
    Recorded metrics name.
    resolveConfiguration PrometheusRuleResolveConfigurationResponse
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    severity number
    The severity of the alerts fired by the rule. Must be between 0 and 4.
    expression str
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    actions Sequence[PrometheusRuleGroupActionResponse]
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    alert str
    Alert rule name.
    annotations Mapping[str, str]
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    enabled bool
    Enable/disable rule.
    for_ str
    The amount of time alert must be active before firing.
    labels Mapping[str, str]
    Labels to add or overwrite before storing the result.
    record str
    Recorded metrics name.
    resolve_configuration PrometheusRuleResolveConfigurationResponse
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    severity int
    The severity of the alerts fired by the rule. Must be between 0 and 4.
    expression String
    The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
    actions List<Property Map>
    Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
    alert String
    Alert rule name.
    annotations Map<String>
    The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
    enabled Boolean
    Enable/disable rule.
    for String
    The amount of time alert must be active before firing.
    labels Map<String>
    Labels to add or overwrite before storing the result.
    record String
    Recorded metrics name.
    resolveConfiguration Property Map
    Defines the configuration for resolving fired alerts. Only relevant for alerts.
    severity Number
    The severity of the alerts fired by the rule. Must be between 0 and 4.

    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:alertsmanagement:PrometheusRuleGroup myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName} 
    

    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.39.0 published on Monday, Apr 29, 2024 by Pulumi