1. Packages
  2. Grafana Cloud
  3. API Docs
  4. SLO
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

grafana.SLO

Explore with Pulumi AI

grafana logo
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

    Resource manages Grafana SLOs.

    Example Usage

    Basic

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.SLO;
    import com.pulumi.grafana.SLOArgs;
    import com.pulumi.grafana.inputs.SLOAlertingArgs;
    import com.pulumi.grafana.inputs.SLODestinationDatasourceArgs;
    import com.pulumi.grafana.inputs.SLOLabelArgs;
    import com.pulumi.grafana.inputs.SLOObjectiveArgs;
    import com.pulumi.grafana.inputs.SLOQueryArgs;
    import com.pulumi.grafana.inputs.SLOQueryFreeformArgs;
    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()        
                .alertings(SLOAlertingArgs.builder()
                    .fastburns(SLOAlertingFastburnArgs.builder()
                        .annotation(                    
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                        .build())
                    .slowburns(SLOAlertingSlowburnArgs.builder()
                        .annotation(                    
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                        .build())
                    .build())
                .description("Terraform Description")
                .destinationDatasource(SLODestinationDatasourceArgs.builder()
                    .uid("grafanacloud-prom")
                    .build())
                .labels(SLOLabelArgs.builder()
                    .key("slo")
                    .value("terraform")
                    .build())
                .objectives(SLOObjectiveArgs.builder()
                    .value(0.995)
                    .window("30d")
                    .build())
                .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())
                .build());
    
        }
    }
    
    resources:
      test:
        type: grafana:SLO
        properties:
          alertings:
            - fastburns:
                - annotation:
                    - key: name
                      value: SLO Burn Rate Very High
                    - key: description
                      value: Error budget is burning too fast
              slowburns:
                - annotation:
                    - key: name
                      value: SLO Burn Rate High
                    - key: description
                      value: Error budget is burning too fast
          description: Terraform Description
          destinationDatasource:
            uid: grafanacloud-prom
          labels:
            - key: slo
              value: terraform
          objectives:
            - value: 0.995
              window: 30d
          queries:
            - freeform:
                query: sum(rate(apiserver_request_total{code!="500"}[$__rate_interval])) / sum(rate(apiserver_request_total[$__rate_interval]))
              type: freeform
    

    Advanced

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.SLO;
    import com.pulumi.grafana.SLOArgs;
    import com.pulumi.grafana.inputs.SLOAlertingArgs;
    import com.pulumi.grafana.inputs.SLODestinationDatasourceArgs;
    import com.pulumi.grafana.inputs.SLOLabelArgs;
    import com.pulumi.grafana.inputs.SLOObjectiveArgs;
    import com.pulumi.grafana.inputs.SLOQueryArgs;
    import com.pulumi.grafana.inputs.SLOQueryRatioArgs;
    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()        
                .alertings(SLOAlertingArgs.builder()
                    .fastburns(SLOAlertingFastburnArgs.builder()
                        .annotation(                    
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                        .label(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                        .build())
                    .slowburns(SLOAlertingSlowburnArgs.builder()
                        .annotation(                    
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                        .label(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                        .build())
                    .build())
                .description("Complex Resource - Terraform Ratio Query Description")
                .destinationDatasource(SLODestinationDatasourceArgs.builder()
                    .uid("grafanacloud-prom")
                    .build())
                .labels(SLOLabelArgs.builder()
                    .key("slo")
                    .value("terraform")
                    .build())
                .objectives(SLOObjectiveArgs.builder()
                    .value(0.995)
                    .window("30d")
                    .build())
                .queries(SLOQueryArgs.builder()
                    .ratio(SLOQueryRatioArgs.builder()
                        .groupByLabels(                    
                            "job",
                            "instance")
                        .successMetric("kubelet_http_requests_total{status!~\"5..\"}")
                        .totalMetric("kubelet_http_requests_total")
                        .build())
                    .type("ratio")
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: grafana:SLO
        properties:
          alertings:
            - fastburns:
                - annotation:
                    - key: name
                      value: SLO Burn Rate Very High
                    - key: description
                      value: Error budget is burning too fast
                  label:
                    - key: type
                      value: slo
              slowburns:
                - annotation:
                    - key: name
                      value: SLO Burn Rate High
                    - key: description
                      value: Error budget is burning too fast
                  label:
                    - key: type
                      value: slo
          description: Complex Resource - Terraform Ratio Query Description
          destinationDatasource:
            uid: grafanacloud-prom
          labels:
            - key: slo
              value: terraform
          objectives:
            - value: 0.995
              window: 30d
          queries:
            - ratio:
                groupByLabels:
                  - job
                  - instance
                successMetric: kubelet_http_requests_total{status!~"5.."}
                totalMetric: kubelet_http_requests_total
              type: ratio
    

    Create SLO Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SLO(name: string, args: SLOArgs, opts?: CustomResourceOptions);
    @overload
    def SLO(resource_name: str,
            args: SLOArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def SLO(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            objectives: Optional[Sequence[SLOObjectiveArgs]] = None,
            queries: Optional[Sequence[SLOQueryArgs]] = None,
            alertings: Optional[Sequence[SLOAlertingArgs]] = None,
            destination_datasource: Optional[SLODestinationDatasourceArgs] = None,
            labels: Optional[Sequence[SLOLabelArgs]] = None,
            name: Optional[str] = None)
    func NewSLO(ctx *Context, name string, args SLOArgs, opts ...ResourceOption) (*SLO, error)
    public SLO(string name, SLOArgs args, CustomResourceOptions? opts = null)
    public SLO(String name, SLOArgs args)
    public SLO(String name, SLOArgs args, CustomResourceOptions options)
    
    type: grafana:SLO
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SLOArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SLOArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SLOArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SLOArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SLOArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var sloResource = new Grafana.SLO("sloResource", new()
    {
        Description = "string",
        Objectives = new[]
        {
            new Grafana.Inputs.SLOObjectiveArgs
            {
                Value = 0,
                Window = "string",
            },
        },
        Queries = new[]
        {
            new Grafana.Inputs.SLOQueryArgs
            {
                Type = "string",
                Freeform = new Grafana.Inputs.SLOQueryFreeformArgs
                {
                    Query = "string",
                },
                Ratio = new Grafana.Inputs.SLOQueryRatioArgs
                {
                    SuccessMetric = "string",
                    TotalMetric = "string",
                    GroupByLabels = new[]
                    {
                        "string",
                    },
                },
            },
        },
        Alertings = new[]
        {
            new Grafana.Inputs.SLOAlertingArgs
            {
                Annotations = new[]
                {
                    new Grafana.Inputs.SLOAlertingAnnotationArgs
                    {
                        Key = "string",
                        Value = "string",
                    },
                },
                Fastburns = new[]
                {
                    new Grafana.Inputs.SLOAlertingFastburnArgs
                    {
                        Annotations = new[]
                        {
                            new Grafana.Inputs.SLOAlertingFastburnAnnotationArgs
                            {
                                Key = "string",
                                Value = "string",
                            },
                        },
                        Labels = new[]
                        {
                            new Grafana.Inputs.SLOAlertingFastburnLabelArgs
                            {
                                Key = "string",
                                Value = "string",
                            },
                        },
                    },
                },
                Labels = new[]
                {
                    new Grafana.Inputs.SLOAlertingLabelArgs
                    {
                        Key = "string",
                        Value = "string",
                    },
                },
                Slowburns = new[]
                {
                    new Grafana.Inputs.SLOAlertingSlowburnArgs
                    {
                        Annotations = new[]
                        {
                            new Grafana.Inputs.SLOAlertingSlowburnAnnotationArgs
                            {
                                Key = "string",
                                Value = "string",
                            },
                        },
                        Labels = new[]
                        {
                            new Grafana.Inputs.SLOAlertingSlowburnLabelArgs
                            {
                                Key = "string",
                                Value = "string",
                            },
                        },
                    },
                },
            },
        },
        DestinationDatasource = new Grafana.Inputs.SLODestinationDatasourceArgs
        {
            Uid = "string",
        },
        Labels = new[]
        {
            new Grafana.Inputs.SLOLabelArgs
            {
                Key = "string",
                Value = "string",
            },
        },
        Name = "string",
    });
    
    example, err := grafana.NewSLO(ctx, "sloResource", &grafana.SLOArgs{
    	Description: pulumi.String("string"),
    	Objectives: grafana.SLOObjectiveArray{
    		&grafana.SLOObjectiveArgs{
    			Value:  pulumi.Float64(0),
    			Window: pulumi.String("string"),
    		},
    	},
    	Queries: grafana.SLOQueryArray{
    		&grafana.SLOQueryArgs{
    			Type: pulumi.String("string"),
    			Freeform: &grafana.SLOQueryFreeformArgs{
    				Query: pulumi.String("string"),
    			},
    			Ratio: &grafana.SLOQueryRatioArgs{
    				SuccessMetric: pulumi.String("string"),
    				TotalMetric:   pulumi.String("string"),
    				GroupByLabels: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    	},
    	Alertings: grafana.SLOAlertingArray{
    		&grafana.SLOAlertingArgs{
    			Annotations: grafana.SLOAlertingAnnotationArray{
    				&grafana.SLOAlertingAnnotationArgs{
    					Key:   pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			Fastburns: grafana.SLOAlertingFastburnArray{
    				&grafana.SLOAlertingFastburnArgs{
    					Annotations: grafana.SLOAlertingFastburnAnnotationArray{
    						&grafana.SLOAlertingFastburnAnnotationArgs{
    							Key:   pulumi.String("string"),
    							Value: pulumi.String("string"),
    						},
    					},
    					Labels: grafana.SLOAlertingFastburnLabelArray{
    						&grafana.SLOAlertingFastburnLabelArgs{
    							Key:   pulumi.String("string"),
    							Value: pulumi.String("string"),
    						},
    					},
    				},
    			},
    			Labels: grafana.SLOAlertingLabelArray{
    				&grafana.SLOAlertingLabelArgs{
    					Key:   pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			Slowburns: grafana.SLOAlertingSlowburnArray{
    				&grafana.SLOAlertingSlowburnArgs{
    					Annotations: grafana.SLOAlertingSlowburnAnnotationArray{
    						&grafana.SLOAlertingSlowburnAnnotationArgs{
    							Key:   pulumi.String("string"),
    							Value: pulumi.String("string"),
    						},
    					},
    					Labels: grafana.SLOAlertingSlowburnLabelArray{
    						&grafana.SLOAlertingSlowburnLabelArgs{
    							Key:   pulumi.String("string"),
    							Value: pulumi.String("string"),
    						},
    					},
    				},
    			},
    		},
    	},
    	DestinationDatasource: &grafana.SLODestinationDatasourceArgs{
    		Uid: pulumi.String("string"),
    	},
    	Labels: grafana.SLOLabelArray{
    		&grafana.SLOLabelArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	Name: pulumi.String("string"),
    })
    
    var sloResource = new SLO("sloResource", SLOArgs.builder()
        .description("string")
        .objectives(SLOObjectiveArgs.builder()
            .value(0)
            .window("string")
            .build())
        .queries(SLOQueryArgs.builder()
            .type("string")
            .freeform(SLOQueryFreeformArgs.builder()
                .query("string")
                .build())
            .ratio(SLOQueryRatioArgs.builder()
                .successMetric("string")
                .totalMetric("string")
                .groupByLabels("string")
                .build())
            .build())
        .alertings(SLOAlertingArgs.builder()
            .annotations(SLOAlertingAnnotationArgs.builder()
                .key("string")
                .value("string")
                .build())
            .fastburns(SLOAlertingFastburnArgs.builder()
                .annotations(SLOAlertingFastburnAnnotationArgs.builder()
                    .key("string")
                    .value("string")
                    .build())
                .labels(SLOAlertingFastburnLabelArgs.builder()
                    .key("string")
                    .value("string")
                    .build())
                .build())
            .labels(SLOAlertingLabelArgs.builder()
                .key("string")
                .value("string")
                .build())
            .slowburns(SLOAlertingSlowburnArgs.builder()
                .annotations(SLOAlertingSlowburnAnnotationArgs.builder()
                    .key("string")
                    .value("string")
                    .build())
                .labels(SLOAlertingSlowburnLabelArgs.builder()
                    .key("string")
                    .value("string")
                    .build())
                .build())
            .build())
        .destinationDatasource(SLODestinationDatasourceArgs.builder()
            .uid("string")
            .build())
        .labels(SLOLabelArgs.builder()
            .key("string")
            .value("string")
            .build())
        .name("string")
        .build());
    
    slo_resource = grafana.SLO("sloResource",
        description="string",
        objectives=[grafana.SLOObjectiveArgs(
            value=0,
            window="string",
        )],
        queries=[grafana.SLOQueryArgs(
            type="string",
            freeform=grafana.SLOQueryFreeformArgs(
                query="string",
            ),
            ratio=grafana.SLOQueryRatioArgs(
                success_metric="string",
                total_metric="string",
                group_by_labels=["string"],
            ),
        )],
        alertings=[grafana.SLOAlertingArgs(
            annotations=[grafana.SLOAlertingAnnotationArgs(
                key="string",
                value="string",
            )],
            fastburns=[grafana.SLOAlertingFastburnArgs(
                annotations=[grafana.SLOAlertingFastburnAnnotationArgs(
                    key="string",
                    value="string",
                )],
                labels=[grafana.SLOAlertingFastburnLabelArgs(
                    key="string",
                    value="string",
                )],
            )],
            labels=[grafana.SLOAlertingLabelArgs(
                key="string",
                value="string",
            )],
            slowburns=[grafana.SLOAlertingSlowburnArgs(
                annotations=[grafana.SLOAlertingSlowburnAnnotationArgs(
                    key="string",
                    value="string",
                )],
                labels=[grafana.SLOAlertingSlowburnLabelArgs(
                    key="string",
                    value="string",
                )],
            )],
        )],
        destination_datasource=grafana.SLODestinationDatasourceArgs(
            uid="string",
        ),
        labels=[grafana.SLOLabelArgs(
            key="string",
            value="string",
        )],
        name="string")
    
    const sloResource = new grafana.SLO("sloResource", {
        description: "string",
        objectives: [{
            value: 0,
            window: "string",
        }],
        queries: [{
            type: "string",
            freeform: {
                query: "string",
            },
            ratio: {
                successMetric: "string",
                totalMetric: "string",
                groupByLabels: ["string"],
            },
        }],
        alertings: [{
            annotations: [{
                key: "string",
                value: "string",
            }],
            fastburns: [{
                annotations: [{
                    key: "string",
                    value: "string",
                }],
                labels: [{
                    key: "string",
                    value: "string",
                }],
            }],
            labels: [{
                key: "string",
                value: "string",
            }],
            slowburns: [{
                annotations: [{
                    key: "string",
                    value: "string",
                }],
                labels: [{
                    key: "string",
                    value: "string",
                }],
            }],
        }],
        destinationDatasource: {
            uid: "string",
        },
        labels: [{
            key: "string",
            value: "string",
        }],
        name: "string",
    });
    
    type: grafana:SLO
    properties:
        alertings:
            - annotations:
                - key: string
                  value: string
              fastburns:
                - annotations:
                    - key: string
                      value: string
                  labels:
                    - key: string
                      value: string
              labels:
                - key: string
                  value: string
              slowburns:
                - annotations:
                    - key: string
                      value: string
                  labels:
                    - key: string
                      value: string
        description: string
        destinationDatasource:
            uid: string
        labels:
            - key: string
              value: string
        name: string
        objectives:
            - value: 0
              window: string
        queries:
            - freeform:
                query: string
              ratio:
                groupByLabels:
                    - string
                successMetric: string
                totalMetric: string
              type: string
    

    SLO Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SLO resource accepts the following input properties:

    Description string
    Description is a free-text field that can provide more context to an SLO.
    Objectives List<Pulumiverse.Grafana.Inputs.SLOObjective>
    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 List<Pulumiverse.Grafana.Inputs.SLOQuery>
    Freeform Query Field
    Alertings List<Pulumiverse.Grafana.Inputs.SLOAlerting>
    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.
    DestinationDatasource Pulumiverse.Grafana.Inputs.SLODestinationDatasource
    Destination Datasource sets the datasource defined for an SLO
    Labels List<Pulumiverse.Grafana.Inputs.SLOLabel>
    Labels to attach only to Fast Burn alerts.
    Name string
    Name should be a short description of your indicator. Consider names like "API Availability"
    Description string
    Description is a free-text field that can provide more context to an SLO.
    Objectives []SLOObjectiveArgs
    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 []SLOQueryArgs
    Freeform Query Field
    Alertings []SLOAlertingArgs
    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.
    DestinationDatasource SLODestinationDatasourceArgs
    Destination Datasource sets the datasource defined for an SLO
    Labels []SLOLabelArgs
    Labels to attach only to Fast Burn alerts.
    Name string
    Name should be a short description of your indicator. Consider names like "API Availability"
    description String
    Description is a free-text field that can provide more context to an SLO.
    objectives List<SLOObjective>
    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 List<SLOQuery>
    Freeform Query Field
    alertings List<SLOAlerting>
    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.
    destinationDatasource SLODestinationDatasource
    Destination Datasource sets the datasource defined for an SLO
    labels List<SLOLabel>
    Labels to attach only to Fast Burn alerts.
    name String
    Name should be a short description of your indicator. Consider names like "API Availability"
    description string
    Description is a free-text field that can provide more context to an SLO.
    objectives SLOObjective[]
    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 SLOQuery[]
    Freeform Query Field
    alertings SLOAlerting[]
    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.
    destinationDatasource SLODestinationDatasource
    Destination Datasource sets the datasource defined for an SLO
    labels SLOLabel[]
    Labels to attach only to Fast Burn alerts.
    name string
    Name should be a short description of your indicator. Consider names like "API Availability"
    description str
    Description is a free-text field that can provide more context to an SLO.
    objectives Sequence[SLOObjectiveArgs]
    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 Sequence[SLOQueryArgs]
    Freeform Query Field
    alertings Sequence[SLOAlertingArgs]
    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.
    destination_datasource SLODestinationDatasourceArgs
    Destination Datasource sets the datasource defined for an SLO
    labels Sequence[SLOLabelArgs]
    Labels to attach only to Fast Burn alerts.
    name str
    Name should be a short description of your indicator. Consider names like "API Availability"
    description String
    Description is a free-text field that can provide more context to an SLO.
    objectives 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 List<Property Map>
    Freeform Query Field
    alertings 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.
    destinationDatasource Property Map
    Destination Datasource sets the datasource defined for an SLO
    labels List<Property Map>
    Labels to attach only to Fast Burn alerts.
    name String
    Name should be a short description of your indicator. Consider names like "API Availability"

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SLO resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SLO Resource

    Get an existing SLO resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SLOState, opts?: CustomResourceOptions): SLO
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alertings: Optional[Sequence[SLOAlertingArgs]] = None,
            description: Optional[str] = None,
            destination_datasource: Optional[SLODestinationDatasourceArgs] = None,
            labels: Optional[Sequence[SLOLabelArgs]] = None,
            name: Optional[str] = None,
            objectives: Optional[Sequence[SLOObjectiveArgs]] = None,
            queries: Optional[Sequence[SLOQueryArgs]] = None) -> SLO
    func GetSLO(ctx *Context, name string, id IDInput, state *SLOState, opts ...ResourceOption) (*SLO, error)
    public static SLO Get(string name, Input<string> id, SLOState? state, CustomResourceOptions? opts = null)
    public static SLO get(String name, Output<String> id, SLOState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Alertings List<Pulumiverse.Grafana.Inputs.SLOAlerting>
    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 string
    Description is a free-text field that can provide more context to an SLO.
    DestinationDatasource Pulumiverse.Grafana.Inputs.SLODestinationDatasource
    Destination Datasource sets the datasource defined for an SLO
    Labels List<Pulumiverse.Grafana.Inputs.SLOLabel>
    Labels to attach only to Fast Burn alerts.
    Name string
    Name should be a short description of your indicator. Consider names like "API Availability"
    Objectives List<Pulumiverse.Grafana.Inputs.SLOObjective>
    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 List<Pulumiverse.Grafana.Inputs.SLOQuery>
    Freeform Query Field
    Alertings []SLOAlertingArgs
    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 string
    Description is a free-text field that can provide more context to an SLO.
    DestinationDatasource SLODestinationDatasourceArgs
    Destination Datasource sets the datasource defined for an SLO
    Labels []SLOLabelArgs
    Labels to attach only to Fast Burn alerts.
    Name string
    Name should be a short description of your indicator. Consider names like "API Availability"
    Objectives []SLOObjectiveArgs
    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 []SLOQueryArgs
    Freeform Query Field
    alertings List<SLOAlerting>
    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 String
    Description is a free-text field that can provide more context to an SLO.
    destinationDatasource SLODestinationDatasource
    Destination Datasource sets the datasource defined for an SLO
    labels List<SLOLabel>
    Labels to attach only to Fast Burn alerts.
    name String
    Name should be a short description of your indicator. Consider names like "API Availability"
    objectives List<SLOObjective>
    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 List<SLOQuery>
    Freeform Query Field
    alertings SLOAlerting[]
    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 string
    Description is a free-text field that can provide more context to an SLO.
    destinationDatasource SLODestinationDatasource
    Destination Datasource sets the datasource defined for an SLO
    labels SLOLabel[]
    Labels to attach only to Fast Burn alerts.
    name string
    Name should be a short description of your indicator. Consider names like "API Availability"
    objectives SLOObjective[]
    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 SLOQuery[]
    Freeform Query Field
    alertings Sequence[SLOAlertingArgs]
    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 str
    Description is a free-text field that can provide more context to an SLO.
    destination_datasource SLODestinationDatasourceArgs
    Destination Datasource sets the datasource defined for an SLO
    labels Sequence[SLOLabelArgs]
    Labels to attach only to Fast Burn alerts.
    name str
    Name should be a short description of your indicator. Consider names like "API Availability"
    objectives Sequence[SLOObjectiveArgs]
    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 Sequence[SLOQueryArgs]
    Freeform Query Field
    alertings 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 String
    Description is a free-text field that can provide more context to an SLO.
    destinationDatasource Property Map
    Destination Datasource sets the datasource defined for an SLO
    labels List<Property Map>
    Labels to attach only to Fast Burn alerts.
    name String
    Name should be a short description of your indicator. Consider names like "API Availability"
    objectives 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 List<Property Map>
    Freeform Query Field

    Supporting Types

    SLOAlerting, SLOAlertingArgs

    Annotations List<Pulumiverse.Grafana.Inputs.SLOAlertingAnnotation>
    Annotations will be attached to all alerts generated by any of these rules.
    Fastburns List<Pulumiverse.Grafana.Inputs.SLOAlertingFastburn>
    Alerting Rules generated for Fast Burn alerts
    Labels List<Pulumiverse.Grafana.Inputs.SLOAlertingLabel>
    Labels will be attached to all alerts generated by any of these rules.
    Slowburns List<Pulumiverse.Grafana.Inputs.SLOAlertingSlowburn>
    Alerting Rules generated for Slow Burn alerts
    Annotations []SLOAlertingAnnotation
    Annotations will be attached to all alerts generated by any of these rules.
    Fastburns []SLOAlertingFastburn
    Alerting Rules generated for Fast Burn alerts
    Labels []SLOAlertingLabel
    Labels will be attached to all alerts generated by any of these rules.
    Slowburns []SLOAlertingSlowburn
    Alerting Rules generated for Slow Burn alerts
    annotations List<SLOAlertingAnnotation>
    Annotations will be attached to all alerts generated by any of these rules.
    fastburns List<SLOAlertingFastburn>
    Alerting Rules generated for Fast Burn alerts
    labels List<SLOAlertingLabel>
    Labels will be attached to all alerts generated by any of these rules.
    slowburns List<SLOAlertingSlowburn>
    Alerting Rules generated for Slow Burn alerts
    annotations SLOAlertingAnnotation[]
    Annotations will be attached to all alerts generated by any of these rules.
    fastburns SLOAlertingFastburn[]
    Alerting Rules generated for Fast Burn alerts
    labels SLOAlertingLabel[]
    Labels will be attached to all alerts generated by any of these rules.
    slowburns SLOAlertingSlowburn[]
    Alerting Rules generated for Slow Burn alerts
    annotations Sequence[SLOAlertingAnnotation]
    Annotations will be attached to all alerts generated by any of these rules.
    fastburns Sequence[SLOAlertingFastburn]
    Alerting Rules generated for Fast Burn alerts
    labels Sequence[SLOAlertingLabel]
    Labels will be attached to all alerts generated by any of these rules.
    slowburns Sequence[SLOAlertingSlowburn]
    Alerting Rules generated for Slow Burn alerts
    annotations List<Property Map>
    Annotations will be attached to all alerts generated by any of these rules.
    fastburns List<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.
    slowburns List<Property Map>
    Alerting Rules generated for Slow Burn alerts

    SLOAlertingAnnotation, SLOAlertingAnnotationArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    SLOAlertingFastburn, SLOAlertingFastburnArgs

    Annotations List<Pulumiverse.Grafana.Inputs.SLOAlertingFastburnAnnotation>
    Annotations will be attached to all alerts generated by any of these rules.
    Labels List<Pulumiverse.Grafana.Inputs.SLOAlertingFastburnLabel>
    Labels to attach only to Fast Burn alerts.
    Annotations []SLOAlertingFastburnAnnotation
    Annotations will be attached to all alerts generated by any of these rules.
    Labels []SLOAlertingFastburnLabel
    Labels to attach only to Fast Burn alerts.
    annotations List<SLOAlertingFastburnAnnotation>
    Annotations will be attached to all alerts generated by any of these rules.
    labels List<SLOAlertingFastburnLabel>
    Labels to attach only to Fast Burn alerts.
    annotations SLOAlertingFastburnAnnotation[]
    Annotations will be attached to all alerts generated by any of these rules.
    labels SLOAlertingFastburnLabel[]
    Labels to attach only to Fast Burn alerts.
    annotations Sequence[SLOAlertingFastburnAnnotation]
    Annotations will be attached to all alerts generated by any of these rules.
    labels Sequence[SLOAlertingFastburnLabel]
    Labels to attach only to Fast Burn alerts.
    annotations List<Property Map>
    Annotations will be attached to all alerts generated by any of these rules.
    labels List<Property Map>
    Labels to attach only to Fast Burn alerts.

    SLOAlertingFastburnAnnotation, SLOAlertingFastburnAnnotationArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    SLOAlertingFastburnLabel, SLOAlertingFastburnLabelArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    SLOAlertingLabel, SLOAlertingLabelArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    SLOAlertingSlowburn, SLOAlertingSlowburnArgs

    Annotations List<Pulumiverse.Grafana.Inputs.SLOAlertingSlowburnAnnotation>
    Annotations will be attached to all alerts generated by any of these rules.
    Labels List<Pulumiverse.Grafana.Inputs.SLOAlertingSlowburnLabel>
    Labels to attach only to Fast Burn alerts.
    Annotations []SLOAlertingSlowburnAnnotation
    Annotations will be attached to all alerts generated by any of these rules.
    Labels []SLOAlertingSlowburnLabel
    Labels to attach only to Fast Burn alerts.
    annotations List<SLOAlertingSlowburnAnnotation>
    Annotations will be attached to all alerts generated by any of these rules.
    labels List<SLOAlertingSlowburnLabel>
    Labels to attach only to Fast Burn alerts.
    annotations SLOAlertingSlowburnAnnotation[]
    Annotations will be attached to all alerts generated by any of these rules.
    labels SLOAlertingSlowburnLabel[]
    Labels to attach only to Fast Burn alerts.
    annotations Sequence[SLOAlertingSlowburnAnnotation]
    Annotations will be attached to all alerts generated by any of these rules.
    labels Sequence[SLOAlertingSlowburnLabel]
    Labels to attach only to Fast Burn alerts.
    annotations List<Property Map>
    Annotations will be attached to all alerts generated by any of these rules.
    labels List<Property Map>
    Labels to attach only to Fast Burn alerts.

    SLOAlertingSlowburnAnnotation, SLOAlertingSlowburnAnnotationArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    SLOAlertingSlowburnLabel, SLOAlertingSlowburnLabelArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    SLODestinationDatasource, SLODestinationDatasourceArgs

    Uid string
    UID for the Mimir Datasource
    Uid string
    UID for the Mimir Datasource
    uid String
    UID for the Mimir Datasource
    uid string
    UID for the Mimir Datasource
    uid str
    UID for the Mimir Datasource
    uid String
    UID for the Mimir Datasource

    SLOLabel, SLOLabelArgs

    Key string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    SLOObjective, SLOObjectiveArgs

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

    SLOQuery, SLOQueryArgs

    Type string
    Query type must be one of: "freeform", "query", "ratio", or "threshold"
    Freeform Pulumiverse.Grafana.Inputs.SLOQueryFreeform
    Ratio Pulumiverse.Grafana.Inputs.SLOQueryRatio
    Type string
    Query type must be one of: "freeform", "query", "ratio", or "threshold"
    Freeform SLOQueryFreeform
    Ratio SLOQueryRatio
    type String
    Query type must be one of: "freeform", "query", "ratio", or "threshold"
    freeform SLOQueryFreeform
    ratio SLOQueryRatio
    type string
    Query type must be one of: "freeform", "query", "ratio", or "threshold"
    freeform SLOQueryFreeform
    ratio SLOQueryRatio
    type str
    Query type must be one of: "freeform", "query", "ratio", or "threshold"
    freeform SLOQueryFreeform
    ratio SLOQueryRatio
    type String
    Query type must be one of: "freeform", "query", "ratio", or "threshold"
    freeform Property Map
    ratio Property Map

    SLOQueryFreeform, SLOQueryFreeformArgs

    Query string
    Freeform Query Field
    Query string
    Freeform Query Field
    query String
    Freeform Query Field
    query string
    Freeform Query Field
    query str
    Freeform Query Field
    query String
    Freeform Query Field

    SLOQueryRatio, SLOQueryRatioArgs

    SuccessMetric string
    Counter metric for success events (numerator)
    TotalMetric 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 string
    Counter metric for success events (numerator)
    TotalMetric 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 String
    Counter metric for success events (numerator)
    totalMetric 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 string
    Counter metric for success events (numerator)
    totalMetric 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 str
    Counter metric for success events (numerator)
    total_metric 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 String
    Counter metric for success events (numerator)
    totalMetric 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*]*$"

    Import

    $ pulumi import grafana:index/sLO:SLO name "{{ uuid }}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse