@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
147 lines (146 loc) • 6.38 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* * [Official documentation](https://grafana.com/docs/oncall/latest/configure/integrations/)
* * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const test_acc_integration = new grafana.oncall.Integration("test-acc-integration", {
* name: "my integration",
* type: "grafana",
* defaultRoute: {},
* });
* // Also it's possible to manage integration templates.
* // Check docs to see all available templates.
* const integrationWithTemplates = new grafana.oncall.Integration("integration_with_templates", {
* name: "integration_with_templates",
* type: "webhook",
* defaultRoute: {},
* templates: {
* groupingKey: "{{ payload.group_id }}",
* slack: {
* title: "Slack title",
* message: `This is example of multiline template
* {{ payload.message }}
* `,
* imageUrl: "{{ payload.image_url }}",
* },
* },
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import grafana:onCall/integration:Integration name "{{ id }}"
* ```
*/
export declare class Integration extends pulumi.CustomResource {
/**
* Get an existing Integration 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?: IntegrationState, opts?: pulumi.CustomResourceOptions): Integration;
/**
* Returns true if the given object is an instance of Integration. 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 Integration;
/**
* The Default route for all alerts from the given integration
*/
readonly defaultRoute: pulumi.Output<outputs.onCall.IntegrationDefaultRoute>;
/**
* The link for using in an integrated tool.
*/
readonly link: pulumi.Output<string>;
/**
* The name of the service integration.
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana.onCall.getTeam` datasource.
*/
readonly teamId: pulumi.Output<string | undefined>;
/**
* Jinja2 templates for Alert payload. An empty templates block will be ignored.
*/
readonly templates: pulumi.Output<outputs.onCall.IntegrationTemplates | undefined>;
/**
* The type of integration. Can be grafana, grafana*alerting, webhook, alertmanager, kapacitor, fabric, newrelic, datadog, pagerduty, pingdom, elastalert, amazon*sns, curler, sentry, formatted*webhook, heartbeat, demo, manual, stackdriver, uptimerobot, sentry*platform, zabbix, prtg, slack*channel, inbound*email, direct_paging, jira, zendesk.
*/
readonly type: pulumi.Output<string>;
/**
* Create a Integration 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: IntegrationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Integration resources.
*/
export interface IntegrationState {
/**
* The Default route for all alerts from the given integration
*/
defaultRoute?: pulumi.Input<inputs.onCall.IntegrationDefaultRoute>;
/**
* The link for using in an integrated tool.
*/
link?: pulumi.Input<string>;
/**
* The name of the service integration.
*/
name?: pulumi.Input<string>;
/**
* The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana.onCall.getTeam` datasource.
*/
teamId?: pulumi.Input<string>;
/**
* Jinja2 templates for Alert payload. An empty templates block will be ignored.
*/
templates?: pulumi.Input<inputs.onCall.IntegrationTemplates>;
/**
* The type of integration. Can be grafana, grafana*alerting, webhook, alertmanager, kapacitor, fabric, newrelic, datadog, pagerduty, pingdom, elastalert, amazon*sns, curler, sentry, formatted*webhook, heartbeat, demo, manual, stackdriver, uptimerobot, sentry*platform, zabbix, prtg, slack*channel, inbound*email, direct_paging, jira, zendesk.
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Integration resource.
*/
export interface IntegrationArgs {
/**
* The Default route for all alerts from the given integration
*/
defaultRoute: pulumi.Input<inputs.onCall.IntegrationDefaultRoute>;
/**
* The name of the service integration.
*/
name?: pulumi.Input<string>;
/**
* The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana.onCall.getTeam` datasource.
*/
teamId?: pulumi.Input<string>;
/**
* Jinja2 templates for Alert payload. An empty templates block will be ignored.
*/
templates?: pulumi.Input<inputs.onCall.IntegrationTemplates>;
/**
* The type of integration. Can be grafana, grafana*alerting, webhook, alertmanager, kapacitor, fabric, newrelic, datadog, pagerduty, pingdom, elastalert, amazon*sns, curler, sentry, formatted*webhook, heartbeat, demo, manual, stackdriver, uptimerobot, sentry*platform, zabbix, prtg, slack*channel, inbound*email, direct_paging, jira, zendesk.
*/
type: pulumi.Input<string>;
}