@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
130 lines (129 loc) • 4.95 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../../types/input";
import * as outputs from "../../types/output";
/**
* Manages the Grafana notification routing tree using the Grafana Alerting Notifications API.
*
* The routing tree determines which contact point an alert is routed to, based on its labels.
*
* Requires Grafana 13.1+ with the `alertingMultiplePolicies` [feature toggle](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/feature-toggles/) enabled.
*
* * [Official documentation](https://grafana.com/docs/grafana/latest/alerting/configure-notifications/create-notification-policy/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const example = new grafana.alerting.v1beta1.NotificationsRoutingTree("example", {
* metadata: {
* uid: "my-routing-tree",
* },
* spec: {
* disableProvenance: false,
* defaults: {
* receiver: "empty",
* groupBies: [
* "grafana_folder",
* "alertname",
* ],
* groupWait: "30s",
* groupInterval: "5m",
* repeatInterval: "4h",
* },
* routes: [{
* receiver: "empty",
* "continue": false,
* matchers: [{
* type: "=",
* label: "severity",
* value: "critical",
* }],
* muteTimeIntervals: [],
* groupBies: ["alertname"],
* routes: [{
* receiver: "empty",
* "continue": true,
* matchers: [{
* type: "=~",
* label: "team",
* value: "backend|platform",
* }],
* }],
* }],
* },
* });
* ```
*/
export declare class NotificationsRoutingTree extends pulumi.CustomResource {
/**
* Get an existing NotificationsRoutingTree resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NotificationsRoutingTreeState, opts?: pulumi.CustomResourceOptions): NotificationsRoutingTree;
/**
* Returns true if the given object is an instance of NotificationsRoutingTree. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is NotificationsRoutingTree;
/**
* The metadata of the resource.
*/
readonly metadata: pulumi.Output<outputs.alerting.v1beta1.NotificationsRoutingTreeMetadata | undefined>;
/**
* Options for applying the resource.
*/
readonly options: pulumi.Output<outputs.alerting.v1beta1.NotificationsRoutingTreeOptions | undefined>;
/**
* The spec of the resource.
*/
readonly spec: pulumi.Output<outputs.alerting.v1beta1.NotificationsRoutingTreeSpec | undefined>;
/**
* Create a NotificationsRoutingTree resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: NotificationsRoutingTreeArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering NotificationsRoutingTree resources.
*/
export interface NotificationsRoutingTreeState {
/**
* The metadata of the resource.
*/
metadata?: pulumi.Input<inputs.alerting.v1beta1.NotificationsRoutingTreeMetadata>;
/**
* Options for applying the resource.
*/
options?: pulumi.Input<inputs.alerting.v1beta1.NotificationsRoutingTreeOptions>;
/**
* The spec of the resource.
*/
spec?: pulumi.Input<inputs.alerting.v1beta1.NotificationsRoutingTreeSpec>;
}
/**
* The set of arguments for constructing a NotificationsRoutingTree resource.
*/
export interface NotificationsRoutingTreeArgs {
/**
* The metadata of the resource.
*/
metadata?: pulumi.Input<inputs.alerting.v1beta1.NotificationsRoutingTreeMetadata>;
/**
* Options for applying the resource.
*/
options?: pulumi.Input<inputs.alerting.v1beta1.NotificationsRoutingTreeOptions>;
/**
* The spec of the resource.
*/
spec?: pulumi.Input<inputs.alerting.v1beta1.NotificationsRoutingTreeSpec>;
}