@lbrlabs/pulumi-grafana
Version:
A Pulumi package for creating and managing grafana.
176 lines (175 loc) • 5.82 kB
TypeScript
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 "@lbrlabs/pulumi-grafana";
* import * as grafana from "@pulumi/grafana";
*
* const exampleSlackChannel = grafana.getOnCallSlackChannel({
* name: "example_slack_channel",
* });
* const _default = new grafana.OncallEscalationChain("default", {});
* const exampleIntegration = new grafana.OncallIntegration("exampleIntegration", {type: "grafana"});
* const exampleRoute = new grafana.OncallRoute("exampleRoute", {
* 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
* $ pulumi import grafana:index/oncallRoute:OncallRoute route_name {{route_id}}
* ```
*/
export declare class OncallRoute extends pulumi.CustomResource {
/**
* Get an existing OncallRoute 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?: OncallRouteState, opts?: pulumi.CustomResourceOptions): OncallRoute;
/**
* Returns true if the given object is an instance of OncallRoute. 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 OncallRoute;
/**
* 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.OncallRouteMsteams | 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.OncallRouteSlack | undefined>;
/**
* Telegram-specific settings for a route.
*/
readonly telegram: pulumi.Output<outputs.OncallRouteTelegram | undefined>;
/**
* Create a OncallRoute 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: OncallRouteArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering OncallRoute resources.
*/
export interface OncallRouteState {
/**
* 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.OncallRouteMsteams>;
/**
* 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.OncallRouteSlack>;
/**
* Telegram-specific settings for a route.
*/
telegram?: pulumi.Input<inputs.OncallRouteTelegram>;
}
/**
* The set of arguments for constructing a OncallRoute resource.
*/
export interface OncallRouteArgs {
/**
* 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.OncallRouteMsteams>;
/**
* 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.OncallRouteSlack>;
/**
* Telegram-specific settings for a route.
*/
telegram?: pulumi.Input<inputs.OncallRouteTelegram>;
}