1. Packages
  2. Datadog Provider
  3. API Docs
  4. ServiceLevelObjective
Datadog v4.47.0 published on Thursday, Mar 20, 2025 by Pulumi

datadog.ServiceLevelObjective

Explore with Pulumi AI

Provides a Datadog service level objective resource. This can be used to create and manage Datadog service level objectives.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

// Metric-Based SLO
// Create a new Datadog service level objective
const foo = new datadog.ServiceLevelObjective("foo", {
    name: "Example Metric SLO",
    type: "metric",
    description: "My custom metric SLO",
    query: {
        numerator: "sum:my.custom.count.metric{type:good_events}.as_count()",
        denominator: "sum:my.custom.count.metric{*}.as_count()",
    },
    thresholds: [
        {
            timeframe: "7d",
            target: 99.9,
            warning: 99.99,
        },
        {
            timeframe: "30d",
            target: 99.9,
            warning: 99.99,
        },
    ],
    timeframe: "30d",
    targetThreshold: 99.9,
    warningThreshold: 99.99,
    tags: [
        "foo:bar",
        "baz",
    ],
});
// Monitor-Based SLO
// Create a new Datadog service level objective
const bar = new datadog.ServiceLevelObjective("bar", {
    name: "Example Monitor SLO",
    type: "monitor",
    description: "My custom monitor SLO",
    monitorIds: [
        1,
        2,
        3,
    ],
    thresholds: [
        {
            timeframe: "7d",
            target: 99.9,
            warning: 99.99,
        },
        {
            timeframe: "30d",
            target: 99.9,
            warning: 99.99,
        },
    ],
    timeframe: "30d",
    targetThreshold: 99.9,
    warningThreshold: 99.99,
    tags: [
        "foo:bar",
        "baz",
    ],
});
const timeSliceSlo = new datadog.ServiceLevelObjective("time_slice_slo", {
    name: "Example Time Slice SLO",
    type: "time_slice",
    description: "My custom time slice SLO",
    sliSpecification: {
        timeSlice: {
            query: {
                formula: {
                    formulaExpression: "query1",
                },
                queries: [{
                    metricQuery: {
                        name: "query1",
                        query: "avg:my.custom.count.metric{*}.as_count()",
                    },
                }],
            },
            comparator: ">",
            threshold: 0.9,
        },
    },
    thresholds: [{
        timeframe: "7d",
        target: 99.9,
        warning: 99.99,
    }],
    timeframe: "7d",
    targetThreshold: 99.9,
    warningThreshold: 99.99,
    tags: [
        "service:myservice",
        "team:myteam",
    ],
});
Copy
import pulumi
import pulumi_datadog as datadog

# Metric-Based SLO
# Create a new Datadog service level objective
foo = datadog.ServiceLevelObjective("foo",
    name="Example Metric SLO",
    type="metric",
    description="My custom metric SLO",
    query={
        "numerator": "sum:my.custom.count.metric{type:good_events}.as_count()",
        "denominator": "sum:my.custom.count.metric{*}.as_count()",
    },
    thresholds=[
        {
            "timeframe": "7d",
            "target": 99.9,
            "warning": 99.99,
        },
        {
            "timeframe": "30d",
            "target": 99.9,
            "warning": 99.99,
        },
    ],
    timeframe="30d",
    target_threshold=99.9,
    warning_threshold=99.99,
    tags=[
        "foo:bar",
        "baz",
    ])
# Monitor-Based SLO
# Create a new Datadog service level objective
bar = datadog.ServiceLevelObjective("bar",
    name="Example Monitor SLO",
    type="monitor",
    description="My custom monitor SLO",
    monitor_ids=[
        1,
        2,
        3,
    ],
    thresholds=[
        {
            "timeframe": "7d",
            "target": 99.9,
            "warning": 99.99,
        },
        {
            "timeframe": "30d",
            "target": 99.9,
            "warning": 99.99,
        },
    ],
    timeframe="30d",
    target_threshold=99.9,
    warning_threshold=99.99,
    tags=[
        "foo:bar",
        "baz",
    ])
