1. Packages
  2. Grafana Cloud
  3. API Docs
  4. getSlos
Grafana v0.16.1 published on Saturday, Mar 15, 2025 by pulumiverse

grafana.getSlos

Explore with Pulumi AI

Grafana v0.16.1 published on Saturday, Mar 15, 2025 by pulumiverse
Deprecated: grafana.index/getslos.getSlos has been deprecated in favor of grafana.slo/getslos.getSlos

Datasource for retrieving all SLOs.

Example Usage

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({});
Copy
import pulumi
import pulumi_grafana as grafana
import pulumiverse_grafana as grafana

test = 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",
    }],
    destination_datasource={
        "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",
            }],
        }],
    }])
slos = grafana.slo.get_slos()
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/slo"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := slo.NewSLO(ctx, "test", &slo.SLOArgs{
			Name:        pulumi.String("Terraform Testing"),
			Description: pulumi.String("Terraform Description"),
			Queries: slo.SLOQueryArray{
				&slo.SLOQueryArgs{
					Freeform: &slo.SLOQueryFreeformArgs{
						Query: pulumi.String("sum(rate(apiserver_request_total{code!=\"500\"}[$__rate_interval])) / sum(rate(apiserver_request_total[$__rate_interval]))"),
					},
					Type: pulumi.String("freeform"),
				},
			},
			Objectives: slo.SLOObjectiveArray{
				&slo.SLOObjectiveArgs{
					Value:  pulumi.Float64(0.995),
					Window: pulumi.String("30d"),
				},
			},
			DestinationDatasource: &slo.SLODestinationDatasourceArgs{
				Uid: pulumi.String("grafanacloud-prom"),
			},
			Labels: slo.SLOLabelArray{
				&slo.SLOLabelArgs{
					Key:   pulumi.String("custom"),
					Value: pulumi.String("value"),
				},
			},
			Alertings: slo.SLOAlertingArray{
				&slo.SLOAlertingArgs{
					Fastburns: slo.SLOAlertingFastburnArray{
						&slo.SLOAlertingFastburnArgs{
							Annotations: slo.SLOAlertingFastburnAnnotationArray{
								&slo.SLOAlertingFastburnAnnotationArgs{
									Key:   pulumi.String("name"),
									Value: pulumi.String("Critical - SLO Burn Rate Alert"),
								},
							},
							Labels: slo.SLOAlertingFastburnLabelArray{
								&slo.SLOAlertingFastburnLabelArgs{
									Key:   pulumi.String("type"),
									Value: pulumi.String("slo"),
								},
							},
						},
					},
					Slowburns: slo.SLOAlertingSlowburnArray{
						&slo.SLOAlertingSlowburnArgs{
							Annotations: slo.SLOAlertingSlowburnAnnotationArray{
								&slo.SLOAlertingSlowburnAnnotationArgs{
									Key:   pulumi.String("name"),
									Value: pulumi.String("Warning - SLO Burn Rate Alert"),
								},
							},
							Labels: slo.SLOAlertingSlowburnLabelArray{
								&slo.SLOAlertingSlowburnLabelArgs{
									Key:   pulumi.String("type"),
									Value: pulumi.String("slo"),
								},
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = slo.GetSlos(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumi.Grafana;
using Grafana = Pulumiverse.Grafana;

return await Deployment.RunAsync(() => 
{
    var test = new Grafana.Slo.SLO("test", new()
    {
        Name = "Terraform Testing",
        Description = "Terraform Description",
        Queries = new[]
        {
            new Grafana.Slo.Inputs.SLOQueryArgs
            {
                Freeform = new Grafana.Slo.Inputs.SLOQueryFreeformArgs
                {
                    Query = "sum(rate(apiserver_request_total{code!=\"500\"}[$__rate_interval])) / sum(rate(apiserver_request_total[$__rate_interval]))",
                },
                Type = "freeform",
            },
        },
        Objectives = new[]
        {
            new Grafana.Slo.Inputs.SLOObjectiveArgs
            {
                Value = 0.995,
                Window = "30d",
            },
        },
        DestinationDatasource = new Grafana.Slo.Inputs.SLODestinationDatasourceArgs
        {
            Uid = "grafanacloud-prom",
        },
        Labels = new[]
        {
            new Grafana.Slo.Inputs.SLOLabelArgs
            {
                Key = "custom",
                Value = "value",
            },
        },
        Alertings = new[]
        {
            new Grafana.Slo.Inputs.SLOAlertingArgs
            {
                Fastburns = new[]
                {
                    new Grafana.Slo.Inputs.SLOAlertingFastburnArgs
                    {
                        Annotations = new[]
                        {
                            new Grafana.Slo.Inputs.SLOAlertingFastburnAnnotationArgs
                            {
                                Key = "name",
                                Value = "Critical - SLO Burn Rate Alert",
                            },
                        },
                        Labels = new[]
                        {
                            new Grafana.Slo.Inputs.SLOAlertingFastburnLabelArgs
                            {
                                Key = "type",
                                Value = "slo",
                            },
                        },
                    },
                },
                Slowburns = new[]
                {
                    new Grafana.Slo.Inputs.SLOAlertingSlowburnArgs
                    {
                        Annotations = new[]
                        {
                            new Grafana.Slo.Inputs.SLOAlertingSlowburnAnnotationArgs
                            {
                                Key = "name",
                                Value = "Warning - SLO Burn Rate Alert",
                            },
                        },
                        Labels = new[]
                        {
                            new Grafana.Slo.Inputs.SLOAlertingSlowburnLabelArgs
                            {
                                Key = "type",
                                Value = "slo",
                            },
                        },
                    },
                },
            },
        },
    });

    var slos = Grafana.Slo.GetSlos.Invoke();

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.slo.SLO;
import com.pulumi.grafana.slo.SLOArgs;
import com.pulumi.grafana.slo.inputs.SLOQueryArgs;
import com.pulumi.grafana.slo.inputs.SLOQueryFreeformArgs;
import com.pulumi.grafana.slo.inputs.SLOObjectiveArgs;
import com.pulumi.grafana.slo.inputs.SLODestinationDatasourceArgs;
import com.pulumi.grafana.slo.inputs.SLOLabelArgs;
import com.pulumi.grafana.slo.inputs.SLOAlertingArgs;
import com.pulumi.grafana.slo.SloFunctions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var test = new SLO("test", SLOArgs.builder()
            .name("Terraform Testing")
            .description("Terraform Description")
            .queries(SLOQueryArgs.builder()
                .freeform(SLOQueryFreeformArgs.builder()
                    .query("sum(rate(apiserver_request_total{code!=\"500\"}[$__rate_interval])) / sum(rate(apiserver_request_total[$__rate_interval]))")
                    .build())
                .type("freeform")
                .build())
            .objectives(SLOObjectiveArgs.builder()
                .value(0.995)
                .window("30d")
                .build())
            .destinationDatasource(SLODestinationDatasourceArgs.builder()
                .uid("grafanacloud-prom")
                .build())
            .labels(SLOLabelArgs.builder()
                .key("custom")
                .value("value")
                .build())
            .alertings(SLOAlertingArgs.builder()
                .fastburns(SLOAlertingFastburnArgs.builder()
                    .annotations(SLOAlertingFastburnAnnotationArgs.builder()
                        .key("name")
                        .value("Critical - SLO Burn Rate Alert")
                        .build())
                    .labels(SLOAlertingFastburnLabelArgs.builder()
                        .key("type")
                        .value("slo")
                        .build())
                    .build())
                .slowburns(SLOAlertingSlowburnArgs.builder()
                    .annotations(SLOAlertingSlowburnAnnotationArgs.builder()
                        .key("name")
                        .value("Warning - SLO Burn Rate Alert")
                        .build())
                    .labels(SLOAlertingSlowburnLabelArgs.builder()
                        .key("type")
                        .value("slo")
                        .build())
                    .build())
                .build())
            .build());

        final var slos = SloFunctions.getSlos();

    }
}
Copy
resources:
  test:
    type: grafana:slo:SLO
    properties:
      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
variables:
  slos:
    fn::invoke:
      function: grafana:slo:getSlos
      arguments: {}
Copy

Using getSlos

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSlos(opts?: InvokeOptions): Promise<GetSlosResult>
function getSlosOutput(opts?: InvokeOptions): Output<GetSlosResult>
Copy
def get_slos(opts: Optional[InvokeOptions] = None) -> GetSlosResult
def get_slos_output(opts: Optional[InvokeOptions] = None) -> Output[GetSlosResult]
Copy
func GetSlos(ctx *Context, opts ...InvokeOption) (*GetSlosResult, error)
func GetSlosOutput(ctx *Context, opts ...InvokeOption) GetSlosResultOutput
Copy

> Note: This function is named GetSlos in the Go SDK.

public static class GetSlos 
{
    public static Task<GetSlosResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetSlosResult> Invoke(InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSlosResult> getSlos(InvokeOptions options)
public static Output<GetSlosResult> getSlos(InvokeOptions options)
Copy
fn::invoke:
  function: grafana:index/getSlos:getSlos
  arguments:
    # arguments dictionary
Copy

getSlos Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Slos List<Pulumiverse.Grafana.Outputs.GetSlosSlo>
Returns a list of all SLOs"
Id string
The provider-assigned unique ID for this managed resource.
Slos []GetSlosSlo
Returns a list of all SLOs"
id String
The provider-assigned unique ID for this managed resource.
slos List<GetSlosSlo>
Returns a list of all SLOs"
id string
The provider-assigned unique ID for this managed resource.
slos GetSlosSlo[]
Returns a list of all SLOs"
id str
The provider-assigned unique ID for this managed resource.
slos Sequence[GetSlosSlo]
Returns a list of all SLOs"
id String
The provider-assigned unique ID for this managed resource.
slos List<Property Map>
Returns a list of all SLOs"

Supporting Types

GetSlosSlo

Alertings This property is required. List<Pulumiverse.Grafana.Inputs.GetSlosSloAlerting>
Configures the alerting rules that will be generated for each time window associated with the SLO. Grafana SLOs can generate alerts when the short-term error budget burn is very high, the long-term error budget burn rate is high, or when the remaining error budget is below a certain threshold. Annotations and Labels support templating.
Description This property is required. string
Description is a free-text field that can provide more context to an SLO.
DestinationDatasources This property is required. List<Pulumiverse.Grafana.Inputs.GetSlosSloDestinationDatasource>
Destination Datasource sets the datasource defined for an SLO
FolderUid This property is required. string
UID for the SLO folder
Labels This property is required. List<Pulumiverse.Grafana.Inputs.GetSlosSloLabel>
Additional labels that will be attached to all metrics generated from the query. These labels are useful for grouping SLOs in dashboard views that you create by hand. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
Name This property is required. string
Name should be a short description of your indicator. Consider names like "API Availability"
Objectives This property is required. List<Pulumiverse.Grafana.Inputs.GetSlosSloObjective>
Over each rolling time window, the remaining error budget will be calculated, and separate alerts can be generated for each time window based on the SLO burn rate or remaining error budget.
Queries This property is required. List<Pulumiverse.Grafana.Inputs.GetSlosSloQuery>
Query describes the indicator that will be measured against the objective. Freeform Query types are currently supported.
SearchExpression This property is required. string
The name of a search expression in Grafana Asserts. This is used in the SLO UI to open the Asserts RCA workbench and in alerts to link to the RCA workbench.
Uuid This property is required. string
A unique, random identifier. This value will also be the name of the resource stored in the API server. This value is read-only.
Alertings This property is required. []GetSlosSloAlerting
Configures the alerting rules that will be generated for each time window associated with the SLO. Grafana SLOs can generate alerts when the short-term error budget burn is very high, the long-term error budget burn rate is high, or when the remaining error budget is below a certain threshold. Annotations and Labels support templating.
Description This property is required. string
Description is a free-text field that can provide more context to an SLO.
DestinationDatasources This property is required. []GetSlosSloDestinationDatasource
Destination Datasource sets the datasource defined for an SLO
FolderUid This property is required. string
UID for the SLO folder
Labels This property is required. []GetSlosSloLabel
Additional labels that will be attached to all metrics generated from the query. These labels are useful for grouping SLOs in dashboard views that you create by hand. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
Name This property is required. string
Name should be a short description of your indicator. Consider names like "API Availability"
Objectives This property is required. []GetSlosSloObjective
Over each rolling time window, the remaining error budget will be calculated, and separate alerts can be generated for each time window based on the SLO burn rate or remaining error budget.
Queries This property is required. []GetSlosSloQuery
Query describes the indicator that will be measured against the objective. Freeform Query types are currently supported.
SearchExpression This property is required. string
The name of a search expression in Grafana Asserts. This is used in the SLO UI to open the Asserts RCA workbench and in alerts to link to the RCA workbench.
Uuid This property is required. string
A unique, random identifier. This value will also be the name of the resource stored in the API server. This value is read-only.
alertings This property is required. List<GetSlosSloAlerting>
Configures the alerting rules that will be generated for each time window associated with the SLO. Grafana SLOs can generate alerts when the short-term error budget burn is very high, the long-term error budget burn rate is high, or when the remaining error budget is below a certain threshold. Annotations and Labels support templating.
description This property is required. String
Description is a free-text field that can provide more context to an SLO.
destinationDatasources This property is required. List<GetSlosSloDestinationDatasource>
Destination Datasource sets the datasource defined for an SLO
folderUid This property is required. String
UID for the SLO folder
labels This property is required. List<GetSlosSloLabel>
Additional labels that will be attached to all metrics generated from the query. These labels are useful for grouping SLOs in dashboard views that you create by hand. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
name This property is required. String
Name should be a short description of your indicator. Consider names like "API Availability"
objectives This property is required. List<GetSlosSloObjective>
Over each rolling time window, the remaining error budget will be calculated, and separate alerts can be generated for each time window based on the SLO burn rate or remaining error budget.
queries This property is required. List<GetSlosSloQuery>
Query describes the indicator that will be measured against the objective. Freeform Query types are currently supported.
searchExpression This property is required. String
The name of a search expression in Grafana Asserts. This is used in the SLO UI to open the Asserts RCA workbench and in alerts to link to the RCA workbench.
uuid This property is required. String
A unique, random identifier. This value will also be the name of the resource stored in the API server. This value is read-only.
alertings This property is required. GetSlosSloAlerting[]
Configures the alerting rules that will be generated for each time window associated with the SLO. Grafana SLOs can generate alerts when the short-term error budget burn is very high, the long-term error budget burn rate is high, or when the remaining error budget is below a certain threshold. Annotations and Labels support templating.
description This property is required. string
Description is a free-text field that can provide more context to an SLO.
destinationDatasources This property is required. GetSlosSloDestinationDatasource[]
Destination Datasource sets the datasource defined for an SLO
folderUid This property is required. string
UID for the SLO folder
labels This property is required. GetSlosSloLabel[]
Additional labels that will be attached to all metrics generated from the query. These labels are useful for grouping SLOs in dashboard views that you create by hand. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
name This property is required. string
Name should be a short description of your indicator. Consider names like "API Availability"
objectives This property is required. GetSlosSloObjective[]
Over each rolling time window, the remaining error budget will be calculated, and separate alerts can be generated for each time window based on the SLO burn rate or remaining error budget.
queries This property is required. GetSlosSloQuery[]
Query describes the indicator that will be measured against the objective. Freeform Query types are currently supported.
searchExpression This property is required. string
The name of a search expression in Grafana Asserts. This is used in the SLO UI to open the Asserts RCA workbench and in alerts to link to the RCA workbench.
uuid This property is required. string
A unique, random identifier. This value will also be the name of the resource stored in the API server. This value is read-only.
alertings This property is required. Sequence[GetSlosSloAlerting]
Configures the alerting rules that will be generated for each time window associated with the SLO. Grafana SLOs can generate alerts when the short-term error budget burn is very high, the long-term error budget burn rate is high, or when the remaining error budget is below a certain threshold. Annotations and Labels support templating.
description This property is required. str
Description is a free-text field that can provide more context to an SLO.
destination_datasources This property is required. Sequence[GetSlosSloDestinationDatasource]
Destination Datasource sets the datasource defined for an SLO
folder_uid This property is required. str
UID for the SLO folder
labels This property is required. Sequence[GetSlosSloLabel]
Additional labels that will be attached to all metrics generated from the query. These labels are useful for grouping SLOs in dashboard views that you create by hand. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
name This property is required. str
Name should be a short description of your indicator. Consider names like "API Availability"
objectives This property is required. Sequence[GetSlosSloObjective]
Over each rolling time window, the remaining error budget will be calculated, and separate alerts can be generated for each time window based on the SLO burn rate or remaining error budget.
queries This property is required. Sequence[GetSlosSloQuery]
Query describes the indicator that will be measured against the objective. Freeform Query types are currently supported.
search_expression This property is required. str
The name of a search expression in Grafana Asserts. This is used in the SLO UI to open the Asserts RCA workbench and in alerts to link to the RCA workbench.
uuid This property is required. str
A unique, random identifier. This value will also be the name of the resource stored in the API server. This value is read-only.
alertings This property is required. List<Property Map>
Configures the alerting rules that will be generated for each time window associated with the SLO. Grafana SLOs can generate alerts when the short-term error budget burn is very high, the long-term error budget burn rate is high, or when the remaining error budget is below a certain threshold. Annotations and Labels support templating.
description This property is required. String
Description is a free-text field that can provide more context to an SLO.
destinationDatasources This property is required. List<Property Map>
Destination Datasource sets the datasource defined for an SLO
folderUid This property is required. String
UID for the SLO folder
labels This property is required. List<Property Map>
Additional labels that will be attached to all metrics generated from the query. These labels are useful for grouping SLOs in dashboard views that you create by hand. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
name This property is required. String
Name should be a short description of your indicator. Consider names like "API Availability"
objectives This property is required. List<Property Map>
Over each rolling time window, the remaining error budget will be calculated, and separate alerts can be generated for each time window based on the SLO burn rate or remaining error budget.
queries This property is required. List<Property Map>
Query describes the indicator that will be measured against the objective. Freeform Query types are currently supported.
searchExpression This property is required. String
The name of a search expression in Grafana Asserts. This is used in the SLO UI to open the Asserts RCA workbench and in alerts to link to the RCA workbench.
uuid This property is required. String
A unique, random identifier. This value will also be the name of the resource stored in the API server. This value is read-only.

GetSlosSloAlerting

AdvancedOptions Pulumiverse.Grafana.Inputs.GetSlosSloAlertingAdvancedOptions
Advanced Options for Alert Rules
Annotations List<Pulumiverse.Grafana.Inputs.GetSlosSloAlertingAnnotation>
Annotations will be attached to all alerts generated by any of these rules.
Fastburn Pulumiverse.Grafana.Inputs.GetSlosSloAlertingFastburn
Alerting Rules generated for Fast Burn alerts
Labels List<Pulumiverse.Grafana.Inputs.GetSlosSloAlertingLabel>
Labels will be attached to all alerts generated by any of these rules.
Slowburn Pulumiverse.Grafana.Inputs.GetSlosSloAlertingSlowburn
Alerting Rules generated for Slow Burn alerts
AdvancedOptions GetSlosSloAlertingAdvancedOptions
Advanced Options for Alert Rules
Annotations []GetSlosSloAlertingAnnotation
Annotations will be attached to all alerts generated by any of these rules.
Fastburn GetSlosSloAlertingFastburn
Alerting Rules generated for Fast Burn alerts
Labels []GetSlosSloAlertingLabel
Labels will be attached to all alerts generated by any of these rules.
Slowburn GetSlosSloAlertingSlowburn
Alerting Rules generated for Slow Burn alerts
advancedOptions GetSlosSloAlertingAdvancedOptions
Advanced Options for Alert Rules
annotations List<GetSlosSloAlertingAnnotation>
Annotations will be attached to all alerts generated by any of these rules.
fastburn GetSlosSloAlertingFastburn
Alerting Rules generated for Fast Burn alerts
labels List<GetSlosSloAlertingLabel>
Labels will be attached to all alerts generated by any of these rules.
slowburn GetSlosSloAlertingSlowburn
Alerting Rules generated for Slow Burn alerts
advancedOptions GetSlosSloAlertingAdvancedOptions
Advanced Options for Alert Rules
annotations GetSlosSloAlertingAnnotation[]
Annotations will be attached to all alerts generated by any of these rules.
fastburn GetSlosSloAlertingFastburn
Alerting Rules generated for Fast Burn alerts
labels GetSlosSloAlertingLabel[]
Labels will be attached to all alerts generated by any of these rules.
slowburn GetSlosSloAlertingSlowburn
Alerting Rules generated for Slow Burn alerts
advanced_options GetSlosSloAlertingAdvancedOptions
Advanced Options for Alert Rules
annotations Sequence[GetSlosSloAlertingAnnotation]
Annotations will be attached to all alerts generated by any of these rules.
fastburn GetSlosSloAlertingFastburn
Alerting Rules generated for Fast Burn alerts
labels Sequence[GetSlosSloAlertingLabel]
Labels will be attached to all alerts generated by any of these rules.
slowburn GetSlosSloAlertingSlowburn
Alerting Rules generated for Slow Burn alerts
advancedOptions Property Map
Advanced Options for Alert Rules
annotations List<Property Map>
Annotations will be attached to all alerts generated by any of these rules.
fastburn Property Map
Alerting Rules generated for Fast Burn alerts
labels List<Property Map>
Labels will be attached to all alerts generated by any of these rules.
slowburn Property Map
Alerting Rules generated for Slow Burn alerts

GetSlosSloAlertingAdvancedOptions

MinFailures int
Minimum number of failed events to trigger an alert
MinFailures int
Minimum number of failed events to trigger an alert
minFailures Integer
Minimum number of failed events to trigger an alert
minFailures number
Minimum number of failed events to trigger an alert
min_failures int
Minimum number of failed events to trigger an alert
minFailures Number
Minimum number of failed events to trigger an alert

GetSlosSloAlertingAnnotation

Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value
key This property is required. string
Key for filtering and identification
value This property is required. string
Templatable value
key This property is required. str
Key for filtering and identification
value This property is required. str
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value

GetSlosSloAlertingFastburn

Annotations []GetSlosSloAlertingFastburnAnnotation
Annotations to attach only to Fast Burn alerts.
Labels []GetSlosSloAlertingFastburnLabel
Labels to attach only to Fast Burn alerts.
annotations List<GetSlosSloAlertingFastburnAnnotation>
Annotations to attach only to Fast Burn alerts.
labels List<GetSlosSloAlertingFastburnLabel>
Labels to attach only to Fast Burn alerts.
annotations GetSlosSloAlertingFastburnAnnotation[]
Annotations to attach only to Fast Burn alerts.
labels GetSlosSloAlertingFastburnLabel[]
Labels to attach only to Fast Burn alerts.
annotations Sequence[GetSlosSloAlertingFastburnAnnotation]
Annotations to attach only to Fast Burn alerts.
labels Sequence[GetSlosSloAlertingFastburnLabel]
Labels to attach only to Fast Burn alerts.
annotations List<Property Map>
Annotations to attach only to Fast Burn alerts.
labels List<Property Map>
Labels to attach only to Fast Burn alerts.

GetSlosSloAlertingFastburnAnnotation

Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value
key This property is required. string
Key for filtering and identification
value This property is required. string
Templatable value
key This property is required. str
Key for filtering and identification
value This property is required. str
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value

GetSlosSloAlertingFastburnLabel

Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value
key This property is required. string
Key for filtering and identification
value This property is required. string
Templatable value
key This property is required. str
Key for filtering and identification
value This property is required. str
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value

GetSlosSloAlertingLabel

Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value
key This property is required. string
Key for filtering and identification
value This property is required. string
Templatable value
key This property is required. str
Key for filtering and identification
value This property is required. str
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value

GetSlosSloAlertingSlowburn

Annotations []GetSlosSloAlertingSlowburnAnnotation
Annotations to attach only to Slow Burn alerts.
Labels []GetSlosSloAlertingSlowburnLabel
Labels to attach only to Slow Burn alerts.
annotations List<GetSlosSloAlertingSlowburnAnnotation>
Annotations to attach only to Slow Burn alerts.
labels List<GetSlosSloAlertingSlowburnLabel>
Labels to attach only to Slow Burn alerts.
annotations GetSlosSloAlertingSlowburnAnnotation[]
Annotations to attach only to Slow Burn alerts.
labels GetSlosSloAlertingSlowburnLabel[]
Labels to attach only to Slow Burn alerts.
annotations Sequence[GetSlosSloAlertingSlowburnAnnotation]
Annotations to attach only to Slow Burn alerts.
labels Sequence[GetSlosSloAlertingSlowburnLabel]
Labels to attach only to Slow Burn alerts.
annotations List<Property Map>
Annotations to attach only to Slow Burn alerts.
labels List<Property Map>
Labels to attach only to Slow Burn alerts.

GetSlosSloAlertingSlowburnAnnotation

Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value
key This property is required. string
Key for filtering and identification
value This property is required. string
Templatable value
key This property is required. str
Key for filtering and identification
value This property is required. str
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value

GetSlosSloAlertingSlowburnLabel

Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value
key This property is required. string
Key for filtering and identification
value This property is required. string
Templatable value
key This property is required. str
Key for filtering and identification
value This property is required. str
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value

GetSlosSloDestinationDatasource

Uid This property is required. string
UID for the Datasource
Uid This property is required. string
UID for the Datasource
uid This property is required. String
UID for the Datasource
uid This property is required. string
UID for the Datasource
uid This property is required. str
UID for the Datasource
uid This property is required. String
UID for the Datasource

GetSlosSloLabel

Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
Key This property is required. string
Key for filtering and identification
Value This property is required. string
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value
key This property is required. string
Key for filtering and identification
value This property is required. string
Templatable value
key This property is required. str
Key for filtering and identification
value This property is required. str
Templatable value
key This property is required. String
Key for filtering and identification
value This property is required. String
Templatable value

GetSlosSloObjective

Value This property is required. double
Value between 0 and 1. If the value of the query is above the objective, the SLO is met.
Window This property is required. string
A Prometheus-parsable time duration string like 24h, 60m. This is the time window the objective is measured over.
Value This property is required. float64
Value between 0 and 1. If the value of the query is above the objective, the SLO is met.
Window This property is required. string
A Prometheus-parsable time duration string like 24h, 60m. This is the time window the objective is measured over.
value This property is required. Double
Value between 0 and 1. If the value of the query is above the objective, the SLO is met.
window This property is required. String
A Prometheus-parsable time duration string like 24h, 60m. This is the time window the objective is measured over.
value This property is required. number
Value between 0 and 1. If the value of the query is above the objective, the SLO is met.
window This property is required. string
A Prometheus-parsable time duration string like 24h, 60m. This is the time window the objective is measured over.
value This property is required. float
Value between 0 and 1. If the value of the query is above the objective, the SLO is met.
window This property is required. str
A Prometheus-parsable time duration string like 24h, 60m. This is the time window the objective is measured over.
value This property is required. Number
Value between 0 and 1. If the value of the query is above the objective, the SLO is met.
window This property is required. String
A Prometheus-parsable time duration string like 24h, 60m. This is the time window the objective is measured over.

GetSlosSloQuery

Type This property is required. string
Query type must be one of: "freeform", "query", "ratio", "grafana_queries" or "threshold"
Freeform Pulumiverse.Grafana.Inputs.GetSlosSloQueryFreeform
GrafanaQueries Pulumiverse.Grafana.Inputs.GetSlosSloQueryGrafanaQueries
Array for holding a set of grafana queries
Ratio Pulumiverse.Grafana.Inputs.GetSlosSloQueryRatio
Type This property is required. string
Query type must be one of: "freeform", "query", "ratio", "grafana_queries" or "threshold"
Freeform GetSlosSloQueryFreeform
GrafanaQueries GetSlosSloQueryGrafanaQueries
Array for holding a set of grafana queries
Ratio GetSlosSloQueryRatio
type This property is required. String
Query type must be one of: "freeform", "query", "ratio", "grafana_queries" or "threshold"
freeform GetSlosSloQueryFreeform
grafanaQueries GetSlosSloQueryGrafanaQueries
Array for holding a set of grafana queries
ratio GetSlosSloQueryRatio
type This property is required. string
Query type must be one of: "freeform", "query", "ratio", "grafana_queries" or "threshold"
freeform GetSlosSloQueryFreeform
grafanaQueries GetSlosSloQueryGrafanaQueries
Array for holding a set of grafana queries
ratio GetSlosSloQueryRatio
type This property is required. str
Query type must be one of: "freeform", "query", "ratio", "grafana_queries" or "threshold"
freeform GetSlosSloQueryFreeform
grafana_queries GetSlosSloQueryGrafanaQueries
Array for holding a set of grafana queries
ratio GetSlosSloQueryRatio
type This property is required. String
Query type must be one of: "freeform", "query", "ratio", "grafana_queries" or "threshold"
freeform Property Map
grafanaQueries Property Map
Array for holding a set of grafana queries
ratio Property Map

GetSlosSloQueryFreeform

Query This property is required. string
Freeform Query Field - valid promQl
Query This property is required. string
Freeform Query Field - valid promQl
query This property is required. String
Freeform Query Field - valid promQl
query This property is required. string
Freeform Query Field - valid promQl
query This property is required. str
Freeform Query Field - valid promQl
query This property is required. String
Freeform Query Field - valid promQl

GetSlosSloQueryGrafanaQueries

GrafanaQueries This property is required. string
Query Object - Array of Grafana Query JSON objects
GrafanaQueries This property is required. string
Query Object - Array of Grafana Query JSON objects
grafanaQueries This property is required. String
Query Object - Array of Grafana Query JSON objects
grafanaQueries This property is required. string
Query Object - Array of Grafana Query JSON objects
grafana_queries This property is required. str
Query Object - Array of Grafana Query JSON objects
grafanaQueries This property is required. String
Query Object - Array of Grafana Query JSON objects

GetSlosSloQueryRatio

SuccessMetric This property is required. string
Counter metric for success events (numerator)
TotalMetric This property is required. string
Metric for total events (denominator)
GroupByLabels List<string>
Defines Group By Labels used for per-label alerting. These appear as variables on SLO dashboards to enable filtering and aggregation. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
SuccessMetric This property is required. string
Counter metric for success events (numerator)
TotalMetric This property is required. string
Metric for total events (denominator)
GroupByLabels []string
Defines Group By Labels used for per-label alerting. These appear as variables on SLO dashboards to enable filtering and aggregation. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
successMetric This property is required. String
Counter metric for success events (numerator)
totalMetric This property is required. String
Metric for total events (denominator)
groupByLabels List<String>
Defines Group By Labels used for per-label alerting. These appear as variables on SLO dashboards to enable filtering and aggregation. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
successMetric This property is required. string
Counter metric for success events (numerator)
totalMetric This property is required. string
Metric for total events (denominator)
groupByLabels string[]
Defines Group By Labels used for per-label alerting. These appear as variables on SLO dashboards to enable filtering and aggregation. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
success_metric This property is required. str
Counter metric for success events (numerator)
total_metric This property is required. str
Metric for total events (denominator)
group_by_labels Sequence[str]
Defines Group By Labels used for per-label alerting. These appear as variables on SLO dashboards to enable filtering and aggregation. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"
successMetric This property is required. String
Counter metric for success events (numerator)
totalMetric This property is required. String
Metric for total events (denominator)
groupByLabels List<String>
Defines Group By Labels used for per-label alerting. These appear as variables on SLO dashboards to enable filtering and aggregation. Labels must adhere to Prometheus label name schema - "^[a-zA-Z_][a-zA-Z0-9_]*$"

Package Details

Repository
grafana pulumiverse/pulumi-grafana
License
Apache-2.0
Notes
This Pulumi package is based on the grafana Terraform Provider.
Grafana v0.16.1 published on Saturday, Mar 15, 2025 by pulumiverse