UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

142 lines 4.58 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** 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"); /** * Data source 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 "@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", * }], * alerting: { * fastburn: { * annotations: [{ * key: "name", * value: "Critical - SLO Burn Rate Alert", * }], * labels: [{ * key: "type", * value: "slo", * }], * }, * slowburn: { * annotations: [{ * key: "name", * value: "Warning - SLO Burn Rate Alert", * }], * labels: [{ * key: "type", * value: "slo", * }], * }, * }, * }); * const slos = grafana.slo.getSlos({}); * ``` */ function getSlos(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("grafana:slo/getSlos:getSlos", { "slos": args.slos, }, opts); } exports.getSlos = getSlos; /** * Data source 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 "@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", * }], * alerting: { * fastburn: { * annotations: [{ * key: "name", * value: "Critical - SLO Burn Rate Alert", * }], * labels: [{ * key: "type", * value: "slo", * }], * }, * slowburn: { * annotations: [{ * key: "name", * value: "Warning - SLO Burn Rate Alert", * }], * labels: [{ * key: "type", * value: "slo", * }], * }, * }, * }); * const slos = grafana.slo.getSlos({}); * ``` */ function getSlosOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("grafana:slo/getSlos:getSlos", { "slos": args.slos, }, opts); } exports.getSlosOutput = getSlosOutput; //# sourceMappingURL=getSlos.js.map