published on Wednesday, Jul 15, 2026 by Pydantic
published on Wednesday, Jul 15, 2026 by Pydantic
Manages a Logfire SLO (Service Level Objective).
Experimental: this resource is backed by a Logfire API that is not yet stable. Its schema and behavior may change in backwards-incompatible ways in future releases. SLOs also require a Logfire plan that includes them.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as logfire from "@pydantic/pulumi-logfire";
const exampleProject = new logfire.Project("exampleProject", {});
const exampleSlo = new logfire.Slo("exampleSlo", {
projectId: exampleProject.id,
scopeValue: "payments-api",
description: "Successful request ratio for the payments API",
totalQuery: "parent_span_id IS NULL",
badQuery: "otel_status_code = 'ERROR'",
targetPercent: "99.9",
rollingWindow: "30d",
environments: ["prod"],
});
import pulumi
import pulumi_logfire as logfire
example_project = logfire.Project("exampleProject")
example_slo = logfire.Slo("exampleSlo",
project_id=example_project.id,
scope_value="payments-api",
description="Successful request ratio for the payments API",
total_query="parent_span_id IS NULL",
bad_query="otel_status_code = 'ERROR'",
target_percent="99.9",
rolling_window="30d",
environments=["prod"])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pydantic/pulumi-logfire/sdk/go/logfire"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleProject, err := logfire.NewProject(ctx, "exampleProject", nil)
if err != nil {
return err
}
_, err = logfire.NewSlo(ctx, "exampleSlo", &logfire.SloArgs{
ProjectId: exampleProject.ID(),
ScopeValue: pulumi.String("payments-api"),
Description: pulumi.String("Successful request ratio for the payments API"),
TotalQuery: pulumi.String("parent_span_id IS NULL"),
BadQuery: pulumi.String("otel_status_code = 'ERROR'"),
TargetPercent: pulumi.String("99.9"),
RollingWindow: pulumi.String("30d"),
Environments: pulumi.StringArray{
pulumi.String("prod"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Logfire = Pulumi.Logfire;
return await Deployment.RunAsync(() =>
{
var exampleProject = new Logfire.Project("exampleProject");
var exampleSlo = new Logfire.Slo("exampleSlo", new()
{
ProjectId = exampleProject.Id,
ScopeValue = "payments-api",
Description = "Successful request ratio for the payments API",
TotalQuery = "parent_span_id IS NULL",
BadQuery = "otel_status_code = 'ERROR'",
TargetPercent = "99.9",
RollingWindow = "30d",
Environments = new[]
{
"prod",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.logfire.Project;
import com.pulumi.logfire.Slo;
import com.pulumi.logfire.SloArgs;
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 exampleProject = new Project("exampleProject");
var exampleSlo = new Slo("exampleSlo", SloArgs.builder()
.projectId(exampleProject.id())
.scopeValue("payments-api")
.description("Successful request ratio for the payments API")
.totalQuery("parent_span_id IS NULL")
.badQuery("otel_status_code = 'ERROR'")
.targetPercent("99.9")
.rollingWindow("30d")
.environments("prod")
.build());
}
}
resources:
exampleProject:
type: logfire:Project
exampleSlo:
type: logfire:Slo
properties:
projectId: ${exampleProject.id}
scopeValue: payments-api
description: Successful request ratio for the payments API
totalQuery: parent_span_id IS NULL
badQuery: otel_status_code = 'ERROR'
targetPercent: '99.9'
rollingWindow: 30d
environments:
- prod
Example coming soon!
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,
bad_query: Optional[str] = None,
project_id: Optional[str] = None,
rolling_window: Optional[str] = None,
scope_value: Optional[str] = None,
target_percent: Optional[str] = None,
total_query: Optional[str] = None,
description: Optional[str] = None,
environments: Optional[Sequence[str]] = None,
metric_aggregation: Optional[str] = None,
name: Optional[str] = None,
scope_kind: Optional[str] = None,
source: Optional[str] = None)func NewSlo(ctx *Context, name string, args SloArgs, opts ...ResourceOption) (*Slo, error)public Slo(string name, SloArgs args, CustomResourceOptions? opts = null)type: logfire:Slo
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "logfire_slo" "name" {
# resource properties
}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 Logfire.Slo("sloResource", new()
{
BadQuery = "string",
ProjectId = "string",
RollingWindow = "string",
ScopeValue = "string",
TargetPercent = "string",
TotalQuery = "string",
Description = "string",
Environments = new[]
{
"string",
},
MetricAggregation = "string",
Name = "string",
ScopeKind = "string",
Source = "string",
});
example, err := logfire.NewSlo(ctx, "sloResource", &logfire.SloArgs{
BadQuery: pulumi.String("string"),
ProjectId: pulumi.String("string"),
RollingWindow: pulumi.String("string"),
ScopeValue: pulumi.String("string"),
TargetPercent: pulumi.String("string"),
TotalQuery: pulumi.String("string"),
Description: pulumi.String("string"),
Environments: pulumi.StringArray{
pulumi.String("string"),
},
MetricAggregation: pulumi.String("string"),
Name: pulumi.String("string"),
ScopeKind: pulumi.String("string"),
Source: pulumi.String("string"),
})
resource "logfire_slo" "sloResource" {
bad_query = "string"
project_id = "string"
rolling_window = "string"
scope_value = "string"
target_percent = "string"
total_query = "string"
description = "string"
environments = ["string"]
metric_aggregation = "string"
name = "string"
scope_kind = "string"
source = "string"
}
var sloResource = new Slo("sloResource", SloArgs.builder()
.badQuery("string")
.projectId("string")
.rollingWindow("string")
.scopeValue("string")
.targetPercent("string")
.totalQuery("string")
.description("string")
.environments("string")
.metricAggregation("string")
.name("string")
.scopeKind("string")
.source("string")
.build());
slo_resource = logfire.Slo("sloResource",
bad_query="string",
project_id="string",
rolling_window="string",
scope_value="string",
target_percent="string",
total_query="string",
description="string",
environments=["string"],
metric_aggregation="string",
name="string",
scope_kind="string",
source="string")
const sloResource = new logfire.Slo("sloResource", {
badQuery: "string",
projectId: "string",
rollingWindow: "string",
scopeValue: "string",
targetPercent: "string",
totalQuery: "string",
description: "string",
environments: ["string"],
metricAggregation: "string",
name: "string",
scopeKind: "string",
source: "string",
});
type: logfire:Slo
properties:
badQuery: string
description: string
environments:
- string
metricAggregation: string
name: string
projectId: string
rollingWindow: string
scopeKind: string
scopeValue: string
source: string
targetPercent: string
totalQuery: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Slo resource accepts the following input properties:
- Bad
Query string - SQL boolean expression selecting the bad events counted by the SLO.
- Project
Id string - Project ID (UUID) used for SLO API paths.
- Rolling
Window string - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - Scope
Value string - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - Target
Percent string - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - Total
Query string - SQL boolean expression selecting all events counted by the SLO.
- Description string
- SLO description.
- Environments List<string>
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- Metric
Aggregation string - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - Name string
- SLO name (unique per project).
- Scope
Kind string - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - Source string
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords.
- Bad
Query string - SQL boolean expression selecting the bad events counted by the SLO.
- Project
Id string - Project ID (UUID) used for SLO API paths.
- Rolling
Window string - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - Scope
Value string - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - Target
Percent string - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - Total
Query string - SQL boolean expression selecting all events counted by the SLO.
- Description string
- SLO description.
- Environments []string
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- Metric
Aggregation string - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - Name string
- SLO name (unique per project).
- Scope
Kind string - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - Source string
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords.
- bad_
query string - SQL boolean expression selecting the bad events counted by the SLO.
- project_
id string - Project ID (UUID) used for SLO API paths.
- rolling_
window string - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - scope_
value string - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - target_
percent string - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - total_
query string - SQL boolean expression selecting all events counted by the SLO.
- description string
- SLO description.
- environments list(string)
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- metric_
aggregation string - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - name string
- SLO name (unique per project).
- scope_
kind string - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - source string
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords.
- bad
Query String - SQL boolean expression selecting the bad events counted by the SLO.
- project
Id String - Project ID (UUID) used for SLO API paths.
- rolling
Window String - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - scope
Value String - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - target
Percent String - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - total
Query String - SQL boolean expression selecting all events counted by the SLO.
- description String
- SLO description.
- environments List<String>
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- metric
Aggregation String - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - name String
- SLO name (unique per project).
- scope
Kind String - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - source String
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords.
- bad
Query string - SQL boolean expression selecting the bad events counted by the SLO.
- project
Id string - Project ID (UUID) used for SLO API paths.
- rolling
Window string - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - scope
Value string - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - target
Percent string - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - total
Query string - SQL boolean expression selecting all events counted by the SLO.
- description string
- SLO description.
- environments string[]
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- metric
Aggregation string - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - name string
- SLO name (unique per project).
- scope
Kind string - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - source string
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords.
- bad_
query str - SQL boolean expression selecting the bad events counted by the SLO.
- project_
id str - Project ID (UUID) used for SLO API paths.
- rolling_
window str - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - scope_
value str - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - target_
percent str - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - total_
query str - SQL boolean expression selecting all events counted by the SLO.
- description str
- SLO description.
- environments Sequence[str]
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- metric_
aggregation str - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - name str
- SLO name (unique per project).
- scope_
kind str - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - source str
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords.
- bad
Query String - SQL boolean expression selecting the bad events counted by the SLO.
- project
Id String - Project ID (UUID) used for SLO API paths.
- rolling
Window String - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - scope
Value String - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - target
Percent String - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - total
Query String - SQL boolean expression selecting all events counted by the SLO.
- description String
- SLO description.
- environments List<String>
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- metric
Aggregation String - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - name String
- SLO name (unique per project).
- scope
Kind String - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - source String
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords.
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 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,
bad_query: Optional[str] = None,
description: Optional[str] = None,
environments: Optional[Sequence[str]] = None,
metric_aggregation: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
rolling_window: Optional[str] = None,
scope_kind: Optional[str] = None,
scope_value: Optional[str] = None,
source: Optional[str] = None,
target_percent: Optional[str] = None,
total_query: Optional[str] = None) -> Slofunc 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)resources: _: type: logfire:Slo get: id: ${id}import {
to = logfire_slo.example
id = "${id}"
}
- 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.
- Bad
Query string - SQL boolean expression selecting the bad events counted by the SLO.
- Description string
- SLO description.
- Environments List<string>
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- Metric
Aggregation string - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - Name string
- SLO name (unique per project).
- Project
Id string - Project ID (UUID) used for SLO API paths.
- Rolling
Window string - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - Scope
Kind string - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - Scope
Value string - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - Source string
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords. - Target
Percent string - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - Total
Query string - SQL boolean expression selecting all events counted by the SLO.
- Bad
Query string - SQL boolean expression selecting the bad events counted by the SLO.
- Description string
- SLO description.
- Environments []string
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- Metric
Aggregation string - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - Name string
- SLO name (unique per project).
- Project
Id string - Project ID (UUID) used for SLO API paths.
- Rolling
Window string - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - Scope
Kind string - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - Scope
Value string - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - Source string
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords. - Target
Percent string - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - Total
Query string - SQL boolean expression selecting all events counted by the SLO.
- bad_
query string - SQL boolean expression selecting the bad events counted by the SLO.
- description string
- SLO description.
- environments list(string)
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- metric_
aggregation string - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - name string
- SLO name (unique per project).
- project_
id string - Project ID (UUID) used for SLO API paths.
- rolling_
window string - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - scope_
kind string - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - scope_
value string - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - source string
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords. - target_
percent string - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - total_
query string - SQL boolean expression selecting all events counted by the SLO.
- bad
Query String - SQL boolean expression selecting the bad events counted by the SLO.
- description String
- SLO description.
- environments List<String>
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- metric
Aggregation String - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - name String
- SLO name (unique per project).
- project
Id String - Project ID (UUID) used for SLO API paths.
- rolling
Window String - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - scope
Kind String - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - scope
Value String - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - source String
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords. - target
Percent String - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - total
Query String - SQL boolean expression selecting all events counted by the SLO.
- bad
Query string - SQL boolean expression selecting the bad events counted by the SLO.
- description string
- SLO description.
- environments string[]
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- metric
Aggregation string - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - name string
- SLO name (unique per project).
- project
Id string - Project ID (UUID) used for SLO API paths.
- rolling
Window string - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - scope
Kind string - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - scope
Value string - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - source string
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords. - target
Percent string - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - total
Query string - SQL boolean expression selecting all events counted by the SLO.
- bad_
query str - SQL boolean expression selecting the bad events counted by the SLO.
- description str
- SLO description.
- environments Sequence[str]
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- metric_
aggregation str - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - name str
- SLO name (unique per project).
- project_
id str - Project ID (UUID) used for SLO API paths.
- rolling_
window str - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - scope_
kind str - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - scope_
value str - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - source str
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords. - target_
percent str - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - total_
query str - SQL boolean expression selecting all events counted by the SLO.
- bad
Query String - SQL boolean expression selecting the bad events counted by the SLO.
- description String
- SLO description.
- environments List<String>
- Deployment environments the SLO is scoped to. Omit to cover all environments.
- metric
Aggregation String - How a
metricsSLO aggregates its SLI:additive(sum of scalar values, for delta-count metrics),gauge_fraction(fraction of samples meeting the condition, for gauges), orcounter_rate(sum of per-series increases, for cumulative counters). Ignored whensource = "records". Defaults toadditive. - name String
- SLO name (unique per project).
- project
Id String - Project ID (UUID) used for SLO API paths.
- rolling
Window String - Rolling evaluation window as a duration string (e.g.
"24h","30d"). Must be between 1h and 90d. The API enforces a lower effective cap: the window cannot exceed your subscription plan's maximum SLO window, nor the project's data retention for the SLO source (recordsormetrics) — a longer window would compute against missing data. Requests over either cap are rejected with a validation error. - scope
Kind String - What the SLO is anchored to: a service (
service) or an LLM provider (provider). Defaults toservice. Changing it forces a new SLO. - scope
Value String - The service name (
scope_kind = "service") or provider slug likeopenai(scope_kind = "provider"). Changing it forces a new SLO. - source String
- Whether the SLO ratio is computed over span events (
records) or metric values (metrics). Defaults torecords. - target
Percent String - Target percentage as a decimal string, exclusively between 0 and 100 (e.g.
"99.9"). - total
Query String - SQL boolean expression selecting all events counted by the SLO.
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = logfire_slo.example
id = “example-project/payments-availability”
}
The pulumi import command can be used, for example:
Import by project name and SLO name.
$ pulumi import logfire:index/slo:Slo example "example-project/payments-availability"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- logfire pydantic/pulumi-logfire
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
logfireTerraform Provider.
published on Wednesday, Jul 15, 2026 by Pydantic