UNPKG

@lbrlabs/pulumi-grafana

Version:

A Pulumi package for creating and managing grafana.

87 lines (86 loc) 3.05 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages Grafana Alerting message templates. * * * [Official documentation](https://grafana.com/docs/grafana/latest/alerting/manage-notifications/template-notifications/create-notification-templates/) * * [HTTP API](https://grafana.com/docs/grafana/next/developers/http_api/alerting_provisioning/#templates) * * This resource requires Grafana 9.1.0 or later. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@lbrlabs/pulumi-grafana"; * * const myTemplate = new grafana.MessageTemplate("myTemplate", {template: `{{define "My Reusable Template" }} * template content * {{ end }} * `}); * ``` * * ## Import * * ```sh * $ pulumi import grafana:index/messageTemplate:MessageTemplate message_template_name {{message_template_name}} * ``` */ export declare class MessageTemplate extends pulumi.CustomResource { /** * Get an existing MessageTemplate 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?: MessageTemplateState, opts?: pulumi.CustomResourceOptions): MessageTemplate; /** * Returns true if the given object is an instance of MessageTemplate. 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 MessageTemplate; /** * The name of the message template. */ readonly name: pulumi.Output<string>; /** * The content of the message template. */ readonly template: pulumi.Output<string>; /** * Create a MessageTemplate 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: MessageTemplateArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MessageTemplate resources. */ export interface MessageTemplateState { /** * The name of the message template. */ name?: pulumi.Input<string>; /** * The content of the message template. */ template?: pulumi.Input<string>; } /** * The set of arguments for constructing a MessageTemplate resource. */ export interface MessageTemplateArgs { /** * The name of the message template. */ name?: pulumi.Input<string>; /** * The content of the message template. */ template: pulumi.Input<string>; }