We recommend using Azure Native.
azure.monitoring.AlertPrometheusRuleGroup
Explore with Pulumi AI
Manages an Alert Management Prometheus Rule Group.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
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")
.enableHostEncryption(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
enableHostEncryption: 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": [{
"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"],
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
The AlertPrometheusRuleGroup resource accepts the following input properties:
- Resource
Group stringName - 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<Alert
Prometheus Rule Group Rule> - A
rule
block as defined below. - Scopes List<string>
- Specifies the resource ID of the Azure Monitor Workspace.
- Cluster
Name 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
andPT15M
. - 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.
- Rule
Group boolEnabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - Dictionary<string, string>
- A mapping of tags to assign to the Alert Management Prometheus Rule Group.
- Resource
Group stringName - 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
[]Alert
Prometheus Rule Group Rule Args - A
rule
block as defined below. - Scopes []string
- Specifies the resource ID of the Azure Monitor Workspace.
- Cluster
Name 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
andPT15M
. - 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.
- Rule
Group boolEnabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - map[string]string
- A mapping of tags to assign to the Alert Management Prometheus Rule Group.
- resource
Group StringName - 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<Alert
Prometheus Rule Group Rule> - A
rule
block as defined below. - scopes List<String>
- Specifies the resource ID of the Azure Monitor Workspace.
- cluster
Name 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
andPT15M
. - 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.
- rule
Group BooleanEnabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - Map<String,String>
- A mapping of tags to assign to the Alert Management Prometheus Rule Group.
- resource
Group stringName - 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
Alert
Prometheus Rule Group Rule[] - A
rule
block as defined below. - scopes string[]
- Specifies the resource ID of the Azure Monitor Workspace.
- cluster
Name 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
andPT15M
. - 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.
- rule
Group booleanEnabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - {[key: string]: string}
- A mapping of tags to assign to the Alert Management Prometheus Rule Group.
- resource_
group_ strname - 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[Alert
Prometheus Rule Group Rule Args] - A
rule
block 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
andPT15M
. - 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_ boolenabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - Mapping[str, str]
- A mapping of tags to assign to the Alert Management Prometheus Rule Group.
- resource
Group StringName - 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>
- A
rule
block as defined below. - scopes List<String>
- Specifies the resource ID of the Azure Monitor Workspace.
- cluster
Name 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
andPT15M
. - 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.
- rule
Group BooleanEnabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - 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.
- Cluster
Name 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
andPT15M
. - 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.
- Resource
Group stringName - 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 boolEnabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - Rules
List<Alert
Prometheus Rule Group Rule> - A
rule
block as defined below. - Scopes List<string>
- Specifies the resource ID of the Azure Monitor Workspace.
- Dictionary<string, string>
- A mapping of tags to assign to the Alert Management Prometheus Rule Group.
- Cluster
Name 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
andPT15M
. - 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.
- Resource
Group stringName - 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 boolEnabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - Rules
[]Alert
Prometheus Rule Group Rule Args - A
rule
block as defined below. - Scopes []string
- Specifies the resource ID of the Azure Monitor Workspace.
- map[string]string
- A mapping of tags to assign to the Alert Management Prometheus Rule Group.
- cluster
Name 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
andPT15M
. - 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.
- resource
Group StringName - 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 BooleanEnabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - rules
List<Alert
Prometheus Rule Group Rule> - A
rule
block as defined below. - scopes List<String>
- Specifies the resource ID of the Azure Monitor Workspace.
- Map<String,String>
- A mapping of tags to assign to the Alert Management Prometheus Rule Group.
- cluster
Name 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
andPT15M
. - 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.
- resource
Group stringName - 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 booleanEnabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - rules
Alert
Prometheus Rule Group Rule[] - A
rule
block as defined below. - scopes string[]
- Specifies the resource ID of the Azure Monitor Workspace.
- {[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
andPT15M
. - 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_ strname - 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_ boolenabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - rules
Sequence[Alert
Prometheus Rule Group Rule Args] - A
rule
block as defined below. - scopes Sequence[str]
- Specifies the resource ID of the Azure Monitor Workspace.
- Mapping[str, str]
- A mapping of tags to assign to the Alert Management Prometheus Rule Group.
- cluster
Name 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
andPT15M
. - 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.
- resource
Group StringName - 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 BooleanEnabled - Is this Alert Management Prometheus Rule Group enabled? Possible values are
true
andfalse
. - rules List<Property Map>
- A
rule
block as defined below. - scopes List<String>
- Specifies the resource ID of the Azure Monitor Workspace.
- 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 byrecord
. - Actions
List<Alert
Prometheus Rule Group Rule Action> - An
action
block as defined below. - Alert string
- Specifies the Alert rule name.
- Alert
Resolution AlertPrometheus Rule Group Rule Alert Resolution - 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
andfalse
. - 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 byrecord
. - Actions
[]Alert
Prometheus Rule Group Rule Action - An
action
block as defined below. - Alert string
- Specifies the Alert rule name.
- Alert
Resolution AlertPrometheus Rule Group Rule Alert Resolution - 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
andfalse
. - 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 byrecord
. - actions
List<Alert
Prometheus Rule Group Rule Action> - An
action
block as defined below. - alert String
- Specifies the Alert rule name.
- alert
Resolution AlertPrometheus Rule Group Rule Alert Resolution - 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
andfalse
. - 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 byrecord
. - actions
Alert
Prometheus Rule Group Rule Action[] - An
action
block as defined below. - alert string
- Specifies the Alert rule name.
- alert
Resolution AlertPrometheus Rule Group Rule Alert Resolution - 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
andfalse
. - 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 byrecord
. - actions
Sequence[Alert
Prometheus Rule Group Rule Action] - An
action
block as defined below. - alert str
- Specifies the Alert rule name.
- alert_
resolution AlertPrometheus Rule Group Rule Alert Resolution - 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
andfalse
. - 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 byrecord
. - actions List<Property Map>
- An
action
block as defined below. - alert String
- Specifies the Alert rule name.
- alert
Resolution 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
andfalse
. - 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
- Action
Group stringId - Specifies the resource id of the monitor action group.
- Action
Properties 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.
- Action
Group stringId - Specifies the resource id of the monitor action group.
- Action
Properties 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.
- action
Group StringId - Specifies the resource id of the monitor action group.
- action
Properties 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.
- action
Group stringId - Specifies the resource id of the monitor action group.
- action
Properties {[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_ strid - 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.
- action
Group StringId - Specifies the resource id of the monitor action group.
- action
Properties 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
- Auto
Resolved bool - Is the alert auto-resolution? Possible values are
true
andfalse
. - Time
To stringResolve - Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.
- Auto
Resolved bool - Is the alert auto-resolution? Possible values are
true
andfalse
. - Time
To stringResolve - Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.
- auto
Resolved Boolean - Is the alert auto-resolution? Possible values are
true
andfalse
. - time
To StringResolve - Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.
- auto
Resolved boolean - Is the alert auto-resolution? Possible values are
true
andfalse
. - time
To stringResolve - Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.
- auto_
resolved bool - Is the alert auto-resolution? Possible values are
true
andfalse
. - time_
to_ strresolve - Specifies the alert auto-resolution interval, represented in ISO 8601 duration format.
- auto
Resolved Boolean - Is the alert auto-resolution? Possible values are
true
andfalse
. - time
To StringResolve - 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.