UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

179 lines (178 loc) 5.78 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/routes/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const exampleSlackChannel = grafana.onCall.getSlackChannel({ * name: "example_slack_channel", * }); * const _default = new grafana.oncall.EscalationChain("default", {name: "default"}); * const exampleIntegration = new grafana.oncall.Integration("example_integration", { * name: "Grafana Integration", * type: "grafana", * defaultRoute: {}, * }); * const exampleRoute = new grafana.oncall.Route("example_route", { * integrationId: exampleIntegration.id, * escalationChainId: _default.id, * routingRegex: "us-(east|west)", * position: 0, * slack: { * channelId: exampleSlackChannel.then(exampleSlackChannel => exampleSlackChannel.slackId), * enabled: true, * }, * telegram: { * id: "ONCALLTELEGRAMID", * enabled: true, * }, * msteams: { * id: "ONCALLMSTEAMSID", * enabled: false, * }, * }); * ``` * * ## Import * * ```sh * terraform import grafana_oncall_route.name "{{ id }}" * ``` */ export declare class Route extends pulumi.CustomResource { /** * Get an existing Route 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?: RouteState, opts?: pulumi.CustomResourceOptions): Route; /** * Returns true if the given object is an instance of Route. 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 Route; /** * The ID of the escalation chain. */ readonly escalationChainId: pulumi.Output<string>; /** * The ID of the integration. */ readonly integrationId: pulumi.Output<string>; /** * MS teams-specific settings for a route. */ readonly msteams: pulumi.Output<outputs.onCall.RouteMsteams | undefined>; /** * The position of the route (starts from 0). */ readonly position: pulumi.Output<number>; /** * Python Regex query. Route is chosen for an alert if there is a match inside the alert payload. */ readonly routingRegex: pulumi.Output<string>; /** * The type of route. Can be jinja2, regex Defaults to `regex`. */ readonly routingType: pulumi.Output<string | undefined>; /** * Slack-specific settings for a route. */ readonly slack: pulumi.Output<outputs.onCall.RouteSlack | undefined>; /** * Telegram-specific settings for a route. */ readonly telegram: pulumi.Output<outputs.onCall.RouteTelegram | undefined>; /** * Create a Route 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: RouteArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Route resources. */ export interface RouteState { /** * The ID of the escalation chain. */ escalationChainId?: pulumi.Input<string>; /** * The ID of the integration. */ integrationId?: pulumi.Input<string>; /** * MS teams-specific settings for a route. */ msteams?: pulumi.Input<inputs.onCall.RouteMsteams>; /** * The position of the route (starts from 0). */ position?: pulumi.Input<number>; /** * Python Regex query. Route is chosen for an alert if there is a match inside the alert payload. */ routingRegex?: pulumi.Input<string>; /** * The type of route. Can be jinja2, regex Defaults to `regex`. */ routingType?: pulumi.Input<string>; /** * Slack-specific settings for a route. */ slack?: pulumi.Input<inputs.onCall.RouteSlack>; /** * Telegram-specific settings for a route. */ telegram?: pulumi.Input<inputs.onCall.RouteTelegram>; } /** * The set of arguments for constructing a Route resource. */ export interface RouteArgs { /** * The ID of the escalation chain. */ escalationChainId: pulumi.Input<string>; /** * The ID of the integration. */ integrationId: pulumi.Input<string>; /** * MS teams-specific settings for a route. */ msteams?: pulumi.Input<inputs.onCall.RouteMsteams>; /** * The position of the route (starts from 0). */ position: pulumi.Input<number>; /** * Python Regex query. Route is chosen for an alert if there is a match inside the alert payload. */ routingRegex: pulumi.Input<string>; /** * The type of route. Can be jinja2, regex Defaults to `regex`. */ routingType?: pulumi.Input<string>; /** * Slack-specific settings for a route. */ slack?: pulumi.Input<inputs.onCall.RouteSlack>; /** * Telegram-specific settings for a route. */ telegram?: pulumi.Input<inputs.onCall.RouteTelegram>; }