UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

138 lines 4.59 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getSlosOutput = exports.getSlos = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Datasource for retrieving all SLOs. * * * [Official documentation](https://grafana.com/docs/grafana-cloud/alerting-and-irm/slo/) * * [API documentation](https://grafana.com/docs/grafana-cloud/alerting-and-irm/slo/api/) * * [Additional Information On Alerting Rule Annotations and Labels](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/#templating/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumi/grafana"; * import * as grafana from "@pulumiverse/grafana"; * * const test = new grafana.slo.SLO("test", { * name: "Terraform Testing", * description: "Terraform Description", * queries: [{ * freeform: { * query: "sum(rate(apiserver_request_total{code!=\"500\"}[$__rate_interval])) / sum(rate(apiserver_request_total[$__rate_interval]))", * }, * type: "freeform", * }], * objectives: [{ * value: 0.995, * window: "30d", * }], * destinationDatasource: { * uid: "grafanacloud-prom", * }, * labels: [{ * key: "custom", * value: "value", * }], * alertings: [{ * fastburns: [{ * annotations: [{ * key: "name", * value: "Critical - SLO Burn Rate Alert", * }], * labels: [{ * key: "type", * value: "slo", * }], * }], * slowburns: [{ * annotations: [{ * key: "name", * value: "Warning - SLO Burn Rate Alert", * }], * labels: [{ * key: "type", * value: "slo", * }], * }], * }], * }); * const slos = grafana.slo.getSlos({}); * ``` */ function getSlos(opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("grafana:slo/getSlos:getSlos", {}, opts); } exports.getSlos = getSlos; /** * Datasource for retrieving all SLOs. * * * [Official documentation](https://grafana.com/docs/grafana-cloud/alerting-and-irm/slo/) * * [API documentation](https://grafana.com/docs/grafana-cloud/alerting-and-irm/slo/api/) * * [Additional Information On Alerting Rule Annotations and Labels](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/#templating/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumi/grafana"; * import * as grafana from "@pulumiverse/grafana"; * * const test = new grafana.slo.SLO("test", { * name: "Terraform Testing", * description: "Terraform Description", * queries: [{ * freeform: { * query: "sum(rate(apiserver_request_total{code!=\"500\"}[$__rate_interval])) / sum(rate(apiserver_request_total[$__rate_interval]))", * }, * type: "freeform", * }], * objectives: [{ * value: 0.995, * window: "30d", * }], * destinationDatasource: { * uid: "grafanacloud-prom", * }, * labels: [{ * key: "custom", * value: "value", * }], * alertings: [{ * fastburns: [{ * annotations: [{ * key: "name", * value: "Critical - SLO Burn Rate Alert", * }], * labels: [{ * key: "type", * value: "slo", * }], * }], * slowburns: [{ * annotations: [{ * key: "name", * value: "Warning - SLO Burn Rate Alert", * }], * labels: [{ * key: "type", * value: "slo", * }], * }], * }], * }); * const slos = grafana.slo.getSlos({}); * ``` */ function getSlosOutput(opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("grafana:slo/getSlos:getSlos", {}, opts); } exports.getSlosOutput = getSlosOutput; //# sourceMappingURL=getSlos.js.map