1. Packages
  2. Azure Classic
  3. API Docs
  4. monitoring
  5. AlertPrometheusRuleGroup

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.monitoring.AlertPrometheusRuleGroup

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages an Alert Management Prometheus Rule Group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleActionGroup = new azure.monitoring.ActionGroup("example", {
        name: "example-mag",
        resourceGroupName: example.name,
        shortName: "testag",
    });
    const exampleWorkspace = new azure.monitoring.Workspace("example", {
        name: "example-amw",
        resourceGroupName: example.name,
        location: example.location,
    });
    const exampleKubernetesCluster = new azure.containerservice.KubernetesCluster("example", {
        name: "example-cluster",
        location: example.location,
        resourceGroupName: example.name,
        dnsPrefix: "example-aks",
        defaultNodePool: {
            name: "default",
            nodeCount: 1,
            vmSize: "Standard_DS2_v2",
            hostEncryptionEnabled: true,
        },
        identity: {
            type: "SystemAssigned",
        },
    });
    const exampleAlertPrometheusRuleGroup = new azure.monitoring.AlertPrometheusRuleGroup("example", {
        name: "example-amprg",
        location: "West Europe",
        resourceGroupName: example.name,
        clusterName: exampleKubernetesCluster.name,
        description: "This is the description of the following rule group",
        ruleGroupEnabled: false,
        interval: "PT1M",
        scopes: [exampleWorkspace.id],
        rules: [
            {
                enabled: false,
                expression: "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))\n",
                record: "job_type:billing_jobs_duration_seconds:99p5m",
                labels: {
                    team: "prod",
                },
            },
            {
                alert: "Billing_Processing_Very_Slow",
                enabled: true,
                expression: "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))\n",
                "for": "PT5M",
                severity: 2,
                actions: [{
                    actionGroupId: exampleActionGroup.id,
                }],
                alertResolution: {
                    autoResolved: true,
                    timeToResolve: "PT10M",
                },
                annotations: {
                    annotationName: "annotationValue",
                },
                labels: {
                    team: "prod",
                },
            },
        ],
        tags: {
            key: "value",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_action_group = azure.monitoring.ActionGroup("example",
        name="example-mag",
        resource_group_name=example.name,
        short_name="testag")
    example_workspace = azure.monitoring.Workspace("example",
        name="example-amw",
        resource_group_name=example.name,
        location=example.location)
    example_kubernetes_cluster = azure.containerservice.KubernetesCluster("example",
        name="example-cluster",
        location=example.location,
        resource_group_name=example.name,
        dns_prefix="example-aks",
        default_node_pool={
            "name": "default",
            "node_count": 1,
            "vm_size": "Standard_DS2_v2",
            "host_encryption_enabled": True,
        },
        identity={
            "type": "SystemAssigned",
        })
    example_alert_prometheus_rule_group = azure.monitoring.AlertPrometheusRuleGroup("example",
        name="example-amprg",
        location="West Europe",
        resource_group_name=example.name,
        cluster_name=example_kubernetes_cluster.name,
        description="This is the description of the following rule group",
        rule_group_enabled=False,
        interval="PT1M",
        scopes=[example_workspace.id],
        rules=[
            {
                "enabled": False,
                "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))\n",
                "record": "job_type:billing_jobs_duration_seconds:99p5m",
                "labels": {
                    "team": "prod",
                },
            },
            {
                "alert": "Billing_Processing_Very_Slow",
                "enabled": True,
                "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))\n",
                "for_": "PT5M",
                "severity": 2,
                "actions": [{
                    "action_group_id": example_action_group.id,
                }],
                "alert_resolution": {
                    "auto_resolved": True,
                    "time_to_resolve": "PT10M",
                },
                "annotations": {
                    "annotationName": "annotationValue",
                },
                "labels": {
                    "team": "prod",
                },
            },
        ],
        tags={
            "key": "value",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{
    			Name:              pulumi.String("example-mag"),
    			ResourceGroupName: example.Name,
    			ShortName:         pulumi.String("testag"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleWorkspace, err := monitoring.NewWorkspace(ctx, "example", &monitoring.WorkspaceArgs{
    			Name:              pulumi.String("example-amw"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    		})
    		if err != nil {
    			return err
    		}
    		exampleKubernetesCluster, err := containerservice.NewKubernetesCluster(ctx, "example", &containerservice.KubernetesClusterArgs{
    			Name:              pulumi.String("example-cluster"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			DnsPrefix:         pulumi.String("example-aks"),
    			DefaultNodePool: &containerservice.KubernetesClusterDefaultNodePoolArgs{
    				Name:                  pulumi.String("default"),
    				NodeCount:             pulumi.Int(1),
    				VmSize:                pulumi.String("Standard_DS2_v2"),
    				HostEncryptionEnabled: pulumi.Bool(true),
    			},
    			Identity: &containerservice.KubernetesClusterIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = monitoring.NewAlertPrometheusRuleGroup(ctx, "example", &monitoring.AlertPrometheusRuleGroupArgs{
    			Name:              pulumi.String("example-amprg"),
    			Location:          pulumi.String("West Europe"),
    			ResourceGroupName: example.Name,
    			ClusterName:       exampleKubernetesCluster.Name,
    			Description:       pulumi.String("This is the description of the following rule group"),
    			RuleGroupEnabled:  pulumi.Bool(false),
    			Interval:          pulumi.String("PT1M"),
    			Scopes: pulumi.StringArray{
    				exampleWorkspace.ID(),
    			},
    			Rules: monitoring.AlertPrometheusRuleGroupRuleArray{
    				&monitoring.AlertPrometheusRuleGroupRuleArgs{
    					Enabled:    pulumi.Bool(false),
    					Expression: pulumi.String("histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))\n"),
    					Record:     pulumi.String("job_type:billing_jobs_duration_seconds:99p5m"),
    					Labels: pulumi.StringMap{
    						"team": pulumi.String("prod"),
    					},
    				},
    				&monitoring.AlertPrometheusRuleGroupRuleArgs{
    					Alert:      pulumi.String("Billing_Processing_Very_Slow"),
    					Enabled:    pulumi.Bool(true),
    					Expression: pulumi.String("histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))\n"),
    					For:        pulumi.String("PT5M"),
    					Severity:   pulumi.Int(2),
    					Actions: monitoring.AlertPrometheusRuleGroupRuleActionArray{
    						&monitoring.AlertPrometheusRuleGroupRuleActionArgs{
    							ActionGroupId: exampleActionGroup.ID(),
    						},
    					},
    					AlertResolution: &monitoring.AlertPrometheusRuleGroupRuleAlertResolutionArgs{
    						AutoResolved:  pulumi.Bool(true),
    						TimeToResolve: pulumi.String("PT10M"),
    					},
    					Annotations: pulumi.StringMap{
    						"annotationName": pulumi.String("annotationValue"),
    					},
    					Labels: pulumi.StringMap{
    						"team": pulumi.String("prod"),
    					},
    				},
    			},
    			Tags: pulumi.StringMap{
    				"key": pulumi.String("value"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleActionGroup = new Azure.Monitoring.ActionGroup("example", new()
        {
            Name = "example-mag",
            ResourceGroupName = example.Name,
            ShortName = "testag",
        });
    
        var exampleWorkspace = new Azure.Monitoring.Workspace("example", new()
        {
            Name = "example-amw",
            ResourceGroupName = example.Name,
            Location = example.Location,
        });
    
        var exampleKubernetesCluster = new Azure.ContainerService.KubernetesCluster("example", new()
        {
            Name = "example-cluster",
            Location = example.Location,
            ResourceGroupName = example.Name,
            DnsPrefix = "example-aks",
            DefaultNodePool = new Azure.ContainerService.Inputs.KubernetesClusterDefaultNodePoolArgs
            {
                Name = "default",
                NodeCount = 1,
                VmSize = "Standard_DS2_v2",
                HostEncryptionEnabled = true,
            },
            Identity = new Azure.ContainerService.Inputs.KubernetesClusterIdentityArgs
            {
                Type = "SystemAssigned",
            },
        });
    
        var exampleAlertPrometheusRuleGroup = new Azure.Monitoring.AlertPrometheusRuleGroup("example", new()
        {
            Name = "example-amprg",
            Location = "West Europe",
            ResourceGroupName = example.Name,
            ClusterName = exampleKubernetesCluster.Name,
            Description = "This is the description of the following rule group",
            RuleGroupEnabled = false,
            Interval = "PT1M",
            Scopes = new[]
            {
                exampleWorkspace.Id,
            },
            Rules = new[]
            {
                new Azure.Monitoring.Inputs.AlertPrometheusRuleGroupRuleArgs
                {
                    Enabled = false,
                    Expression = @"histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=""billing-processing""}[5m])) by (job_type))
    ",
                    Record = "job_type:billing_jobs_duration_seconds:99p5m",
                    Labels = 
                    {
                        { "team", "prod" },
                    },
                },
                new Azure.Monitoring.Inputs.AlertPrometheusRuleGroupRuleArgs
                {
                    Alert = "Billing_Processing_Very_Slow",
                    Enabled = true,
                    Expression = @"histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=""billing-processing""}[5m])) by (job_type))
    ",
                    For = "PT5M",
                    Severity = 2,
                    Actions = new[]
                    {
                        new Azure.Monitoring.Inputs.AlertPrometheusRuleGroupRuleActionArgs
                        {
                            ActionGroupId = exampleActionGroup.Id,
                        },
                    },
                    AlertResolution = new Azure.Monitoring.Inputs.AlertPrometheusRuleGroupRuleAlertResolutionArgs
                    {
                        AutoResolved = true,
                        TimeToResolve = "PT10M",
                    },
                    Annotations = 
                    {
                        { "annotationName", "annotationValue" },
                    },
                    Labels = 
                    {
                        { "team", "prod" },
                    },
                },
            },
            Tags = 
            {
                { "key", "value" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.monitoring.ActionGroup;
    import com.pulumi.azure.monitoring.ActionGroupArgs;
    import com.pulumi.azure.monitoring.Workspace;
    import com.pulumi.azure.monitoring.WorkspaceArgs;
    import com.pulumi.azure.containerservice.KubernetesCluster;
    import com.pulumi.azure.containerservice.KubernetesClusterArgs;
    import com.pulumi.azure.containerservice.inputs.KubernetesClusterDefaultNodePoolArgs;
    import com.pulumi.azure.containerservice.inputs.KubernetesClusterIdentityArgs;
    import com.pulumi.azure.monitoring.AlertPrometheusRuleGroup;
    import com.pulumi.azure.monitoring.AlertPrometheusRuleGroupArgs;
    import com.pulumi.azure.monitoring.inputs.AlertPrometheusRuleGroupRuleArgs;
    import com.pulumi.azure.monitoring.inputs.AlertPrometheusRuleGroupRuleAlertResolutionArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleActionGroup = new ActionGroup("exampleActionGroup", ActionGroupArgs.builder()
                .name("example-mag")
                .resourceGroupName(example.name())
                .shortName("testag")
                .build());
    
            var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
                .name("example-amw")
                .resourceGroupName(example.name())
                .location(example.location())
                .build());
    
            var exampleKubernetesCluster = new KubernetesCluster("exampleKubernetesCluster", KubernetesClusterArgs.builder()
                .name("example-cluster")
                .location(example.location())
                .resourceGroupName(example.name())
                .dnsPrefix("example-aks")
                .defaultNodePool(KubernetesClusterDefaultNodePoolArgs.builder()
                    .name("default")
                    .nodeCount(1)
                    .vmSize("Standard_DS2_v2")
                    .hostEncryptionEnabled(true)
                    .build())
                .identity(KubernetesClusterIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .build());
    
            var exampleAlertPrometheusRuleGroup = new AlertPrometheusRuleGroup("exampleAlertPrometheusRuleGroup", AlertPrometheusRuleGroupArgs.builder()
                .name("example-amprg")
                .location("West Europe")
                .resourceGroupName(example.name())
                .clusterName(exampleKubernetesCluster.name())
                .description("This is the description of the following rule group")
                .ruleGroupEnabled(false)
                .interval("PT1M")
                .scopes(exampleWorkspace.id())
                .rules(            
                    AlertPrometheusRuleGroupRuleArgs.builder()
                        .enabled(false)
                        .expression("""
    histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service="billing-processing"}[5m])) by (job_type))
                        """)
                        .record("job_type:billing_jobs_duration_seconds:99p5m")
                        .labels(Map.of("team", "prod"))
                        .build(),
                    AlertPrometheusRuleGroupRuleArgs.builder()
                        .alert("Billing_Processing_Very_Slow")
                        .enabled(true)
                        .expression("""
    histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service="billing-processing"}[5m])) by (job_type))
                        """)
                        .for_("PT5M")
                        .severity(2)
                        .actions(AlertPrometheusRuleGroupRuleActionArgs.builder()
                            .actionGroupId(exampleActionGroup.id())
                            .build())
                        .alertResolution(AlertPrometheusRuleGroupRuleAlertResolutionArgs.builder()
                            .autoResolved(true)
                            .timeToResolve("PT10M")
                            .build())
                        .annotations(Map.of("annotationName", "annotationValue"))
                        .labels(Map.of("team", "prod"))
                        .build())
                .tags(Map.of("key", "value"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleActionGroup:
        type: azure:monitoring:ActionGroup
        name: example
        properties:
          name: example-mag
          resourceGroupName: ${example.name}
          shortName: testag
      exampleWorkspace:
        type: azure:monitoring:Workspace
        name: example
        properties:
          name: example-amw
          resourceGroupName: ${example.name}
          location: ${example.location}
      exampleKubernetesCluster:
        type: azure:containerservice:KubernetesCluster
        name: example
        properties:
          name: example-cluster
          location: ${example.location}
          resourceGroupName: ${example.name}
          dnsPrefix: example-aks
          defaultNodePool:
            name: default
            nodeCount: 1
            vmSize: Standard_DS2_v2
            hostEncryptionEnabled: true
          identity:
            type: SystemAssigned
      exampleAlertPrometheusRuleGroup:
        type: azure:monitoring:AlertPrometheusRuleGroup
        name: example
        properties:
          name: example-amprg
          location: West Europe
          resourceGroupName: ${example.name}
          clusterName: ${exampleKubernetesCluster.name}
          description: This is the description of the following rule group
          ruleGroupEnabled: false
          interval: PT1M
          scopes:
            - ${exampleWorkspace.id}
          rules:
            - enabled: false
              expression: |
                histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service="billing-processing"}[5m])) by (job_type))            
              record: job_type:billing_jobs_duration_seconds:99p5m
              labels:
                team: prod
            - alert: Billing_Processing_Very_Slow
              enabled: true
              expression: |
                histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service="billing-processing"}[5m])) by (job_type))            
              for: PT5M
              severity: 2
              actions:
                - actionGroupId: ${exampleActionGroup.id}
              alertResolution:
                autoResolved: true
                timeToResolve: PT10M
              annotations:
                annotationName: annotationValue
              labels:
                team: prod
          tags:
            key: value
    

    Create AlertPrometheusRuleGroup Resource

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

    Constructor syntax

    new AlertPrometheusRuleGroup(name: string, args: AlertPrometheusRuleGroupArgs, opts?: CustomResourceOptions);
    @overload
    def AlertPrometheusRuleGroup(resource_name: str,
                                 args: AlertPrometheusRuleGroupArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def AlertPrometheusRuleGroup(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 resource_group_name: Optional[str] = None,
                                 rules: Optional[Sequence[AlertPrometheusRuleGroupRuleArgs]] = None,
                                 scopes: Optional[Sequence[str]] = None,
                                 cluster_name: Optional[str] = None,
                                 description: Optional[str] = None,
                                 interval: Optional[str] = None,
                                 location: Optional[str] = None,
                                 name: Optional[str] = None,
                                 rule_group_enabled: Optional[bool] = None,
                                 tags: Optional[Mapping[str, str]] = None)
    func NewAlertPrometheusRuleGroup(ctx *Context, name string, args AlertPrometheusRuleGroupArgs, opts ...ResourceOption) (*AlertPrometheusRuleGroup, error)
    public AlertPrometheusRuleGroup(string name, AlertPrometheusRuleGroupArgs args, CustomResourceOptions? opts = null)
    public AlertPrometheusRuleGroup(String name, AlertPrometheusRuleGroupArgs args)
    public AlertPrometheusRuleGroup(String name, AlertPrometheusRuleGroupArgs args, CustomResourceOptions options)
    
    type: azure:monitoring:AlertPrometheusRuleGroup
    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 AlertPrometheusRuleGroupArgs
    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 AlertPrometheusRuleGroupArgs
    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 AlertPrometheusRuleGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertPrometheusRuleGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertPrometheusRuleGroupArgs
    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 alertPrometheusRuleGroupResource = new Azure.Monitoring.AlertPrometheusRuleGroup("alertPrometheusRuleGroupResource", new()
    {
        ResourceGroupName = "string",
        Rules = new[]
        {
            new Azure.Monitoring.Inputs.AlertPrometheusRuleGroupRuleArgs
            {
                Expression = "string",
                Actions = new[]
                {
                    new Azure.Monitoring.Inputs.AlertPrometheusRuleGroupRuleActionArgs
                    {
                        ActionGroupId = "string",
                        ActionProperties = 
                        {
                            { "string", "string" },
                        },
                    },
                },
                Alert = "string",
                AlertResolution = new Azure.Monitoring.Inputs.AlertPrometheusRuleGroupRuleAlertResolutionArgs
                {
                    AutoResolved = false,
                    TimeToResolve = "string",
                },
                Annotations = 
                {
                    { "string", "string" },
                },
                Enabled = false,
                For = "string",
                Labels = 
                {
                    { "string", "string" },
                },
                Record = "string",
                Severity = 0,
            },
        },
        Scopes = new[]
        {
            "string",
        },
        ClusterName = "string",
        Description = "string",
        Interval = "string",
        Location = "string",
        Name = "string",
        RuleGroupEnabled = false,
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := monitoring.NewAlertPrometheusRuleGroup(ctx, "alertPrometheusRuleGroupResource", &monitoring.AlertPrometheusRuleGroupArgs{
    	ResourceGroupName: pulumi.String("string"),
    	Rules: monitoring.AlertPrometheusRuleGroupRuleArray{
    		&monitoring.AlertPrometheusRuleGroupRuleArgs{
    			Expression: pulumi.String("string"),
    			Actions: monitoring.AlertPrometheusRuleGroupRuleActionArray{
    				&monitoring.AlertPrometheusRuleGroupRuleActionArgs{
    					ActionGroupId: pulumi.String("string"),
    					ActionProperties: pulumi.StringMap{
    						"string": pulumi.String("string"),
    					},
    				},
    			},
    			Alert: pulumi.String("string"),
    			AlertResolution: &monitoring.AlertPrometheusRuleGroupRuleAlertResolutionArgs{
    				AutoResolved:  pulumi.Bool(false),
    				TimeToResolve: 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"),
    			Severity: pulumi.Int(0),
    		},
    	},
    	Scopes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ClusterName:      pulumi.String("string"),
    	Description:      pulumi.String("string"),
    	Interval:         pulumi.String("string"),
    	Location:         pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	RuleGroupEnabled: pulumi.Bool(false),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var alertPrometheusRuleGroupResource = new AlertPrometheusRuleGroup("alertPrometheusRuleGroupResource", AlertPrometheusRuleGroupArgs.builder()
        .resourceGroupName("string")
        .rules(AlertPrometheusRuleGroupRuleArgs.builder()
            .expression("string")
            .actions(AlertPrometheusRuleGroupRuleActionArgs.builder()
                .actionGroupId("string")
                .actionProperties(Map.of("string", "string"))
                .build())
            .alert("string")
            .alertResolution(AlertPrometheusRuleGroupRuleAlertResolutionArgs.builder()
                .autoResolved(false)
                .timeToResolve("string")
                .build())
            .annotations(Map.of("string", "string"))
            .enabled(false)
            .for_("string")
            .labels(Map.of("string", "string"))
            .record("string")
            .severity(0)
            .build())
        .scopes("string")
        .clusterName("string")
        .description("string")
        .interval("string")
        .location("string")
        .name("string")
        .ruleGroupEnabled(false)
        .tags(Map.of("string", "string"))
        .build());
    
    alert_prometheus_rule_group_resource = azure.monitoring.AlertPrometheusRuleGroup("alertPrometheusRuleGroupResource",
        resource_group_name="string",
        rules=[{
            "expression": "string",
            "actions": [{
                "action_group_id": "string",
                "action_properties": {
                    "string": "string",
                },
            }],
            "alert": "string",
            "alert_resolution": {
                "auto_resolved": False,
                "time_to_resolve": "string",
            },
            "annotations": {
                "string": "string",
            },
            "enabled": False,
            "for_": "string",
            "labels": {
                "string": "string",
            },
            "record": "string",
            "severity": 0,
        }],
        scopes=["string"],
        cluster_name="string",
        description="string",
        interval="string",
        location="string",
        name="string",
        rule_group_enabled=False,
        tags={
            "string": "string",
        })
    
    const alertPrometheusRuleGroupResource = new azure.monitoring.AlertPrometheusRuleGroup("alertPrometheusRuleGroupResource", {
        resourceGroupName: "string",
        rules: [{
            expression: "string",
            actions: [{
                actionGroupId: "string",
                actionProperties: {
                    string: "string",
                },
            }],
            alert: "string",
            alertResolution: {
                autoResolved: false,
                timeToResolve: "string",
            },
            annotations: {
                string: "string",
            },
            enabled: false,
            "for": "string",
            labels: {
                string: "string",
            },
            record: "string",
            severity: 0,
        }],
        scopes: ["string"],
        clusterName: "string",
        description: "string",
        interval: "string",
        location: "string",
        name: "string",
        ruleGroupEnabled: false,
        tags: {
            string: "string",
        },
    });
    
    type: azure:monitoring:AlertPrometheusRuleGroup
    properties:
        clusterName: string
        description: string
        interval: string
        location: string
        name: string
        resourceGroupName: string
        ruleGroupEnabled: false
        rules:
            - actions:
                - actionGroupId: string
                  actionProperties:
                    string: string
              alert: string
              alertResolution:
                autoResolved: false
                timeToResolve: string
              annotations:
                string: string
              enabled: false
              expression: string
              for: string
              labels:
                string: string
              record: string
              severity: 0
        scopes:
            - string
        tags:
            string: string
    

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

    ResourceGroupName string
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    Rules List<AlertPrometheusRuleGroupRule>
    One or more rule blocks as defined below.
    Scopes List<string>
    Specifies the resource ID of the Azure Monitor Workspace.
    ClusterName string
    Specifies the name of the Managed Kubernetes Cluster.
    Description string
    The description of the Alert Management Prometheus Rule Group.
    Interval string
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    Location string
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    Name string
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    RuleGroupEnabled bool
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.
    ResourceGroupName string
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    Rules []AlertPrometheusRuleGroupRuleArgs
    One or more rule blocks as defined below.
    Scopes []string
    Specifies the resource ID of the Azure Monitor Workspace.
    ClusterName string
    Specifies the name of the Managed Kubernetes Cluster.
    Description string
    The description of the Alert Management Prometheus Rule Group.
    Interval string
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    Location string
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    Name string
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    RuleGroupEnabled bool
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    Tags map[string]string
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.
    resourceGroupName String
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    rules List<AlertPrometheusRuleGroupRule>
    One or more rule blocks as defined below.
    scopes List<String>
    Specifies the resource ID of the Azure Monitor Workspace.
    clusterName String
    Specifies the name of the Managed Kubernetes Cluster.
    description String
    The description of the Alert Management Prometheus Rule Group.
    interval String
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    location String
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    name String
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    ruleGroupEnabled Boolean
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    tags Map<String,String>
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.
    resourceGroupName string
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    rules AlertPrometheusRuleGroupRule[]
    One or more rule blocks as defined below.
    scopes string[]
    Specifies the resource ID of the Azure Monitor Workspace.
    clusterName string
    Specifies the name of the Managed Kubernetes Cluster.
    description string
    The description of the Alert Management Prometheus Rule Group.
    interval string
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    location string
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    name string
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    ruleGroupEnabled boolean
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    tags {[key: string]: string}
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.
    resource_group_name str
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    rules Sequence[AlertPrometheusRuleGroupRuleArgs]
    One or more rule blocks as defined below.
    scopes Sequence[str]
    Specifies the resource ID of the Azure Monitor Workspace.
    cluster_name str
    Specifies the name of the Managed Kubernetes Cluster.
    description str
    The description of the Alert Management Prometheus Rule Group.
    interval str
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    location str
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    name str
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    rule_group_enabled bool
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    tags Mapping[str, str]
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.
    resourceGroupName String
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    rules List<Property Map>
    One or more rule blocks as defined below.
    scopes List<String>
    Specifies the resource ID of the Azure Monitor Workspace.
    clusterName String
    Specifies the name of the Managed Kubernetes Cluster.
    description String
    The description of the Alert Management Prometheus Rule Group.
    interval String
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    location String
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    name String
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    ruleGroupEnabled Boolean
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    tags Map<String>
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AlertPrometheusRuleGroup Resource

    Get an existing AlertPrometheusRuleGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AlertPrometheusRuleGroupState, opts?: CustomResourceOptions): AlertPrometheusRuleGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_name: Optional[str] = None,
            description: Optional[str] = None,
            interval: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            rule_group_enabled: Optional[bool] = None,
            rules: Optional[Sequence[AlertPrometheusRuleGroupRuleArgs]] = None,
            scopes: Optional[Sequence[str]] = None,
            tags: Optional[Mapping[str, str]] = None) -> AlertPrometheusRuleGroup
    func GetAlertPrometheusRuleGroup(ctx *Context, name string, id IDInput, state *AlertPrometheusRuleGroupState, opts ...ResourceOption) (*AlertPrometheusRuleGroup, error)
    public static AlertPrometheusRuleGroup Get(string name, Input<string> id, AlertPrometheusRuleGroupState? state, CustomResourceOptions? opts = null)
    public static AlertPrometheusRuleGroup get(String name, Output<String> id, AlertPrometheusRuleGroupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClusterName string
    Specifies the name of the Managed Kubernetes Cluster.
    Description string
    The description of the Alert Management Prometheus Rule Group.
    Interval string
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    Location string
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    Name string
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    ResourceGroupName string
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    RuleGroupEnabled bool
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    Rules List<AlertPrometheusRuleGroupRule>
    One or more rule blocks as defined below.
    Scopes List<string>
    Specifies the resource ID of the Azure Monitor Workspace.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.
    ClusterName string
    Specifies the name of the Managed Kubernetes Cluster.
    Description string
    The description of the Alert Management Prometheus Rule Group.
    Interval string
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    Location string
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    Name string
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    ResourceGroupName string
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    RuleGroupEnabled bool
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    Rules []AlertPrometheusRuleGroupRuleArgs
    One or more rule blocks as defined below.
    Scopes []string
    Specifies the resource ID of the Azure Monitor Workspace.
    Tags map[string]string
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.
    clusterName String
    Specifies the name of the Managed Kubernetes Cluster.
    description String
    The description of the Alert Management Prometheus Rule Group.
    interval String
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    location String
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    name String
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    resourceGroupName String
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    ruleGroupEnabled Boolean
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    rules List<AlertPrometheusRuleGroupRule>
    One or more rule blocks as defined below.
    scopes List<String>
    Specifies the resource ID of the Azure Monitor Workspace.
    tags Map<String,String>
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.
    clusterName string
    Specifies the name of the Managed Kubernetes Cluster.
    description string
    The description of the Alert Management Prometheus Rule Group.
    interval string
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    location string
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    name string
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    resourceGroupName string
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    ruleGroupEnabled boolean
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    rules AlertPrometheusRuleGroupRule[]
    One or more rule blocks as defined below.
    scopes string[]
    Specifies the resource ID of the Azure Monitor Workspace.
    tags {[key: string]: string}
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.
    cluster_name str
    Specifies the name of the Managed Kubernetes Cluster.
    description str
    The description of the Alert Management Prometheus Rule Group.
    interval str
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    location str
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    name str
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    resource_group_name str
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    rule_group_enabled bool
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    rules Sequence[AlertPrometheusRuleGroupRuleArgs]
    One or more rule blocks as defined below.
    scopes Sequence[str]
    Specifies the resource ID of the Azure Monitor Workspace.
    tags Mapping[str, str]
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.
    clusterName String
    Specifies the name of the Managed Kubernetes Cluster.
    description String
    The description of the Alert Management Prometheus Rule Group.
    interval String
    Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between PT1M and PT15M.
    location String
    Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    name String
    Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created.
    resourceGroupName String
    Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created.
    ruleGroupEnabled Boolean
    Is this Alert Management Prometheus Rule Group enabled? Possible values are true and false.
    rules List<Property Map>
    One or more rule blocks as defined below.
    scopes List<String>
    Specifies the resource ID of the Azure Monitor Workspace.
    tags Map<String>
    A mapping of tags to assign to the Alert Management Prometheus Rule Group.

    Supporting Types

    AlertPrometheusRuleGroupRule, AlertPrometheusRuleGroupRuleArgs

    Expression string
    Specifies the Prometheus Query Language expression to evaluate. For more details see this doc. Evaluate at the period given by interval and record the result as a new set of time series with the metric name given by record.
    Actions List<AlertPrometheusRuleGroupRuleAction>
    An action block as defined below.
    Alert string
    Specifies the Alert rule name.
    AlertResolution AlertPrometheusRuleGroupRuleAlertResolution
    An alert_resolution block as defined below.
    Annotations Dictionary<string, string>
    Specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links.
    Enabled bool
    Is this rule enabled? Possible values are true and false.
    For string
    Specifies the amount of time alert must be active before firing, represented in ISO 8601 duration format.
    Labels Dictionary<string, string>
    Specifies the labels to add or overwrite before storing the result.
    Record string
    Specifies the recorded metrics name.
    Severity int
    Specifies the severity of the alerts fired by the rule. Possible values are between 0 and 4.
    Expression string
    Specifies the Prometheus Query Language expression to evaluate. For more details see this doc. Evaluate at the period given by interval and record the result as a new set of time series with the metric name given by record.
    Actions []AlertPrometheusRuleGroupRuleAction
    An action block as defined below.
    Alert string
    Specifies the Alert rule name.
    AlertResolution AlertPrometheusRuleGroupRuleAlertResolution
    An alert_resolution block as defined below.
    Annotations map[string]string
    Specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links.
    Enabled bool
    Is this rule enabled? Possible values are true and false.
    For string
    Specifies the amount of time alert must be active before firing, represented in ISO 8601 duration format.
    Labels map[string]string
    Specifies the labels to add or overwrite before storing the result.
    Record string
    Specifies the recorded metrics name.
    Severity int
    Specifies the severity of the alerts fired by the rule. Possible values are between 0 and 4.
    expression String
    Specifies the Prometheus Query Language expression to evaluate. For more details see this doc. Evaluate at the period given by interval and record the result as a new set of time series with the metric name given by record.
    actions List<AlertPrometheusRuleGroupRuleAction>
    An action block as defined below.
    alert String
    Specifies the Alert rule name.
    alertResolution AlertPrometheusRuleGroupRuleAlertResolution
    An alert_resolution block as defined below.
    annotations Map<String,String>
    Specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links.
    enabled Boolean
    Is this rule enabled? Possible values are true and false.
    for_ String
    Specifies the amount of time alert must be active before firing, represented in ISO 8601 duration format.
    labels Map<String,String>
    Specifies the labels to add or overwrite before storing the result.
    record String
    Specifies the recorded metrics name.
    severity Integer
    Specifies the severity of the alerts fired by the rule. Possible values are between 0 and 4.
    expression string
    Specifies the Prometheus Query Language expression to evaluate. For more details see this doc. Evaluate at the period given by interval and record the result as a new set of time series with the metric name given by record.
    actions AlertPrometheusRuleGroupRuleAction[]
    An action block as defined below.
    alert string
    Specifies the Alert rule name.
    alertResolution AlertPrometheusRuleGroupRuleAlertResolution
    An alert_resolution block as defined below.
    annotations {[key: string]: string}
    Specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links.
    enabled boolean
    Is this rule enabled? Possible values are true and false.
    for string
    Specifies the amount of time alert must be active before firing, represented in ISO 8601 duration format.
    labels {[key: string]: string}
    Specifies the labels to add or overwrite before storing the result.
    record string
    Specifies the recorded metrics name.
    severity number
    Specifies the severity of the alerts fired by the rule. Possible values are between 0 and 4.
    expression str
    Specifies the Prometheus Query Language expression to evaluate. For more details see this doc. Evaluate at the period given by interval and record the result as a new set of time series with the metric name given by record.
    actions Sequence[AlertPrometheusRuleGroupRuleAction]
    An action block as defined below.
    alert str
    Specifies the Alert rule name.
    alert_resolution AlertPrometheusRuleGroupRuleAlertResolution
    An alert_resolution block as defined below.
    annotations Mapping[str, str]
    Specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links.
    enabled bool
    Is this rule enabled? Possible values are true and false.
    for_ str
    Specifies the amount of time alert must be active before firing, represented in ISO 8601 duration format.
    labels Mapping[str, str]
    Specifies the labels to add or overwrite before storing the result.
    record str
    Specifies the recorded metrics name.
    severity int
    Specifies the severity of the alerts fired by the rule. Possible values are between 0 and 4.
    expression String
    Specifies the Prometheus Query Language expression to evaluate. For more details see this doc. Evaluate at the period given by interval and record the result as a new set of time series with the metric name given by record.
    actions List<Property Map>
    An action block as defined below.
    alert String
    Specifies the Alert rule name.
    alertResolution Property Map
    An alert_resolution block as defined below.
    annotations Map<String>
    Specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links.
    enabled Boolean
    Is this rule enabled? Possible values are true and false.
    for String
    Specifies the amount of time alert must be active before firing, represented in ISO 8601 duration format.
    labels Map<String>
    Specifies the labels to add or overwrite before storing the result.
    record String
    Specifies the recorded metrics name.
    severity Number
    Specifies the severity of the alerts fired by the rule. Possible values are between 0 and 4.

    AlertPrometheusRuleGroupRuleAction, AlertPrometheusRuleGroupRuleActionArgs

    ActionGroupId string
    Specifies the resource id of the monitor action group.
    ActionProperties Dictionary<string, string>

    Specifies the properties of an action group object.

    Note: action_properties can only be configured for IcM Connector Action Groups for now. Other public features will be supported in the future.

    ActionGroupId string
    Specifies the resource id of the monitor action group.
    ActionProperties map[string]string

    Specifies the properties of an action group object.

    Note: action_properties can only be configured for IcM Connector Action Groups for now. Other public features will be supported in the future.

    actionGroupId String
    Specifies the resource id of the monitor action group.
    actionProperties Map<String,String>

    Specifies the properties of an action group object.

    Note: action_properties can only be configured for IcM Connector Action Groups for now. Other public features will be supported in the future.

    actionGroupId string
    Specifies the resource id of the monitor action group.
    actionProperties {[key: string]: string}

    Specifies the properties of an action group object.

    Note: action_properties can only be configured for IcM Connector Action Groups for now. Other public features will be supported in the future.

    action_group_id str
    Specifies the resource id of the monitor action group.
    action_properties Mapping[str, str]

    Specifies the properties of an action group object.

    Note: action_properties can only be configured for IcM Connector Action Groups for now. Other public features will be supported in the future.

    actionGroupId String
    Specifies the resource id of the monitor action group.
    actionProperties Map<String>

    Specifies the properties of an action group object.

    Note: action_properties can only be configured for IcM Connector Action Groups for now. Other public features will be supported in the future.

    AlertPrometheusRuleGroupRuleAlertResolution, AlertPrometheusRuleGroupRuleAlertResolutionArgs

    AutoResolved bool
    Is the alert auto-resolution? Possible values are true and false.
    TimeToResolve string
    Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.
    AutoResolved bool
    Is the alert auto-resolution? Possible values are true and false.
    TimeToResolve string
    Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.
    autoResolved Boolean
    Is the alert auto-resolution? Possible values are true and false.
    timeToResolve String
    Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.
    autoResolved boolean
    Is the alert auto-resolution? Possible values are true and false.
    timeToResolve string
    Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.
    auto_resolved bool
    Is the alert auto-resolution? Possible values are true and false.
    time_to_resolve str
    Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.
    autoResolved Boolean
    Is the alert auto-resolution? Possible values are true and false.
    timeToResolve String
    Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.

    Import

    Alert Management Prometheus Rule Group can be imported using the resource id, e.g.

    $ pulumi import azure:monitoring/alertPrometheusRuleGroup:AlertPrometheusRuleGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AlertsManagement/prometheusRuleGroups/ruleGroup1
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi