@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
140 lines (139 loc) • 4.51 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* 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({});
* ```
*/
/** @deprecated grafana.index/getslos.getSlos has been deprecated in favor of grafana.slo/getslos.getSlos */
export declare function getSlos(opts?: pulumi.InvokeOptions): Promise<GetSlosResult>;
/**
* A collection of values returned by getSlos.
*/
export interface GetSlosResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* Returns a list of all SLOs"
*/
readonly slos: outputs.GetSlosSlo[];
}
/**
* 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({});
* ```
*/
/** @deprecated grafana.index/getslos.getSlos has been deprecated in favor of grafana.slo/getslos.getSlos */
export declare function getSlosOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSlosResult>;