@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
114 lines (113 loc) • 4.17 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages Grafana Alerting notification template groups, including notification templates.
*
* * Official documentation
* * [HTTP API](https://grafana.com/docs/grafana/latest/developer-resources/api-reference/http-api/api-legacy/alerting_provisioning/#notification-template-groups)
*
* This resource requires Grafana 9.1.0 or later.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const myTemplate = new grafana.alerting.MessageTemplate("my_template", {
* name: "My Notification Template Group",
* template: `{{define "custom.message" }}
* template content
* {{ end }}`,
* });
* ```
*
* ## Import
*
* ```sh
* terraform import grafana_message_template.name "{{ name }}"
* terraform import grafana_message_template.name "{{ orgID }}:{{ 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;
/**
* Allow modifying the message template from other sources than Terraform or the Grafana API. Defaults to `false`.
*/
readonly disableProvenance: pulumi.Output<boolean>;
/**
* The name of the notification template group.
*/
readonly name: pulumi.Output<string>;
/**
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
*/
readonly orgId: pulumi.Output<string>;
/**
* The content of the notification template group.
*/
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 {
/**
* Allow modifying the message template from other sources than Terraform or the Grafana API. Defaults to `false`.
*/
disableProvenance?: pulumi.Input<boolean>;
/**
* The name of the notification template group.
*/
name?: pulumi.Input<string>;
/**
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
*/
orgId?: pulumi.Input<string>;
/**
* The content of the notification template group.
*/
template?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a MessageTemplate resource.
*/
export interface MessageTemplateArgs {
/**
* Allow modifying the message template from other sources than Terraform or the Grafana API. Defaults to `false`.
*/
disableProvenance?: pulumi.Input<boolean>;
/**
* The name of the notification template group.
*/
name?: pulumi.Input<string>;
/**
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
*/
orgId?: pulumi.Input<string>;
/**
* The content of the notification template group.
*/
template: pulumi.Input<string>;
}