grafana.alerting.NotificationPolicy
Explore with Pulumi AI
Sets the global notification policy for Grafana.
!> This resource manages the entire notification policy tree, and will overwrite any existing policies.
This resource requires Grafana 9.1.0 or later.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumiverse/grafana";
const aContactPoint = new grafana.alerting.ContactPoint("a_contact_point", {
name: "A Contact Point",
emails: [{
addresses: [
"one@company.org",
"two@company.org",
],
message: "{{ len .Alerts.Firing }} firing.",
}],
});
const aMuteTiming = new grafana.alerting.MuteTiming("a_mute_timing", {
name: "Some Mute Timing",
intervals: [{
weekdays: ["monday"],
}],
});
const myNotificationPolicy = new grafana.alerting.NotificationPolicy("my_notification_policy", {
groupBies: ["..."],
contactPoint: aContactPoint.name,
groupWait: "45s",
groupInterval: "6m",
repeatInterval: "3h",
policies: [
{
matchers: [
{
label: "mylabel",
match: "=",
value: "myvalue",
},
{
label: "alertname",
match: "=",
value: "CPU Usage",
},
{
label: "Name",
match: "=~",
value: "host.*|host-b.*",
},
],
contactPoint: aContactPoint.name,
"continue": true,
muteTimings: [aMuteTiming.name],
groupWait: "45s",
groupInterval: "6m",
repeatInterval: "3h",
policies: [{
matchers: [{
label: "sublabel",
match: "=",
value: "subvalue",
}],
contactPoint: aContactPoint.name,
groupBies: ["..."],
}],
},
{
matchers: [{
label: "anotherlabel",
match: "=~",
value: "another value.*",
}],
contactPoint: aContactPoint.name,
groupBies: ["..."],
},
],
});
import pulumi
import pulumiverse_grafana as grafana
a_contact_point = grafana.alerting.ContactPoint("a_contact_point",
name="A Contact Point",
emails=[{
"addresses": [
"one@company.org",
"two@company.org",
],
"message": "{{ len .Alerts.Firing }} firing.",
}])
a_mute_timing = grafana.alerting.MuteTiming("a_mute_timing",
name="Some Mute Timing",
intervals=[{
"weekdays": ["monday"],
}])
my_notification_policy = grafana.alerting.NotificationPolicy("my_notification_policy",
group_bies=["..."],
contact_point=a_contact_point.name,
group_wait="45s",
group_interval="6m",
repeat_interval="3h",
policies=[
{
"matchers": [
{
"label": "mylabel",
"match": "=",
"value": "myvalue",
},
{
"label": "alertname",
"match": "=",
"value": "CPU Usage",
},
{
"label": "Name",
"match": "=~",
"value": "host.*|host-b.*",
},
],
"contact_point": a_contact_point.name,
"continue_": True,
"mute_timings": [a_mute_timing.name],
"group_wait": "45s",
"group_interval": "6m",
"repeat_interval": "3h",
"policies": [{
"matchers": [{
"label": "sublabel",
"match": "=",
"value": "subvalue",
}],
"contact_point": a_contact_point.name,
"group_bies": ["..."],
}],
},
{
"matchers": [{
"label": "anotherlabel",
"match": "=~",
"value": "another value.*",
}],
"contact_point": a_contact_point.name,
"group_bies": ["..."],
},
])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/alerting"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
aContactPoint, err := alerting.NewContactPoint(ctx, "a_contact_point", &alerting.ContactPointArgs{
Name: pulumi.String("A Contact Point"),
Emails: alerting.ContactPointEmailArray{
&alerting.ContactPointEmailArgs{
Addresses: pulumi.StringArray{
pulumi.String("one@company.org"),
pulumi.String("two@company.org"),
},
Message: pulumi.String("{{ len .Alerts.Firing }} firing."),
},
},
})
if err != nil {
return err
}
aMuteTiming, err := alerting.NewMuteTiming(ctx, "a_mute_timing", &alerting.MuteTimingArgs{
Name: pulumi.String("Some Mute Timing"),
Intervals: alerting.MuteTimingIntervalArray{
&alerting.MuteTimingIntervalArgs{
Weekdays: pulumi.StringArray{
pulumi.String("monday"),
},
},
},
})
if err != nil {
return err
}
_, err = alerting.NewNotificationPolicy(ctx, "my_notification_policy", &alerting.NotificationPolicyArgs{
GroupBies: pulumi.StringArray{
pulumi.String("..."),
},
ContactPoint: aContactPoint.Name,
GroupWait: pulumi.String("45s"),
GroupInterval: pulumi.String("6m"),
RepeatInterval: pulumi.String("3h"),
Policies: alerting.NotificationPolicyPolicyArray{
&alerting.NotificationPolicyPolicyArgs{
Matchers: alerting.NotificationPolicyPolicyMatcherArray{
&alerting.NotificationPolicyPolicyMatcherArgs{
Label: pulumi.String("mylabel"),
Match: pulumi.String("="),
Value: pulumi.String("myvalue"),
},
&alerting.NotificationPolicyPolicyMatcherArgs{
Label: pulumi.String("alertname"),
Match: pulumi.String("="),
Value: pulumi.String("CPU Usage"),
},
&alerting.NotificationPolicyPolicyMatcherArgs{
Label: pulumi.String("Name"),
Match: pulumi.String("=~"),
Value: pulumi.String("host.*|host-b.*"),
},
},
ContactPoint: aContactPoint.Name,
Continue: pulumi.Bool(true),
MuteTimings: pulumi.StringArray{
aMuteTiming.Name,
},
GroupWait: pulumi.String("45s"),
GroupInterval: pulumi.String("6m"),
RepeatInterval: pulumi.String("3h"),
Policies: alerting.NotificationPolicyPolicyPolicyArray{
&alerting.NotificationPolicyPolicyPolicyArgs{
Matchers: alerting.NotificationPolicyPolicyPolicyMatcherArray{
&alerting.NotificationPolicyPolicyPolicyMatcherArgs{
Label: pulumi.String("sublabel"),
Match: pulumi.String("="),
Value: pulumi.String("subvalue"),
},
},
ContactPoint: aContactPoint.Name,
GroupBies: pulumi.StringArray{
pulumi.String("..."),
},
},
},
},
&alerting.NotificationPolicyPolicyArgs{
Matchers: alerting.NotificationPolicyPolicyMatcherArray{
&alerting.NotificationPolicyPolicyMatcherArgs{
Label: pulumi.String("anotherlabel"),
Match: pulumi.String("=~"),
Value: pulumi.String("another value.*"),
},
},
ContactPoint: aContactPoint.Name,
GroupBies: pulumi.StringArray{
pulumi.String("..."),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumiverse.Grafana;
return await Deployment.RunAsync(() =>
{
var aContactPoint = new Grafana.Alerting.ContactPoint("a_contact_point", new()
{
Name = "A Contact Point",
Emails = new[]
{
new Grafana.Alerting.Inputs.ContactPointEmailArgs
{
Addresses = new[]
{
"one@company.org",
"two@company.org",
},
Message = "{{ len .Alerts.Firing }} firing.",
},
},
});
var aMuteTiming = new Grafana.Alerting.MuteTiming("a_mute_timing", new()
{
Name = "Some Mute Timing",
Intervals = new[]
{
new Grafana.Alerting.Inputs.MuteTimingIntervalArgs
{
Weekdays = new[]
{
"monday",
},
},
},
});
var myNotificationPolicy = new Grafana.Alerting.NotificationPolicy("my_notification_policy", new()
{
GroupBies = new[]
{
"...",
},
ContactPoint = aContactPoint.Name,
GroupWait = "45s",
GroupInterval = "6m",
RepeatInterval = "3h",
Policies = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyArgs
{
Matchers = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyMatcherArgs
{
Label = "mylabel",
Match = "=",
Value = "myvalue",
},
new Grafana.Alerting.Inputs.NotificationPolicyPolicyMatcherArgs
{
Label = "alertname",
Match = "=",
Value = "CPU Usage",
},
new Grafana.Alerting.Inputs.NotificationPolicyPolicyMatcherArgs
{
Label = "Name",
Match = "=~",
Value = "host.*|host-b.*",
},
},
ContactPoint = aContactPoint.Name,
Continue = true,
MuteTimings = new[]
{
aMuteTiming.Name,
},
GroupWait = "45s",
GroupInterval = "6m",
RepeatInterval = "3h",
Policies = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyPolicyArgs
{
Matchers = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyPolicyMatcherArgs
{
Label = "sublabel",
Match = "=",
Value = "subvalue",
},
},
ContactPoint = aContactPoint.Name,
GroupBies = new[]
{
"...",
},
},
},
},
new Grafana.Alerting.Inputs.NotificationPolicyPolicyArgs
{
Matchers = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyMatcherArgs
{
Label = "anotherlabel",
Match = "=~",
Value = "another value.*",
},
},
ContactPoint = aContactPoint.Name,
GroupBies = new[]
{
"...",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.alerting.ContactPoint;
import com.pulumi.grafana.alerting.ContactPointArgs;
import com.pulumi.grafana.alerting.inputs.ContactPointEmailArgs;
import com.pulumi.grafana.alerting.MuteTiming;
import com.pulumi.grafana.alerting.MuteTimingArgs;
import com.pulumi.grafana.alerting.inputs.MuteTimingIntervalArgs;
import com.pulumi.grafana.alerting.NotificationPolicy;
import com.pulumi.grafana.alerting.NotificationPolicyArgs;
import com.pulumi.grafana.alerting.inputs.NotificationPolicyPolicyArgs;
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 aContactPoint = new ContactPoint("aContactPoint", ContactPointArgs.builder()
.name("A Contact Point")
.emails(ContactPointEmailArgs.builder()
.addresses(
"one@company.org",
"two@company.org")
.message("{{ len .Alerts.Firing }} firing.")
.build())
.build());
var aMuteTiming = new MuteTiming("aMuteTiming", MuteTimingArgs.builder()
.name("Some Mute Timing")
.intervals(MuteTimingIntervalArgs.builder()
.weekdays("monday")
.build())
.build());
var myNotificationPolicy = new NotificationPolicy("myNotificationPolicy", NotificationPolicyArgs.builder()
.groupBies("...")
.contactPoint(aContactPoint.name())
.groupWait("45s")
.groupInterval("6m")
.repeatInterval("3h")
.policies(
NotificationPolicyPolicyArgs.builder()
.matchers(
NotificationPolicyPolicyMatcherArgs.builder()
.label("mylabel")
.match("=")
.value("myvalue")
.build(),
NotificationPolicyPolicyMatcherArgs.builder()
.label("alertname")
.match("=")
.value("CPU Usage")
.build(),
NotificationPolicyPolicyMatcherArgs.builder()
.label("Name")
.match("=~")
.value("host.*|host-b.*")
.build())
.contactPoint(aContactPoint.name())
.continue_(true)
.muteTimings(aMuteTiming.name())
.groupWait("45s")
.groupInterval("6m")
.repeatInterval("3h")
.policies(NotificationPolicyPolicyPolicyArgs.builder()
.matchers(NotificationPolicyPolicyPolicyMatcherArgs.builder()
.label("sublabel")
.match("=")
.value("subvalue")
.build())
.contactPoint(aContactPoint.name())
.groupBies("...")
.build())
.build(),
NotificationPolicyPolicyArgs.builder()
.matchers(NotificationPolicyPolicyMatcherArgs.builder()
.label("anotherlabel")
.match("=~")
.value("another value.*")
.build())
.contactPoint(aContactPoint.name())
.groupBies("...")
.build())
.build());
}
}
resources:
aContactPoint:
type: grafana:alerting:ContactPoint
name: a_contact_point
properties:
name: A Contact Point
emails:
- addresses:
- one@company.org
- two@company.org
message: '{{ len .Alerts.Firing }} firing.'
aMuteTiming:
type: grafana:alerting:MuteTiming
name: a_mute_timing
properties:
name: Some Mute Timing
intervals:
- weekdays:
- monday
myNotificationPolicy:
type: grafana:alerting:NotificationPolicy
name: my_notification_policy
properties:
groupBies:
- '...'
contactPoint: ${aContactPoint.name}
groupWait: 45s
groupInterval: 6m
repeatInterval: 3h
policies:
- matchers:
- label: mylabel
match: =
value: myvalue
- label: alertname
match: =
value: CPU Usage
- label: Name
match: =~
value: host.*|host-b.*
contactPoint: ${aContactPoint.name}
continue: true
muteTimings:
- ${aMuteTiming.name}
groupWait: 45s
groupInterval: 6m
repeatInterval: 3h
policies:
- matchers:
- label: sublabel
match: =
value: subvalue
contactPoint: ${aContactPoint.name}
groupBies:
- '...'
- matchers:
- label: anotherlabel
match: =~
value: another value.*
contactPoint: ${aContactPoint.name}
groupBies:
- '...'
Create NotificationPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationPolicy(name: string, args: NotificationPolicyArgs, opts?: CustomResourceOptions);
@overload
def NotificationPolicy(resource_name: str,
args: NotificationPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
contact_point: Optional[str] = None,
group_bies: Optional[Sequence[str]] = None,
disable_provenance: Optional[bool] = None,
group_interval: Optional[str] = None,
group_wait: Optional[str] = None,
org_id: Optional[str] = None,
policies: Optional[Sequence[NotificationPolicyPolicyArgs]] = None,
repeat_interval: Optional[str] = None)
func NewNotificationPolicy(ctx *Context, name string, args NotificationPolicyArgs, opts ...ResourceOption) (*NotificationPolicy, error)
public NotificationPolicy(string name, NotificationPolicyArgs args, CustomResourceOptions? opts = null)
public NotificationPolicy(String name, NotificationPolicyArgs args)
public NotificationPolicy(String name, NotificationPolicyArgs args, CustomResourceOptions options)
type: grafana:alerting:NotificationPolicy
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 NotificationPolicyArgs
- 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 NotificationPolicyArgs
- 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 NotificationPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationPolicyArgs
- 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 notificationPolicyResource = new Grafana.Alerting.NotificationPolicy("notificationPolicyResource", new()
{
ContactPoint = "string",
GroupBies = new[]
{
"string",
},
DisableProvenance = false,
GroupInterval = "string",
GroupWait = "string",
OrgId = "string",
Policies = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyArgs
{
ContactPoint = "string",
Continue = false,
GroupBies = new[]
{
"string",
},
GroupInterval = "string",
GroupWait = "string",
Matchers = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyMatcherArgs
{
Label = "string",
Match = "string",
Value = "string",
},
},
MuteTimings = new[]
{
"string",
},
Policies = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyPolicyArgs
{
ContactPoint = "string",
Continue = false,
GroupBies = new[]
{
"string",
},
GroupInterval = "string",
GroupWait = "string",
Matchers = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyPolicyMatcherArgs
{
Label = "string",
Match = "string",
Value = "string",
},
},
MuteTimings = new[]
{
"string",
},
Policies = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyPolicyPolicyArgs
{
ContactPoint = "string",
Continue = false,
GroupBies = new[]
{
"string",
},
GroupInterval = "string",
GroupWait = "string",
Matchers = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyPolicyPolicyMatcherArgs
{
Label = "string",
Match = "string",
Value = "string",
},
},
MuteTimings = new[]
{
"string",
},
Policies = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyPolicyPolicyPolicyArgs
{
GroupBies = new[]
{
"string",
},
ContactPoint = "string",
Continue = false,
GroupInterval = "string",
GroupWait = "string",
Matchers = new[]
{
new Grafana.Alerting.Inputs.NotificationPolicyPolicyPolicyPolicyPolicyMatcherArgs
{
Label = "string",
Match = "string",
Value = "string",
},
},
MuteTimings = new[]
{
"string",
},
RepeatInterval = "string",
},
},
RepeatInterval = "string",
},
},
RepeatInterval = "string",
},
},
RepeatInterval = "string",
},
},
RepeatInterval = "string",
});
example, err := alerting.NewNotificationPolicy(ctx, "notificationPolicyResource", &alerting.NotificationPolicyArgs{
ContactPoint: pulumi.String("string"),
GroupBies: pulumi.StringArray{
pulumi.String("string"),
},
DisableProvenance: pulumi.Bool(false),
GroupInterval: pulumi.String("string"),
GroupWait: pulumi.String("string"),
OrgId: pulumi.String("string"),
Policies: alerting.NotificationPolicyPolicyArray{
&alerting.NotificationPolicyPolicyArgs{
ContactPoint: pulumi.String("string"),
Continue: pulumi.Bool(false),
GroupBies: pulumi.StringArray{
pulumi.String("string"),
},
GroupInterval: pulumi.String("string"),
GroupWait: pulumi.String("string"),
Matchers: alerting.NotificationPolicyPolicyMatcherArray{
&alerting.NotificationPolicyPolicyMatcherArgs{
Label: pulumi.String("string"),
Match: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
MuteTimings: pulumi.StringArray{
pulumi.String("string"),
},
Policies: alerting.NotificationPolicyPolicyPolicyArray{
&alerting.NotificationPolicyPolicyPolicyArgs{
ContactPoint: pulumi.String("string"),
Continue: pulumi.Bool(false),
GroupBies: pulumi.StringArray{
pulumi.String("string"),
},
GroupInterval: pulumi.String("string"),
GroupWait: pulumi.String("string"),
Matchers: alerting.NotificationPolicyPolicyPolicyMatcherArray{
&alerting.NotificationPolicyPolicyPolicyMatcherArgs{
Label: pulumi.String("string"),
Match: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
MuteTimings: pulumi.StringArray{
pulumi.String("string"),
},
Policies: alerting.NotificationPolicyPolicyPolicyPolicyArray{
&alerting.NotificationPolicyPolicyPolicyPolicyArgs{
ContactPoint: pulumi.String("string"),
Continue: pulumi.Bool(false),
GroupBies: pulumi.StringArray{
pulumi.String("string"),
},
GroupInterval: pulumi.String("string"),
GroupWait: pulumi.String("string"),
Matchers: alerting.NotificationPolicyPolicyPolicyPolicyMatcherArray{
&alerting.NotificationPolicyPolicyPolicyPolicyMatcherArgs{
Label: pulumi.String("string"),
Match: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
MuteTimings: pulumi.StringArray{
pulumi.String("string"),
},
Policies: alerting.NotificationPolicyPolicyPolicyPolicyPolicyArray{
&alerting.NotificationPolicyPolicyPolicyPolicyPolicyArgs{
GroupBies: pulumi.StringArray{
pulumi.String("string"),
},
ContactPoint: pulumi.String("string"),
Continue: pulumi.Bool(false),
GroupInterval: pulumi.String("string"),
GroupWait: pulumi.String("string"),
Matchers: alerting.NotificationPolicyPolicyPolicyPolicyPolicyMatcherArray{
&alerting.NotificationPolicyPolicyPolicyPolicyPolicyMatcherArgs{
Label: pulumi.String("string"),
Match: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
MuteTimings: pulumi.StringArray{
pulumi.String("string"),
},
RepeatInterval: pulumi.String("string"),
},
},
RepeatInterval: pulumi.String("string"),
},
},
RepeatInterval: pulumi.String("string"),
},
},
RepeatInterval: pulumi.String("string"),
},
},
RepeatInterval: pulumi.String("string"),
})
var notificationPolicyResource = new NotificationPolicy("notificationPolicyResource", NotificationPolicyArgs.builder()
.contactPoint("string")
.groupBies("string")
.disableProvenance(false)
.groupInterval("string")
.groupWait("string")
.orgId("string")
.policies(NotificationPolicyPolicyArgs.builder()
.contactPoint("string")
.continue_(false)
.groupBies("string")
.groupInterval("string")
.groupWait("string")
.matchers(NotificationPolicyPolicyMatcherArgs.builder()
.label("string")
.match("string")
.value("string")
.build())
.muteTimings("string")
.policies(NotificationPolicyPolicyPolicyArgs.builder()
.contactPoint("string")
.continue_(false)
.groupBies("string")
.groupInterval("string")
.groupWait("string")
.matchers(NotificationPolicyPolicyPolicyMatcherArgs.builder()
.label("string")
.match("string")
.value("string")
.build())
.muteTimings("string")
.policies(NotificationPolicyPolicyPolicyPolicyArgs.builder()
.contactPoint("string")
.continue_(false)
.groupBies("string")
.groupInterval("string")
.groupWait("string")
.matchers(NotificationPolicyPolicyPolicyPolicyMatcherArgs.builder()
.label("string")
.match("string")
.value("string")
.build())
.muteTimings("string")
.policies(NotificationPolicyPolicyPolicyPolicyPolicyArgs.builder()
.groupBies("string")
.contactPoint("string")
.continue_(false)
.groupInterval("string")
.groupWait("string")
.matchers(NotificationPolicyPolicyPolicyPolicyPolicyMatcherArgs.builder()
.label("string")
.match("string")
.value("string")
.build())
.muteTimings("string")
.repeatInterval("string")
.build())
.repeatInterval("string")
.build())
.repeatInterval("string")
.build())
.repeatInterval("string")
.build())
.repeatInterval("string")
.build());
notification_policy_resource = grafana.alerting.NotificationPolicy("notificationPolicyResource",
contact_point="string",
group_bies=["string"],
disable_provenance=False,
group_interval="string",
group_wait="string",
org_id="string",
policies=[{
"contact_point": "string",
"continue_": False,
"group_bies": ["string"],
"group_interval": "string",
"group_wait": "string",
"matchers": [{
"label": "string",
"match": "string",
"value": "string",
}],
"mute_timings": ["string"],
"policies": [{
"contact_point": "string",
"continue_": False,
"group_bies": ["string"],
"group_interval": "string",
"group_wait": "string",
"matchers": [{
"label": "string",
"match": "string",
"value": "string",
}],
"mute_timings": ["string"],
"policies": [{
"contact_point": "string",
"continue_": False,
"group_bies": ["string"],
"group_interval": "string",
"group_wait": "string",
"matchers": [{
"label": "string",
"match": "string",
"value": "string",
}],
"mute_timings": ["string"],
"policies": [{
"group_bies": ["string"],
"contact_point": "string",
"continue_": False,
"group_interval": "string",
"group_wait": "string",
"matchers": [{
"label": "string",
"match": "string",
"value": "string",
}],
"mute_timings": ["string"],
"repeat_interval": "string",
}],
"repeat_interval": "string",
}],
"repeat_interval": "string",
}],
"repeat_interval": "string",
}],
repeat_interval="string")
const notificationPolicyResource = new grafana.alerting.NotificationPolicy("notificationPolicyResource", {
contactPoint: "string",
groupBies: ["string"],
disableProvenance: false,
groupInterval: "string",
groupWait: "string",
orgId: "string",
policies: [{
contactPoint: "string",
"continue": false,
groupBies: ["string"],
groupInterval: "string",
groupWait: "string",
matchers: [{
label: "string",
match: "string",
value: "string",
}],
muteTimings: ["string"],
policies: [{
contactPoint: "string",
"continue": false,
groupBies: ["string"],
groupInterval: "string",
groupWait: "string",
matchers: [{
label: "string",
match: "string",
value: "string",
}],
muteTimings: ["string"],
policies: [{
contactPoint: "string",
"continue": false,
groupBies: ["string"],
groupInterval: "string",
groupWait: "string",
matchers: [{
label: "string",
match: "string",
value: "string",
}],
muteTimings: ["string"],
policies: [{
groupBies: ["string"],
contactPoint: "string",
"continue": false,
groupInterval: "string",
groupWait: "string",
matchers: [{
label: "string",
match: "string",
value: "string",
}],
muteTimings: ["string"],
repeatInterval: "string",
}],
repeatInterval: "string",
}],
repeatInterval: "string",
}],
repeatInterval: "string",
}],
repeatInterval: "string",
});
type: grafana:alerting:NotificationPolicy
properties:
contactPoint: string
disableProvenance: false
groupBies:
- string
groupInterval: string
groupWait: string
orgId: string
policies:
- contactPoint: string
continue: false
groupBies:
- string
groupInterval: string
groupWait: string
matchers:
- label: string
match: string
value: string
muteTimings:
- string
policies:
- contactPoint: string
continue: false
groupBies:
- string
groupInterval: string
groupWait: string
matchers:
- label: string
match: string
value: string
muteTimings:
- string
policies:
- contactPoint: string
continue: false
groupBies:
- string
groupInterval: string
groupWait: string
matchers:
- label: string
match: string
value: string
muteTimings:
- string
policies:
- contactPoint: string
continue: false
groupBies:
- string
groupInterval: string
groupWait: string
matchers:
- label: string
match: string
value: string
muteTimings:
- string
repeatInterval: string
repeatInterval: string
repeatInterval: string
repeatInterval: string
repeatInterval: string
NotificationPolicy 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 NotificationPolicy resource accepts the following input properties:
- Contact
Point string - The default contact point to route all unmatched notifications to.
- Group
Bies List<string> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - Disable
Provenance bool - Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Policies
List<Pulumiverse.
Grafana. Alerting. Inputs. Notification Policy Policy> - Routing rules for specific label sets.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- Contact
Point string - The default contact point to route all unmatched notifications to.
- Group
Bies []string - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - Disable
Provenance bool - Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Policies
[]Notification
Policy Policy Args - Routing rules for specific label sets.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point String - The default contact point to route all unmatched notifications to.
- group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - disable
Provenance Boolean - group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- policies
List<Notification
Policy Policy> - Routing rules for specific label sets.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point string - The default contact point to route all unmatched notifications to.
- group
Bies string[] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - disable
Provenance boolean - group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- policies
Notification
Policy Policy[] - Routing rules for specific label sets.
- repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact_
point str - The default contact point to route all unmatched notifications to.
- group_
bies Sequence[str] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - disable_
provenance bool - group_
interval str - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group_
wait str - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- org_
id str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- policies
Sequence[Notification
Policy Policy Args] - Routing rules for specific label sets.
- repeat_
interval str - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point String - The default contact point to route all unmatched notifications to.
- group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - disable
Provenance Boolean - group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- policies List<Property Map>
- Routing rules for specific label sets.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotificationPolicy 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 NotificationPolicy Resource
Get an existing NotificationPolicy 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?: NotificationPolicyState, opts?: CustomResourceOptions): NotificationPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
contact_point: Optional[str] = None,
disable_provenance: Optional[bool] = None,
group_bies: Optional[Sequence[str]] = None,
group_interval: Optional[str] = None,
group_wait: Optional[str] = None,
org_id: Optional[str] = None,
policies: Optional[Sequence[NotificationPolicyPolicyArgs]] = None,
repeat_interval: Optional[str] = None) -> NotificationPolicy
func GetNotificationPolicy(ctx *Context, name string, id IDInput, state *NotificationPolicyState, opts ...ResourceOption) (*NotificationPolicy, error)
public static NotificationPolicy Get(string name, Input<string> id, NotificationPolicyState? state, CustomResourceOptions? opts = null)
public static NotificationPolicy get(String name, Output<String> id, NotificationPolicyState 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.
- Contact
Point string - The default contact point to route all unmatched notifications to.
- Disable
Provenance bool - Group
Bies List<string> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Policies
List<Pulumiverse.
Grafana. Alerting. Inputs. Notification Policy Policy> - Routing rules for specific label sets.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- Contact
Point string - The default contact point to route all unmatched notifications to.
- Disable
Provenance bool - Group
Bies []string - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Policies
[]Notification
Policy Policy Args - Routing rules for specific label sets.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point String - The default contact point to route all unmatched notifications to.
- disable
Provenance Boolean - group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- policies
List<Notification
Policy Policy> - Routing rules for specific label sets.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point string - The default contact point to route all unmatched notifications to.
- disable
Provenance boolean - group
Bies string[] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- policies
Notification
Policy Policy[] - Routing rules for specific label sets.
- repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact_
point str - The default contact point to route all unmatched notifications to.
- disable_
provenance bool - group_
bies Sequence[str] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - group_
interval str - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group_
wait str - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- org_
id str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- policies
Sequence[Notification
Policy Policy Args] - Routing rules for specific label sets.
- repeat_
interval str - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point String - The default contact point to route all unmatched notifications to.
- disable
Provenance Boolean - group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. - group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- policies List<Property Map>
- Routing rules for specific label sets.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
Supporting Types
NotificationPolicyPolicy, NotificationPolicyPolicyArgs
- Contact
Point string - The contact point to route notifications that match this rule to.
- Continue bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- Group
Bies List<string> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Matchers
List<Pulumiverse.
Grafana. Alerting. Inputs. Notification Policy Policy Matcher> - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- Mute
Timings List<string> - A list of mute timing names to apply to alerts that match this policy.
- Policies
List<Pulumiverse.
Grafana. Alerting. Inputs. Notification Policy Policy Policy> - Routing rules for specific label sets.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- Contact
Point string - The contact point to route notifications that match this rule to.
- Continue bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- Group
Bies []string - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Matchers
[]Notification
Policy Policy Matcher - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- Mute
Timings []string - A list of mute timing names to apply to alerts that match this policy.
- Policies
[]Notification
Policy Policy Policy - Routing rules for specific label sets.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point String - The contact point to route notifications that match this rule to.
- continue_ Boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
List<Notification
Policy Policy Matcher> - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings List<String> - A list of mute timing names to apply to alerts that match this policy.
- policies
List<Notification
Policy Policy Policy> - Routing rules for specific label sets.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point string - The contact point to route notifications that match this rule to.
- continue boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Bies string[] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
Notification
Policy Policy Matcher[] - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings string[] - A list of mute timing names to apply to alerts that match this policy.
- policies
Notification
Policy Policy Policy[] - Routing rules for specific label sets.
- repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact_
point str - The contact point to route notifications that match this rule to.
- continue_ bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group_
bies Sequence[str] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group_
interval str - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group_
wait str - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
Sequence[Notification
Policy Policy Matcher] - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute_
timings Sequence[str] - A list of mute timing names to apply to alerts that match this policy.
- policies
Sequence[Notification
Policy Policy Policy] - Routing rules for specific label sets.
- repeat_
interval str - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point String - The contact point to route notifications that match this rule to.
- continue Boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers List<Property Map>
- Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings List<String> - A list of mute timing names to apply to alerts that match this policy.
- policies List<Property Map>
- Routing rules for specific label sets.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
NotificationPolicyPolicyMatcher, NotificationPolicyPolicyMatcherArgs
NotificationPolicyPolicyPolicy, NotificationPolicyPolicyPolicyArgs
- Contact
Point string - The contact point to route notifications that match this rule to.
- Continue bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- Group
Bies List<string> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Matchers
List<Pulumiverse.
Grafana. Alerting. Inputs. Notification Policy Policy Policy Matcher> - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- Mute
Timings List<string> - A list of mute timing names to apply to alerts that match this policy.
- Policies
List<Pulumiverse.
Grafana. Alerting. Inputs. Notification Policy Policy Policy Policy> - Routing rules for specific label sets.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- Contact
Point string - The contact point to route notifications that match this rule to.
- Continue bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- Group
Bies []string - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Matchers
[]Notification
Policy Policy Policy Matcher - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- Mute
Timings []string - A list of mute timing names to apply to alerts that match this policy.
- Policies
[]Notification
Policy Policy Policy Policy - Routing rules for specific label sets.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point String - The contact point to route notifications that match this rule to.
- continue_ Boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
List<Notification
Policy Policy Policy Matcher> - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings List<String> - A list of mute timing names to apply to alerts that match this policy.
- policies
List<Notification
Policy Policy Policy Policy> - Routing rules for specific label sets.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point string - The contact point to route notifications that match this rule to.
- continue boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Bies string[] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
Notification
Policy Policy Policy Matcher[] - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings string[] - A list of mute timing names to apply to alerts that match this policy.
- policies
Notification
Policy Policy Policy Policy[] - Routing rules for specific label sets.
- repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact_
point str - The contact point to route notifications that match this rule to.
- continue_ bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group_
bies Sequence[str] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group_
interval str - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group_
wait str - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
Sequence[Notification
Policy Policy Policy Matcher] - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute_
timings Sequence[str] - A list of mute timing names to apply to alerts that match this policy.
- policies
Sequence[Notification
Policy Policy Policy Policy] - Routing rules for specific label sets.
- repeat_
interval str - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point String - The contact point to route notifications that match this rule to.
- continue Boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers List<Property Map>
- Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings List<String> - A list of mute timing names to apply to alerts that match this policy.
- policies List<Property Map>
- Routing rules for specific label sets.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
NotificationPolicyPolicyPolicyMatcher, NotificationPolicyPolicyPolicyMatcherArgs
NotificationPolicyPolicyPolicyPolicy, NotificationPolicyPolicyPolicyPolicyArgs
- Contact
Point string - The contact point to route notifications that match this rule to.
- Continue bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- Group
Bies List<string> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Matchers
List<Pulumiverse.
Grafana. Alerting. Inputs. Notification Policy Policy Policy Policy Matcher> - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- Mute
Timings List<string> - A list of mute timing names to apply to alerts that match this policy.
- Policies
List<Pulumiverse.
Grafana. Alerting. Inputs. Notification Policy Policy Policy Policy Policy> - Routing rules for specific label sets.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- Contact
Point string - The contact point to route notifications that match this rule to.
- Continue bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- Group
Bies []string - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Matchers
[]Notification
Policy Policy Policy Policy Matcher - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- Mute
Timings []string - A list of mute timing names to apply to alerts that match this policy.
- Policies
[]Notification
Policy Policy Policy Policy Policy - Routing rules for specific label sets.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point String - The contact point to route notifications that match this rule to.
- continue_ Boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
List<Notification
Policy Policy Policy Policy Matcher> - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings List<String> - A list of mute timing names to apply to alerts that match this policy.
- policies
List<Notification
Policy Policy Policy Policy Policy> - Routing rules for specific label sets.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point string - The contact point to route notifications that match this rule to.
- continue boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Bies string[] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
Notification
Policy Policy Policy Policy Matcher[] - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings string[] - A list of mute timing names to apply to alerts that match this policy.
- policies
Notification
Policy Policy Policy Policy Policy[] - Routing rules for specific label sets.
- repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact_
point str - The contact point to route notifications that match this rule to.
- continue_ bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group_
bies Sequence[str] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group_
interval str - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group_
wait str - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
Sequence[Notification
Policy Policy Policy Policy Matcher] - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute_
timings Sequence[str] - A list of mute timing names to apply to alerts that match this policy.
- policies
Sequence[Notification
Policy Policy Policy Policy Policy] - Routing rules for specific label sets.
- repeat_
interval str - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- contact
Point String - The contact point to route notifications that match this rule to.
- continue Boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers List<Property Map>
- Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings List<String> - A list of mute timing names to apply to alerts that match this policy.
- policies List<Property Map>
- Routing rules for specific label sets.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
NotificationPolicyPolicyPolicyPolicyMatcher, NotificationPolicyPolicyPolicyPolicyMatcherArgs
NotificationPolicyPolicyPolicyPolicyPolicy, NotificationPolicyPolicyPolicyPolicyPolicyArgs
- Group
Bies List<string> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - Contact
Point string - The contact point to route notifications that match this rule to.
- Continue bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Matchers
List<Pulumiverse.
Grafana. Alerting. Inputs. Notification Policy Policy Policy Policy Policy Matcher> - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- Mute
Timings List<string> - A list of mute timing names to apply to alerts that match this policy.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- Group
Bies []string - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - Contact
Point string - The contact point to route notifications that match this rule to.
- Continue bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- Group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- Group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- Matchers
[]Notification
Policy Policy Policy Policy Policy Matcher - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- Mute
Timings []string - A list of mute timing names to apply to alerts that match this policy.
- Repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - contact
Point String - The contact point to route notifications that match this rule to.
- continue_ Boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
List<Notification
Policy Policy Policy Policy Policy Matcher> - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings List<String> - A list of mute timing names to apply to alerts that match this policy.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- group
Bies string[] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - contact
Point string - The contact point to route notifications that match this rule to.
- continue boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Interval string - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait string - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
Notification
Policy Policy Policy Policy Policy Matcher[] - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings string[] - A list of mute timing names to apply to alerts that match this policy.
- repeat
Interval string - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- group_
bies Sequence[str] - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - contact_
point str - The contact point to route notifications that match this rule to.
- continue_ bool
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group_
interval str - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group_
wait str - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers
Sequence[Notification
Policy Policy Policy Policy Policy Matcher] - Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute_
timings Sequence[str] - A list of mute timing names to apply to alerts that match this policy.
- repeat_
interval str - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
- group
Bies List<String> - A list of alert labels to group alerts into notifications by. Use the special label
...
to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used. - contact
Point String - The contact point to route notifications that match this rule to.
- continue Boolean
- Whether to continue matching subsequent rules if an alert matches the current rule. Otherwise, the rule will be 'consumed' by the first policy to match it.
- group
Interval String - Minimum time interval between two notifications for the same group. Default is 5 minutes.
- group
Wait String - Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
- matchers List<Property Map>
- Describes which labels this rule should match. When multiple matchers are supplied, an alert must match ALL matchers to be accepted by this policy. When no matchers are supplied, the rule will match all alert instances.
- mute
Timings List<String> - A list of mute timing names to apply to alerts that match this policy.
- repeat
Interval String - Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
NotificationPolicyPolicyPolicyPolicyPolicyMatcher, NotificationPolicyPolicyPolicyPolicyPolicyMatcherArgs
Import
$ pulumi import grafana:alerting/notificationPolicy:NotificationPolicy name "{{ anyString }}"
$ pulumi import grafana:alerting/notificationPolicy:NotificationPolicy name "{{ orgID }}:{{ anyString }}"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
grafana
Terraform Provider.