time_slice_slo = datadog.ServiceLevelObjective("time_slice_slo",
    name="Example Time Slice SLO",
    type="time_slice",
    description="My custom time slice SLO",
    sli_specification={
        "time_slice": {
            "query": {
                "formula": {
                    "formula_expression": "query1",
                },
                "queries": [{
                    "metric_query": {
                        "name": "query1",
                        "query": "avg:my.custom.count.metric{*}.as_count()",
                    },
                }],
            },
            "comparator": ">",
            "threshold": 0.9,
        },
    },
    thresholds=[{
        "timeframe": "7d",
        "target": 99.9,
        "warning": 99.99,
    }],
    timeframe="7d",
    target_threshold=99.9,
    warning_threshold=99.99,
    tags=[
        "service:myservice",
        "team:myteam",
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Metric-Based SLO
		// Create a new Datadog service level objective
		_, err := datadog.NewServiceLevelObjective(ctx, "foo", &datadog.ServiceLevelObjectiveArgs{
			Name:        pulumi.String("Example Metric SLO"),
			Type:        pulumi.String("metric"),
			Description: pulumi.String("My custom metric SLO"),
			Query: &datadog.ServiceLevelObjectiveQueryArgs{
				Numerator:   pulumi.String("sum:my.custom.count.metric{type:good_events}.as_count()"),
				Denominator: pulumi.String("sum:my.custom.count.metric{*}.as_count()"),
			},
			Thresholds: datadog.ServiceLevelObjectiveThresholdArray{
				&datadog.ServiceLevelObjectiveThresholdArgs{
					Timeframe: pulumi.String("7d"),
					Target:    pulumi.Float64(99.9),
					Warning:   pulumi.Float64(99.99),
				},
				&datadog.ServiceLevelObjectiveThresholdArgs{
					Timeframe: pulumi.String("30d"),
					Target:    pulumi.Float64(99.9),
					Warning:   pulumi.Float64(99.99),
				},
			},
			Timeframe:        pulumi.String("30d"),
			TargetThreshold:  pulumi.Float64(99.9),
			WarningThreshold: pulumi.Float64(99.99),
			Tags: pulumi.StringArray{
				pulumi.String("foo:bar"),
				pulumi.String("baz"),
			},
		})
		if err != nil {
			return err
		}
		// Monitor-Based SLO
		// Create a new Datadog service level objective
		_, err = datadog.NewServiceLevelObjective(ctx, "bar", &datadog.ServiceLevelObjectiveArgs{
			Name:        pulumi.String("Example Monitor SLO"),
			Type:        pulumi.String("monitor"),
			Description: pulumi.String("My custom monitor SLO"),
			MonitorIds: pulumi.IntArray{
				pulumi.Int(1),
				pulumi.Int(2),
				pulumi.Int(3),
			},
			Thresholds: datadog.ServiceLevelObjectiveThresholdArray{
				&datadog.ServiceLevelObjectiveThresholdArgs{
					Timeframe: pulumi.String("7d"),
					Target:    pulumi.Float64(99.9),
					Warning:   pulumi.Float64(99.99),
				},
				&datadog.ServiceLevelObjectiveThresholdArgs{
					Timeframe: pulumi.String("30d"),
					Target:    pulumi.Float64(99.9),
					Warning:   pulumi.Float64(99.99),
				},
			},
			Timeframe:        pulumi.String("30d"),
			TargetThreshold:  pulumi.Float64(99.9),
			WarningThreshold: pulumi.Float64(99.99),
			Tags: pulumi.StringArray{
				pulumi.String("foo:bar"),
				pulumi.String("baz"),
			},
		})
		if err != nil {
			return err
		}
		_, err = datadog.NewServiceLevelObjective(ctx, "time_slice_slo", &datadog.ServiceLevelObjectiveArgs{
			Name:        pulumi.String("Example Time Slice SLO"),
			Type:        pulumi.String("time_slice"),
			Description: pulumi.String("My custom time slice SLO"),
			SliSpecification: &datadog.ServiceLevelObjectiveSliSpecificationArgs{
				TimeSlice: &datadog.ServiceLevelObjectiveSliSpecificationTimeSliceArgs{
					Query: &datadog.ServiceLevelObjectiveSliSpecificationTimeSliceQueryArgs{
						Formula: &datadog.ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormulaArgs{
							FormulaExpression: pulumi.String("query1"),
						},
						Queries: datadog.ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryArray{
							&datadog.ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryArgs{
								MetricQuery: &datadog.ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryMetricQueryArgs{
									Name:  pulumi.String("query1"),
									Query: pulumi.String("avg:my.custom.count.metric{*}.as_count()"),
								},
							},
						},
					},
					Comparator: pulumi.String(">"),
					Threshold:  pulumi.Float64(0.9),
				},
			},
			Thresholds: datadog.ServiceLevelObjectiveThresholdArray{
				&datadog.ServiceLevelObjectiveThresholdArgs{
					Timeframe: pulumi.String("7d"),
					Target:    pulumi.Float64(99.9),
					Warning:   pulumi.Float64(99.99),
				},
			},
			Timeframe:        pulumi.String("7d"),
			TargetThreshold:  pulumi.Float64(99.9),
			WarningThreshold: pulumi.Float64(99.99),
			Tags: pulumi.StringArray{
				pulumi.String("service:myservice"),
				pulumi.String("team:myteam"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;

return await Deployment.RunAsync(() => 
{
    // Metric-Based SLO
    // Create a new Datadog service level objective
    var foo = new Datadog.ServiceLevelObjective("foo", new()
    {
        Name = "Example Metric SLO",
        Type = "metric",
        Description = "My custom metric SLO",
        Query = new Datadog.Inputs.ServiceLevelObjectiveQueryArgs
        {
            Numerator = "sum:my.custom.count.metric{type:good_events}.as_count()",
            Denominator = "sum:my.custom.count.metric{*}.as_count()",
        },
        Thresholds = new[]
        {
            new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
            {
                Timeframe = "7d",
                Target = 99.9,
                Warning = 99.99,
            },
            new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
            {
                Timeframe = "30d",
                Target = 99.9,
                Warning = 99.99,
            },
        },
        Timeframe = "30d",
        TargetThreshold = 99.9,
        WarningThreshold = 99.99,
        Tags = new[]
        {
            "foo:bar",
            "baz",
        },
    });

    // Monitor-Based SLO
    // Create a new Datadog service level objective
    var bar = new Datadog.ServiceLevelObjective("bar", new()
    {
        Name = "Example Monitor SLO",
        Type = "monitor",
        Description = "My custom monitor SLO",
        MonitorIds = new[]
        {
            1,
            2,
            3,
        },
        Thresholds = new[]
        {
            new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
            {
                Timeframe = "7d",
                Target = 99.9,
                Warning = 99.99,
            },
            new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
            {
                Timeframe = "30d",
                Target = 99.9,
                Warning = 99.99,
            },
        },
        Timeframe = "30d",
        TargetThreshold = 99.9,
        WarningThreshold = 99.99,
        Tags = new[]
        {
            "foo:bar",
            "baz",
        },
    });

    var timeSliceSlo = new Datadog.ServiceLevelObjective("time_slice_slo", new()
    {
        Name = "Example Time Slice SLO",
        Type = "time_slice",
        Description = "My custom time slice SLO",
        SliSpecification = new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationArgs
        {
            TimeSlice = new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationTimeSliceArgs
            {
                Query = new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationTimeSliceQueryArgs
                {
                    Formula = new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormulaArgs
                    {
                        FormulaExpression = "query1",
                    },
                    Queries = new[]
                    {
                        new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryArgs
                        {
                            MetricQuery = new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryMetricQueryArgs
                            {
                                Name = "query1",
                                Query = "avg:my.custom.count.metric{*}.as_count()",
                            },
                        },
                    },
                },
                Comparator = ">",
                Threshold = 0.9,
            },
        },
        Thresholds = new[]
        {
            new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
            {
                Timeframe = "7d",
                Target = 99.9,
                Warning = 99.99,
            },
        },
        Timeframe = "7d",
        TargetThreshold = 99.9,
        WarningThreshold = 99.99,
        Tags = new[]
        {
            "service:myservice",
            "team:myteam",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.ServiceLevelObjective;
import com.pulumi.datadog.ServiceLevelObjectiveArgs;
import com.pulumi.datadog.inputs.ServiceLevelObjectiveQueryArgs;
import com.pulumi.datadog.inputs.ServiceLevelObjectiveThresholdArgs;
import com.pulumi.datadog.inputs.ServiceLevelObjectiveSliSpecificationArgs;
import com.pulumi.datadog.inputs.ServiceLevelObjectiveSliSpecificationTimeSliceArgs;
import com.pulumi.datadog.inputs.ServiceLevelObjectiveSliSpecificationTimeSliceQueryArgs;
import com.pulumi.datadog.inputs.ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormulaArgs;
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) {
        // Metric-Based SLO
        // Create a new Datadog service level objective
        var foo = new ServiceLevelObjective("foo", ServiceLevelObjectiveArgs.builder()
            .name("Example Metric SLO")
            .type("metric")
            .description("My custom metric SLO")
            .query(ServiceLevelObjectiveQueryArgs.builder()
                .numerator("sum:my.custom.count.metric{type:good_events}.as_count()")
                .denominator("sum:my.custom.count.metric{*}.as_count()")
                .build())
            .thresholds(            
                ServiceLevelObjectiveThresholdArgs.builder()
                    .timeframe("7d")
                    .target(99.9)
                    .warning(99.99)
                    .build(),
                ServiceLevelObjectiveThresholdArgs.builder()
                    .timeframe("30d")
                    .target(99.9)
                    .warning(99.99)
                    .build())
            .timeframe("30d")
            .targetThreshold(99.9)
            .warningThreshold(99.99)
            .tags(            
                "foo:bar",
                "baz")
            .build());

        // Monitor-Based SLO
        // Create a new Datadog service level objective
        var bar = new ServiceLevelObjective("bar", ServiceLevelObjectiveArgs.builder()
            .name("Example Monitor SLO")
            .type("monitor")
            .description("My custom monitor SLO")
            .monitorIds(            
                1,
                2,
                3)
            .thresholds(            
                ServiceLevelObjectiveThresholdArgs.builder()
                    .timeframe("7d")
                    .target(99.9)
                    .warning(99.99)
                    .build(),
                ServiceLevelObjectiveThresholdArgs.builder()
                    .timeframe("30d")
                    .target(99.9)
                    .warning(99.99)
                    .build())
            .timeframe("30d")
            .targetThreshold(99.9)
            .warningThreshold(99.99)
            .tags(            
                "foo:bar",
                "baz")
            .build());

        var timeSliceSlo = new ServiceLevelObjective("timeSliceSlo", ServiceLevelObjectiveArgs.builder()
            .name("Example Time Slice SLO")
            .type("time_slice")
            .description("My custom time slice SLO")
            .sliSpecification(ServiceLevelObjectiveSliSpecificationArgs.builder()
                .timeSlice(ServiceLevelObjectiveSliSpecificationTimeSliceArgs.builder()
                    .query(ServiceLevelObjectiveSliSpecificationTimeSliceQueryArgs.builder()
                        .formula(ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormulaArgs.builder()
                            .formulaExpression("query1")
                            .build())
                        .queries(ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryArgs.builder()
                            .metricQuery(ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryMetricQueryArgs.builder()
                                .name("query1")
                                .query("avg:my.custom.count.metric{*}.as_count()")
                                .build())
                            .build())
                        .build())
                    .comparator(">")
                    .threshold(0.9)
                    .build())
                .build())
            .thresholds(ServiceLevelObjectiveThresholdArgs.builder()
                .timeframe("7d")
                .target(99.9)
                .warning(99.99)
                .build())
            .timeframe("7d")
            .targetThreshold(99.9)
            .warningThreshold(99.99)
            .tags(            
                "service:myservice",
                "team:myteam")
            .build());

    }
}
Copy
resources:
  # Metric-Based SLO
  # Create a new Datadog service level objective
  foo:
    type: datadog:ServiceLevelObjective
    properties:
      name: Example Metric SLO
      type: metric
      description: My custom metric SLO
      query:
        numerator: sum:my.custom.count.metric{type:good_events}.as_count()
        denominator: sum:my.custom.count.metric{*}.as_count()
      thresholds:
        - timeframe: 7d
          target: 99.9
          warning: 99.99
        - timeframe: 30d
          target: 99.9
          warning: 99.99
      timeframe: 30d
      targetThreshold: 99.9
      warningThreshold: 99.99
      tags:
        - foo:bar
        - baz
  # Monitor-Based SLO
  # Create a new Datadog service level objective
  bar:
    type: datadog:ServiceLevelObjective
    properties:
      name: Example Monitor SLO
      type: monitor
      description: My custom monitor SLO
      monitorIds:
        - 1
        - 2
        - 3
      thresholds:
        - timeframe: 7d
          target: 99.9
          warning: 99.99
        - timeframe: 30d
          target: 99.9
          warning: 99.99
      timeframe: 30d
      targetThreshold: 99.9
      warningThreshold: 99.99
      tags:
        - foo:bar
        - baz
  timeSliceSlo:
    type: datadog:ServiceLevelObjective
    name: time_slice_slo
    properties:
      name: Example Time Slice SLO
      type: time_slice
      description: My custom time slice SLO
      sliSpecification:
        timeSlice:
          query:
            formula:
              formulaExpression: query1
            queries:
              - metricQuery:
                  name: query1
                  query: avg:my.custom.count.metric{*}.as_count()
          comparator: '>'
          threshold: 0.9
      thresholds:
        - timeframe: 7d
          target: 99.9
          warning: 99.99
      timeframe: 7d
      targetThreshold: 99.9
      warningThreshold: 99.99
      tags:
        - service:myservice
        - team:myteam
Copy

Create ServiceLevelObjective Resource

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

Constructor syntax

new ServiceLevelObjective(name: string, args: ServiceLevelObjectiveArgs, opts?: CustomResourceOptions);
@overload
def ServiceLevelObjective(resource_name: str,
                          args: ServiceLevelObjectiveArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def ServiceLevelObjective(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          name: Optional[str] = None,
                          type: Optional[str] = None,
                          thresholds: Optional[Sequence[ServiceLevelObjectiveThresholdArgs]] = None,
                          monitor_ids: Optional[Sequence[int]] = None,
                          description: Optional[str] = None,
                          query: Optional[ServiceLevelObjectiveQueryArgs] = None,
                          sli_specification: Optional[ServiceLevelObjectiveSliSpecificationArgs] = None,
                          tags: Optional[Sequence[str]] = None,
                          target_threshold: Optional[float] = None,
                          groups: Optional[Sequence[str]] = None,
                          timeframe: Optional[str] = None,
                          force_delete: Optional[bool] = None,
                          validate: Optional[bool] = None,
                          warning_threshold: Optional[float] = None)
func NewServiceLevelObjective(ctx *Context, name string, args ServiceLevelObjectiveArgs, opts ...ResourceOption) (*ServiceLevelObjective, error)
public ServiceLevelObjective(string name, ServiceLevelObjectiveArgs args, CustomResourceOptions? opts = null)
public ServiceLevelObjective(String name, ServiceLevelObjectiveArgs args)
public ServiceLevelObjective(String name, ServiceLevelObjectiveArgs args, CustomResourceOptions options)
type: datadog:ServiceLevelObjective
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServiceLevelObjectiveArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServiceLevelObjectiveArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceLevelObjectiveArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceLevelObjectiveArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServiceLevelObjectiveArgs
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 serviceLevelObjectiveResource = new Datadog.ServiceLevelObjective("serviceLevelObjectiveResource", new()
{
    Name = "string",
    Type = "string",
    Thresholds = new[]
    {
        new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
        {
            Target = 0,
            Timeframe = "string",
            TargetDisplay = "string",
            Warning = 0,
            WarningDisplay = "string",
        },
    },
    MonitorIds = new[]
    {
        0,
    },
    Description = "string",
    Query = new Datadog.Inputs.ServiceLevelObjectiveQueryArgs
    {
        Denominator = "string",
        Numerator = "string",
    },
    SliSpecification = new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationArgs
    {
        TimeSlice = new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationTimeSliceArgs
        {
            Comparator = "string",
            Query = new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationTimeSliceQueryArgs
            {
                Formula = new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormulaArgs
                {
                    FormulaExpression = "string",
                },
                Queries = new[]
                {
                    new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryArgs
                    {
                        MetricQuery = new Datadog.Inputs.ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryMetricQueryArgs
                        {
                            Name = "string",
                            Query = "string",
                            DataSource = "string",
                        },
                    },
                },
            },
            Threshold = 0,
            QueryIntervalSeconds = 0,
        },
    },
    Tags = new[]
    {
        "string",
    },
    TargetThreshold = 0,
    Groups = new[]
    {
        "string",
    },
    Timeframe = "string",
    ForceDelete = false,
    Validate = false,
    WarningThreshold = 0,
});
Copy
example, err := datadog.NewServiceLevelObjective(ctx, "serviceLevelObjectiveResource", &datadog.ServiceLevelObjectiveArgs{
	Name: pulumi.String("string"),
	Type: pulumi.String("string"),
	Thresholds: datadog.ServiceLevelObjectiveThresholdArray{
		&datadog.ServiceLevelObjectiveThresholdArgs{
			Target:         pulumi.Float64(0),
			Timeframe:      pulumi.String("string"),
			TargetDisplay:  pulumi.String("string"),
			Warning:        pulumi.Float64(0),
			WarningDisplay: pulumi.String("string"),
		},
	},
	MonitorIds: pulumi.IntArray{
		pulumi.Int(0),
	},
	Description: pulumi.String("string"),
	Query: &datadog.ServiceLevelObjectiveQueryArgs{
		Denominator: pulumi.String("string"),
		Numerator:   pulumi.String("string"),
	},
	SliSpecification: &datadog.ServiceLevelObjectiveSliSpecificationArgs{
		TimeSlice: &datadog.ServiceLevelObjectiveSliSpecificationTimeSliceArgs{
			Comparator: pulumi.String("string"),
			Query: &datadog.ServiceLevelObjectiveSliSpecificationTimeSliceQueryArgs{
				Formula: &datadog.ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormulaArgs{
					FormulaExpression: pulumi.String("string"),
				},
				Queries: datadog.ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryArray{
					&datadog.ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryArgs{
						MetricQuery: &datadog.ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryMetricQueryArgs{
							Name:       pulumi.String("string"),
							Query:      pulumi.String("string"),
							DataSource: pulumi.String("string"),
						},
					},
				},
			},
			Threshold:            pulumi.Float64(0),
			QueryIntervalSeconds: pulumi.Int(0),
		},
	},
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
	TargetThreshold: pulumi.Float64(0),
	Groups: pulumi.StringArray{
		pulumi.String("string"),
	},
	Timeframe:        pulumi.String("string"),
	ForceDelete:      pulumi.Bool(false),
	Validate:         pulumi.Bool(false),
	WarningThreshold: pulumi.Float64(0),
})
Copy
var serviceLevelObjectiveResource = new ServiceLevelObjective("serviceLevelObjectiveResource", ServiceLevelObjectiveArgs.builder()
    .name("string")
    .type("string")
    .thresholds(ServiceLevelObjectiveThresholdArgs.builder()
        .target(0)
        .timeframe("string")
        .targetDisplay("string")
        .warning(0)
        .warningDisplay("string")
        .build())
    .monitorIds(0)
    .description("string")
    .query(ServiceLevelObjectiveQueryArgs.builder()
        .denominator("string")
        .numerator("string")
        .build())
    .sliSpecification(ServiceLevelObjectiveSliSpecificationArgs.builder()
        .timeSlice(ServiceLevelObjectiveSliSpecificationTimeSliceArgs.builder()
            .comparator("string")
            .query(ServiceLevelObjectiveSliSpecificationTimeSliceQueryArgs.builder()
                .formula(ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormulaArgs.builder()
                    .formulaExpression("string")
                    .build())
                .queries(ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryArgs.builder()
                    .metricQuery(ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryMetricQueryArgs.builder()
                        .name("string")
                        .query("string")
                        .dataSource("string")
                        .build())
                    .build())
                .build())
            .threshold(0)
            .queryIntervalSeconds(0)
            .build())
        .build())
    .tags("string")
    .targetThreshold(0)
    .groups("string")
    .timeframe("string")
    .forceDelete(false)
    .validate(false)
    .warningThreshold(0)
    .build());
Copy
service_level_objective_resource = datadog.ServiceLevelObjective("serviceLevelObjectiveResource",
    name="string",
    type="string",
    thresholds=[{
        "target": 0,
        "timeframe": "string",
        "target_display": "string",
        "warning": 0,
        "warning_display": "string",
    }],
    monitor_ids=[0],
    description="string",
    query={
        "denominator": "string",
        "numerator": "string",
    },
    sli_specification={
        "time_slice": {
            "comparator": "string",
            "query": {
                "formula": {
                    "formula_expression": "string",
                },
                "queries": [{
                    "metric_query": {
                        "name": "string",
                        "query": "string",
                        "data_source": "string",
                    },
                }],
            },
            "threshold": 0,
            "query_interval_seconds": 0,
        },
    },
    tags=["string"],
    target_threshold=0,
    groups=["string"],
    timeframe="string",
    force_delete=False,
    validate=False,
    warning_threshold=0)
Copy
const serviceLevelObjectiveResource = new datadog.ServiceLevelObjective("serviceLevelObjectiveResource", {
    name: "string",
    type: "string",
    thresholds: [{
        target: 0,
        timeframe: "string",
        targetDisplay: "string",
        warning: 0,
        warningDisplay: "string",
    }],
    monitorIds: [0],
    description: "string",
    query: {
        denominator: "string",
        numerator: "string",
    },
    sliSpecification: {
        timeSlice: {
            comparator: "string",
            query: {
                formula: {
                    formulaExpression: "string",
                },
                queries: [{
                    metricQuery: {
                        name: "string",
                        query: "string",
                        dataSource: "string",
                    },
                }],
            },
            threshold: 0,
            queryIntervalSeconds: 0,
        },
    },
    tags: ["string"],
    targetThreshold: 0,
    groups: ["string"],
    timeframe: "string",
    forceDelete: false,
    validate: false,
    warningThreshold: 0,
});
Copy
type: datadog:ServiceLevelObjective
properties:
    description: string
    forceDelete: false
    groups:
        - string
    monitorIds:
        - 0
    name: string
    query:
        denominator: string
        numerator: string
    sliSpecification:
        timeSlice:
            comparator: string
            query:
                formula:
                    formulaExpression: string
                queries:
                    - metricQuery:
                        dataSource: string
                        name: string
                        query: string
            queryIntervalSeconds: 0
            threshold: 0
    tags:
        - string
    targetThreshold: 0
    thresholds:
        - target: 0
          targetDisplay: string
          timeframe: string
          warning: 0
          warningDisplay: string
    timeframe: string
    type: string
    validate: false
    warningThreshold: 0
Copy

ServiceLevelObjective 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 ServiceLevelObjective resource accepts the following input properties:

Name This property is required. string
Name of Datadog service level objective
Thresholds This property is required. List<ServiceLevelObjectiveThreshold>
A list of thresholds and targets that define the service level objectives from the provided SLIs.
Type
This property is required.
Changes to this property will trigger replacement.
string
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
Description string
A description of this service level objective.
ForceDelete bool
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
Groups List<string>
A static set of groups to filter monitor-based SLOs
MonitorIds List<int>
A static set of monitor IDs to use as part of the SLO
Query ServiceLevelObjectiveQuery
The metric query of good / total events
SliSpecification ServiceLevelObjectiveSliSpecification
A map of SLI specifications to use as part of the SLO.
Tags List<string>
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
TargetThreshold double
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
Timeframe string
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
Validate bool
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
WarningThreshold double
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.
Name This property is required. string
Name of Datadog service level objective
Thresholds This property is required. []ServiceLevelObjectiveThresholdArgs
A list of thresholds and targets that define the service level objectives from the provided SLIs.
Type
This property is required.
Changes to this property will trigger replacement.
string
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
Description string
A description of this service level objective.
ForceDelete bool
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
Groups []string
A static set of groups to filter monitor-based SLOs
MonitorIds []int
A static set of monitor IDs to use as part of the SLO
Query ServiceLevelObjectiveQueryArgs
The metric query of good / total events
SliSpecification ServiceLevelObjectiveSliSpecificationArgs
A map of SLI specifications to use as part of the SLO.
Tags []string
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
TargetThreshold float64
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
Timeframe string
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
Validate bool
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
WarningThreshold float64
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.
name This property is required. String
Name of Datadog service level objective
thresholds This property is required. List<ServiceLevelObjectiveThreshold>
A list of thresholds and targets that define the service level objectives from the provided SLIs.
type
This property is required.
Changes to this property will trigger replacement.
String
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
description String
A description of this service level objective.
forceDelete Boolean
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
groups List<String>
A static set of groups to filter monitor-based SLOs
monitorIds List<Integer>
A static set of monitor IDs to use as part of the SLO
query ServiceLevelObjectiveQuery
The metric query of good / total events
sliSpecification ServiceLevelObjectiveSliSpecification
A map of SLI specifications to use as part of the SLO.
tags List<String>
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
targetThreshold Double
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
timeframe String
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
validate Boolean
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
warningThreshold Double
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.
name This property is required. string
Name of Datadog service level objective
thresholds This property is required. ServiceLevelObjectiveThreshold[]
A list of thresholds and targets that define the service level objectives from the provided SLIs.
type
This property is required.
Changes to this property will trigger replacement.
string
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
description string
A description of this service level objective.
forceDelete boolean
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
groups string[]
A static set of groups to filter monitor-based SLOs
monitorIds number[]
A static set of monitor IDs to use as part of the SLO
query ServiceLevelObjectiveQuery
The metric query of good / total events
sliSpecification ServiceLevelObjectiveSliSpecification
A map of SLI specifications to use as part of the SLO.
tags string[]
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
targetThreshold number
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
timeframe string
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
validate boolean
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
warningThreshold number
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.
name This property is required. str
Name of Datadog service level objective
thresholds This property is required. Sequence[ServiceLevelObjectiveThresholdArgs]
A list of thresholds and targets that define the service level objectives from the provided SLIs.
type
This property is required.
Changes to this property will trigger replacement.
str
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
description str
A description of this service level objective.
force_delete bool
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
groups Sequence[str]
A static set of groups to filter monitor-based SLOs
monitor_ids Sequence[int]
A static set of monitor IDs to use as part of the SLO
query ServiceLevelObjectiveQueryArgs
The metric query of good / total events
sli_specification ServiceLevelObjectiveSliSpecificationArgs
A map of SLI specifications to use as part of the SLO.
tags Sequence[str]
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
target_threshold float
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
timeframe str
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
validate bool
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
warning_threshold float
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.
name This property is required. String
Name of Datadog service level objective
thresholds This property is required. List<Property Map>
A list of thresholds and targets that define the service level objectives from the provided SLIs.
type
This property is required.
Changes to this property will trigger replacement.
String
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
description String
A description of this service level objective.
forceDelete Boolean
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
groups List<String>
A static set of groups to filter monitor-based SLOs
monitorIds List<Number>
A static set of monitor IDs to use as part of the SLO
query Property Map
The metric query of good / total events
sliSpecification Property Map
A map of SLI specifications to use as part of the SLO.
tags List<String>
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
targetThreshold Number
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
timeframe String
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
validate Boolean
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
warningThreshold Number
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.

Outputs

All input properties are implicitly available as output properties. Additionally, the ServiceLevelObjective 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 ServiceLevelObjective Resource

Get an existing ServiceLevelObjective 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?: ServiceLevelObjectiveState, opts?: CustomResourceOptions): ServiceLevelObjective
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        force_delete: Optional[bool] = None,
        groups: Optional[Sequence[str]] = None,
        monitor_ids: Optional[Sequence[int]] = None,
        name: Optional[str] = None,
        query: Optional[ServiceLevelObjectiveQueryArgs] = None,
        sli_specification: Optional[ServiceLevelObjectiveSliSpecificationArgs] = None,
        tags: Optional[Sequence[str]] = None,
        target_threshold: Optional[float] = None,
        thresholds: Optional[Sequence[ServiceLevelObjectiveThresholdArgs]] = None,
        timeframe: Optional[str] = None,
        type: Optional[str] = None,
        validate: Optional[bool] = None,
        warning_threshold: Optional[float] = None) -> ServiceLevelObjective
func GetServiceLevelObjective(ctx *Context, name string, id IDInput, state *ServiceLevelObjectiveState, opts ...ResourceOption) (*ServiceLevelObjective, error)
public static ServiceLevelObjective Get(string name, Input<string> id, ServiceLevelObjectiveState? state, CustomResourceOptions? opts = null)
public static ServiceLevelObjective get(String name, Output<String> id, ServiceLevelObjectiveState state, CustomResourceOptions options)
resources:  _:    type: datadog:ServiceLevelObjective    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Description string
A description of this service level objective.
ForceDelete bool
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
Groups List<string>
A static set of groups to filter monitor-based SLOs
MonitorIds List<int>
A static set of monitor IDs to use as part of the SLO
Name string
Name of Datadog service level objective
Query ServiceLevelObjectiveQuery
The metric query of good / total events
SliSpecification ServiceLevelObjectiveSliSpecification
A map of SLI specifications to use as part of the SLO.
Tags List<string>
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
TargetThreshold double
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
Thresholds List<ServiceLevelObjectiveThreshold>
A list of thresholds and targets that define the service level objectives from the provided SLIs.
Timeframe string
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
Type Changes to this property will trigger replacement. string
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
Validate bool
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
WarningThreshold double
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.
Description string
A description of this service level objective.
ForceDelete bool
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
Groups []string
A static set of groups to filter monitor-based SLOs
MonitorIds []int
A static set of monitor IDs to use as part of the SLO
Name string
Name of Datadog service level objective
Query ServiceLevelObjectiveQueryArgs
The metric query of good / total events
SliSpecification ServiceLevelObjectiveSliSpecificationArgs
A map of SLI specifications to use as part of the SLO.
Tags []string
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
TargetThreshold float64
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
Thresholds []ServiceLevelObjectiveThresholdArgs
A list of thresholds and targets that define the service level objectives from the provided SLIs.
Timeframe string
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
Type Changes to this property will trigger replacement. string
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
Validate bool
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
WarningThreshold float64
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.
description String
A description of this service level objective.
forceDelete Boolean
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
groups List<String>
A static set of groups to filter monitor-based SLOs
monitorIds List<Integer>
A static set of monitor IDs to use as part of the SLO
name String
Name of Datadog service level objective
query ServiceLevelObjectiveQuery
The metric query of good / total events
sliSpecification ServiceLevelObjectiveSliSpecification
A map of SLI specifications to use as part of the SLO.
tags List<String>
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
targetThreshold Double
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
thresholds List<ServiceLevelObjectiveThreshold>
A list of thresholds and targets that define the service level objectives from the provided SLIs.
timeframe String
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
type Changes to this property will trigger replacement. String
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
validate Boolean
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
warningThreshold Double
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.
description string
A description of this service level objective.
forceDelete boolean
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
groups string[]
A static set of groups to filter monitor-based SLOs
monitorIds number[]
A static set of monitor IDs to use as part of the SLO
name string
Name of Datadog service level objective
query ServiceLevelObjectiveQuery
The metric query of good / total events
sliSpecification ServiceLevelObjectiveSliSpecification
A map of SLI specifications to use as part of the SLO.
tags string[]
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
targetThreshold number
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
thresholds ServiceLevelObjectiveThreshold[]
A list of thresholds and targets that define the service level objectives from the provided SLIs.
timeframe string
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
type Changes to this property will trigger replacement. string
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
validate boolean
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
warningThreshold number
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.
description str
A description of this service level objective.
force_delete bool
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
groups Sequence[str]
A static set of groups to filter monitor-based SLOs
monitor_ids Sequence[int]
A static set of monitor IDs to use as part of the SLO
name str
Name of Datadog service level objective
query ServiceLevelObjectiveQueryArgs
The metric query of good / total events
sli_specification ServiceLevelObjectiveSliSpecificationArgs
A map of SLI specifications to use as part of the SLO.
tags Sequence[str]
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
target_threshold float
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
thresholds Sequence[ServiceLevelObjectiveThresholdArgs]
A list of thresholds and targets that define the service level objectives from the provided SLIs.
timeframe str
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
type Changes to this property will trigger replacement. str
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
validate bool
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
warning_threshold float
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.
description String
A description of this service level objective.
forceDelete Boolean
A boolean indicating whether this monitor can be deleted even if it's referenced by other resources (for example, dashboards).
groups List<String>
A static set of groups to filter monitor-based SLOs
monitorIds List<Number>
A static set of monitor IDs to use as part of the SLO
name String
Name of Datadog service level objective
query Property Map
The metric query of good / total events
sliSpecification Property Map
A map of SLI specifications to use as part of the SLO.
tags List<String>
A list of tags to associate with your service level objective. This can help you categorize and filter service level objectives in the service level objectives page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
targetThreshold Number
The objective's target in (0,100). This must match the corresponding thresholds of the primary time frame.
thresholds List<Property Map>
A list of thresholds and targets that define the service level objectives from the provided SLIs.
timeframe String
The primary time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
type Changes to this property will trigger replacement. String
The type of the service level objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are metric, monitor, time_slice.
validate Boolean
Whether or not to validate the SLO. It checks if monitors added to a monitor SLO already exist.
warningThreshold Number
The objective's warning value in (0,100). This must be greater than the target value and match the corresponding thresholds of the primary time frame.

Supporting Types

ServiceLevelObjectiveQuery
, ServiceLevelObjectiveQueryArgs

Denominator This property is required. string
The sum of the total events.
Numerator This property is required. string
The sum of all the good events.
Denominator This property is required. string
The sum of the total events.
Numerator This property is required. string
The sum of all the good events.
denominator This property is required. String
The sum of the total events.
numerator This property is required. String
The sum of all the good events.
denominator This property is required. string
The sum of the total events.
numerator This property is required. string
The sum of all the good events.
denominator This property is required. str
The sum of the total events.
numerator This property is required. str
The sum of all the good events.
denominator This property is required. String
The sum of the total events.
numerator This property is required. String
The sum of all the good events.

ServiceLevelObjectiveSliSpecification
, ServiceLevelObjectiveSliSpecificationArgs

TimeSlice This property is required. ServiceLevelObjectiveSliSpecificationTimeSlice
The time slice condition, composed of 3 parts: 1. The timeseries query, 2. The comparator, and 3. The threshold. Optionally, a fourth part, the query interval, can be provided.
TimeSlice This property is required. ServiceLevelObjectiveSliSpecificationTimeSlice
The time slice condition, composed of 3 parts: 1. The timeseries query, 2. The comparator, and 3. The threshold. Optionally, a fourth part, the query interval, can be provided.
timeSlice This property is required. ServiceLevelObjectiveSliSpecificationTimeSlice
The time slice condition, composed of 3 parts: 1. The timeseries query, 2. The comparator, and 3. The threshold. Optionally, a fourth part, the query interval, can be provided.
timeSlice This property is required. ServiceLevelObjectiveSliSpecificationTimeSlice
The time slice condition, composed of 3 parts: 1. The timeseries query, 2. The comparator, and 3. The threshold. Optionally, a fourth part, the query interval, can be provided.
time_slice This property is required. ServiceLevelObjectiveSliSpecificationTimeSlice
The time slice condition, composed of 3 parts: 1. The timeseries query, 2. The comparator, and 3. The threshold. Optionally, a fourth part, the query interval, can be provided.
timeSlice This property is required. Property Map
The time slice condition, composed of 3 parts: 1. The timeseries query, 2. The comparator, and 3. The threshold. Optionally, a fourth part, the query interval, can be provided.

ServiceLevelObjectiveSliSpecificationTimeSlice
, ServiceLevelObjectiveSliSpecificationTimeSliceArgs

Comparator This property is required. string
The comparator used to compare the SLI value to the threshold. Valid values are >, >=, <, <=.
Query This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQuery
A timeseries query, containing named data-source-specific queries and a formula involving the named queries.
Threshold This property is required. double
The threshold value to which each SLI value will be compared.
QueryIntervalSeconds int
The interval used when querying data, which defines the size of a time slice. Valid values are 60, 300. Defaults to 300.
Comparator This property is required. string
The comparator used to compare the SLI value to the threshold. Valid values are >, >=, <, <=.
Query This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQuery
A timeseries query, containing named data-source-specific queries and a formula involving the named queries.
Threshold This property is required. float64
The threshold value to which each SLI value will be compared.
QueryIntervalSeconds int
The interval used when querying data, which defines the size of a time slice. Valid values are 60, 300. Defaults to 300.
comparator This property is required. String
The comparator used to compare the SLI value to the threshold. Valid values are >, >=, <, <=.
query This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQuery
A timeseries query, containing named data-source-specific queries and a formula involving the named queries.
threshold This property is required. Double
The threshold value to which each SLI value will be compared.
queryIntervalSeconds Integer
The interval used when querying data, which defines the size of a time slice. Valid values are 60, 300. Defaults to 300.
comparator This property is required. string
The comparator used to compare the SLI value to the threshold. Valid values are >, >=, <, <=.
query This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQuery
A timeseries query, containing named data-source-specific queries and a formula involving the named queries.
threshold This property is required. number
The threshold value to which each SLI value will be compared.
queryIntervalSeconds number
The interval used when querying data, which defines the size of a time slice. Valid values are 60, 300. Defaults to 300.
comparator This property is required. str
The comparator used to compare the SLI value to the threshold. Valid values are >, >=, <, <=.
query This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQuery
A timeseries query, containing named data-source-specific queries and a formula involving the named queries.
threshold This property is required. float
The threshold value to which each SLI value will be compared.
query_interval_seconds int
The interval used when querying data, which defines the size of a time slice. Valid values are 60, 300. Defaults to 300.
comparator This property is required. String
The comparator used to compare the SLI value to the threshold. Valid values are >, >=, <, <=.
query This property is required. Property Map
A timeseries query, containing named data-source-specific queries and a formula involving the named queries.
threshold This property is required. Number
The threshold value to which each SLI value will be compared.
queryIntervalSeconds Number
The interval used when querying data, which defines the size of a time slice. Valid values are 60, 300. Defaults to 300.

ServiceLevelObjectiveSliSpecificationTimeSliceQuery
, ServiceLevelObjectiveSliSpecificationTimeSliceQueryArgs

Formula This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormula
A list that contains exactly one formula, as only a single formula may be used to define a timeseries query for a time-slice SLO.
Queries This property is required. List<ServiceLevelObjectiveSliSpecificationTimeSliceQueryQuery>
A list of data-source-specific queries that are in the formula.
Formula This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormula
A list that contains exactly one formula, as only a single formula may be used to define a timeseries query for a time-slice SLO.
Queries This property is required. []ServiceLevelObjectiveSliSpecificationTimeSliceQueryQuery
A list of data-source-specific queries that are in the formula.
formula This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormula
A list that contains exactly one formula, as only a single formula may be used to define a timeseries query for a time-slice SLO.
queries This property is required. List<ServiceLevelObjectiveSliSpecificationTimeSliceQueryQuery>
A list of data-source-specific queries that are in the formula.
formula This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormula
A list that contains exactly one formula, as only a single formula may be used to define a timeseries query for a time-slice SLO.
queries This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQueryQuery[]
A list of data-source-specific queries that are in the formula.
formula This property is required. ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormula
A list that contains exactly one formula, as only a single formula may be used to define a timeseries query for a time-slice SLO.
queries This property is required. Sequence[ServiceLevelObjectiveSliSpecificationTimeSliceQueryQuery]
A list of data-source-specific queries that are in the formula.
formula This property is required. Property Map
A list that contains exactly one formula, as only a single formula may be used to define a timeseries query for a time-slice SLO.
queries This property is required. List<Property Map>
A list of data-source-specific queries that are in the formula.

ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormula
, ServiceLevelObjectiveSliSpecificationTimeSliceQueryFormulaArgs

FormulaExpression This property is required. string
The formula string, which is an expression involving named queries.
FormulaExpression This property is required. string
The formula string, which is an expression involving named queries.
formulaExpression This property is required. String
The formula string, which is an expression involving named queries.
formulaExpression This property is required. string
The formula string, which is an expression involving named queries.
formula_expression This property is required. str
The formula string, which is an expression involving named queries.
formulaExpression This property is required. String
The formula string, which is an expression involving named queries.

ServiceLevelObjectiveSliSpecificationTimeSliceQueryQuery
, ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryArgs

metricQuery Property Map
A timeseries formula and functions metrics query.

ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryMetricQuery
, ServiceLevelObjectiveSliSpecificationTimeSliceQueryQueryMetricQueryArgs

Name This property is required. string
The name of the query for use in formulas.
Query This property is required. string
The metrics query definition.
DataSource string
The data source for metrics queries. Defaults to "metrics".
Name This property is required. string
The name of the query for use in formulas.
Query This property is required. string
The metrics query definition.
DataSource string
The data source for metrics queries. Defaults to "metrics".
name This property is required. String
The name of the query for use in formulas.
query This property is required. String
The metrics query definition.
dataSource String
The data source for metrics queries. Defaults to "metrics".
name This property is required. string
The name of the query for use in formulas.
query This property is required. string
The metrics query definition.
dataSource string
The data source for metrics queries. Defaults to "metrics".
name This property is required. str
The name of the query for use in formulas.
query This property is required. str
The metrics query definition.
data_source str
The data source for metrics queries. Defaults to "metrics".
name This property is required. String
The name of the query for use in formulas.
query This property is required. String
The metrics query definition.
dataSource String
The data source for metrics queries. Defaults to "metrics".

ServiceLevelObjectiveThreshold
, ServiceLevelObjectiveThresholdArgs

Target This property is required. double
The objective's target in (0,100).
Timeframe This property is required. string
The time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
TargetDisplay string
A string representation of the target that indicates its precision. It uses trailing zeros to show significant decimal places (e.g. 98.00).
Warning double
The objective's warning value in (0,100). This must be greater than the target value.
WarningDisplay string
A string representation of the warning target (see the description of the target_display field for details).
Target This property is required. float64
The objective's target in (0,100).
Timeframe This property is required. string
The time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
TargetDisplay string
A string representation of the target that indicates its precision. It uses trailing zeros to show significant decimal places (e.g. 98.00).
Warning float64
The objective's warning value in (0,100). This must be greater than the target value.
WarningDisplay string
A string representation of the warning target (see the description of the target_display field for details).
target This property is required. Double
The objective's target in (0,100).
timeframe This property is required. String
The time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
targetDisplay String
A string representation of the target that indicates its precision. It uses trailing zeros to show significant decimal places (e.g. 98.00).
warning Double
The objective's warning value in (0,100). This must be greater than the target value.
warningDisplay String
A string representation of the warning target (see the description of the target_display field for details).
target This property is required. number
The objective's target in (0,100).
timeframe This property is required. string
The time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
targetDisplay string
A string representation of the target that indicates its precision. It uses trailing zeros to show significant decimal places (e.g. 98.00).
warning number
The objective's warning value in (0,100). This must be greater than the target value.
warningDisplay string
A string representation of the warning target (see the description of the target_display field for details).
target This property is required. float
The objective's target in (0,100).
timeframe This property is required. str
The time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
target_display str
A string representation of the target that indicates its precision. It uses trailing zeros to show significant decimal places (e.g. 98.00).
warning float
The objective's warning value in (0,100). This must be greater than the target value.
warning_display str
A string representation of the warning target (see the description of the target_display field for details).
target This property is required. Number
The objective's target in (0,100).
timeframe This property is required. String
The time frame for the objective. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Valid values are 7d, 30d, 90d, custom.
targetDisplay String
A string representation of the target that indicates its precision. It uses trailing zeros to show significant decimal places (e.g. 98.00).
warning Number
The objective's warning value in (0,100). This must be greater than the target value.
warningDisplay String
A string representation of the warning target (see the description of the target_display field for details).

Import

Service Level Objectives can be imported using their string ID, e.g.

$ pulumi import datadog:index/serviceLevelObjective:ServiceLevelObjective baz 12345678901234567890123456789012
Copy

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

Package Details

Repository
Datadog pulumi/pulumi-datadog
License
Apache-2.0
Notes
This Pulumi package is based on the datadog Terraform Provider.