azure-native.alertsmanagement.PrometheusRuleGroup
Explore with Pulumi AI
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 (
alertsmanagement "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=[
{
"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": [
{
"action_group_id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup",
"action_properties": {
"key11": "value11",
"key12": "value12",
},
},
{
"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": {
"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 (
alertsmanagement "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=[{
"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": {
"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.
Constructor 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=[{
"expression": "string",
"actions": [{
"action_group_id": "string",
"action_properties": {
"string": "string",
},
}],
"alert": "string",
"annotations": {
"string": "string",
},
"enabled": False,
"for_": "string",
"labels": {
"string": "string",
},
"record": "string",
"resolve_configuration": {
"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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PrometheusRuleGroup resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Rules
List<Pulumi.
Azure Native. Alerts Management. Inputs. Prometheus Rule> - 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.
- Cluster
Name 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
- Rule
Group stringName - The name of the rule group.
- Dictionary<string, string>
- Resource tags.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Rules
[]Prometheus
Rule Args - 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.
- Cluster
Name 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
- Rule
Group stringName - The name of the rule group.
- map[string]string
- Resource tags.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- rules
List<Prometheus
Rule> - 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.
- cluster
Name 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
- rule
Group StringName - The name of the rule group.
- Map<String,String>
- Resource tags.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- rules
Prometheus
Rule[] - 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.
- cluster
Name 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
- rule
Group stringName - The name of the rule group.
- {[key: string]: string}
- Resource tags.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- rules
Sequence[Prometheus
Rule Args] - 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_ strname - The name of the rule group.
- Mapping[str, str]
- Resource tags.
- resource
Group StringName - 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.
- cluster
Name 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
- rule
Group StringName - The name of the rule group.
- 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
- System
Data Pulumi.Azure Native. Alerts Management. Outputs. System Data Response - 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
- System
Data SystemData Response - 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
- system
Data SystemData Response - 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
- system
Data SystemData Response - 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 SystemData Response - 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
- system
Data 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.
Azure Native. Alerts Management. Inputs. Prometheus Rule Group Action> - 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.
- Resolve
Configuration Pulumi.Azure Native. Alerts Management. Inputs. Prometheus Rule Resolve Configuration - 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
[]Prometheus
Rule Group Action - 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.
- Resolve
Configuration PrometheusRule Resolve Configuration - 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<Prometheus
Rule Group Action> - 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.
- resolve
Configuration PrometheusRule Resolve Configuration - 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
Prometheus
Rule Group Action[] - 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.
- resolve
Configuration PrometheusRule Resolve Configuration - 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[Prometheus
Rule Group Action] - 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 PrometheusRule Resolve Configuration - 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.
- resolve
Configuration 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
- Action
Group stringId - The resource id of the action group to use.
- Action
Properties Dictionary<string, string> - The properties of an action group object.
- Action
Group stringId - The resource id of the action group to use.
- Action
Properties map[string]string - The properties of an action group object.
- action
Group StringId - The resource id of the action group to use.
- action
Properties Map<String,String> - The properties of an action group object.
- action
Group stringId - The resource id of the action group to use.
- action
Properties {[key: string]: string} - The properties of an action group object.
- action_
group_ strid - The resource id of the action group to use.
- action_
properties Mapping[str, str] - The properties of an action group object.
- action
Group StringId - The resource id of the action group to use.
- action
Properties Map<String> - The properties of an action group object.
PrometheusRuleGroupActionResponse, PrometheusRuleGroupActionResponseArgs
- Action
Group stringId - The resource id of the action group to use.
- Action
Properties Dictionary<string, string> - The properties of an action group object.
- Action
Group stringId - The resource id of the action group to use.
- Action
Properties map[string]string - The properties of an action group object.
- action
Group StringId - The resource id of the action group to use.
- action
Properties Map<String,String> - The properties of an action group object.
- action
Group stringId - The resource id of the action group to use.
- action
Properties {[key: string]: string} - The properties of an action group object.
- action_
group_ strid - The resource id of the action group to use.
- action_
properties Mapping[str, str] - The properties of an action group object.
- action
Group StringId - The resource id of the action group to use.
- action
Properties Map<String> - The properties of an action group object.
PrometheusRuleResolveConfiguration, PrometheusRuleResolveConfigurationArgs
- Auto
Resolved bool - Enable alert auto-resolution.
- Time
To stringResolve - Alert auto-resolution timeout.
- Auto
Resolved bool - Enable alert auto-resolution.
- Time
To stringResolve - Alert auto-resolution timeout.
- auto
Resolved Boolean - Enable alert auto-resolution.
- time
To StringResolve - Alert auto-resolution timeout.
- auto
Resolved boolean - Enable alert auto-resolution.
- time
To stringResolve - Alert auto-resolution timeout.
- auto_
resolved bool - Enable alert auto-resolution.
- time_
to_ strresolve - Alert auto-resolution timeout.
- auto
Resolved Boolean - Enable alert auto-resolution.
- time
To StringResolve - Alert auto-resolution timeout.
PrometheusRuleResolveConfigurationResponse, PrometheusRuleResolveConfigurationResponseArgs
- Auto
Resolved bool - Enable alert auto-resolution.
- Time
To stringResolve - Alert auto-resolution timeout.
- Auto
Resolved bool - Enable alert auto-resolution.
- Time
To stringResolve - Alert auto-resolution timeout.
- auto
Resolved Boolean - Enable alert auto-resolution.
- time
To StringResolve - Alert auto-resolution timeout.
- auto
Resolved boolean - Enable alert auto-resolution.
- time
To stringResolve - Alert auto-resolution timeout.
- auto_
resolved bool - Enable alert auto-resolution.
- time_
to_ strresolve - Alert auto-resolution timeout.
- auto
Resolved Boolean - Enable alert auto-resolution.
- time
To StringResolve - 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.
Azure Native. Alerts Management. Inputs. Prometheus Rule Group Action Response> - 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.
- Resolve
Configuration Pulumi.Azure Native. Alerts Management. Inputs. Prometheus Rule Resolve Configuration Response - 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
[]Prometheus
Rule Group Action Response - 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.
- Resolve
Configuration PrometheusRule Resolve Configuration Response - 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<Prometheus
Rule Group Action Response> - 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.
- resolve
Configuration PrometheusRule Resolve Configuration Response - 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
Prometheus
Rule Group Action Response[] - 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.
- resolve
Configuration PrometheusRule Resolve Configuration Response - 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[Prometheus
Rule Group Action Response] - 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 PrometheusRule Resolve Configuration Response - 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.
- resolve
Configuration 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
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - 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_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - 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