1. Packages
  2. Datadog
  3. API Docs
  4. ServiceLevelObjective
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

datadog.ServiceLevelObjective

Explore with Pulumi AI

datadog logo
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

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

    Example Usage

    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()
        {
            Description = "My custom metric SLO",
            Name = "Example Metric SLO",
            Query = new Datadog.Inputs.ServiceLevelObjectiveQueryArgs
            {
                Denominator = "sum:my.custom.count.metric{*}.as_count()",
                Numerator = "sum:my.custom.count.metric{type:good_events}.as_count()",
            },
            Tags = new[]
            {
                "foo:bar",
                "baz",
            },
            TargetThreshold = 99.9,
            Thresholds = new[]
            {
                new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
                {
                    Target = 99.9,
                    Timeframe = "7d",
                    Warning = 99.99,
                },
                new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
                {
                    Target = 99.9,
                    Timeframe = "30d",
                    Warning = 99.99,
                },
            },
            Timeframe = "30d",
            Type = "metric",
            WarningThreshold = 99.99,
        });
    
        // Monitor-Based SLO
        // Create a new Datadog service level objective
        var bar = new Datadog.ServiceLevelObjective("bar", new()
        {
            Description = "My custom monitor SLO",
            MonitorIds = new[]
            {
                1,
                2,
                3,
            },
            Name = "Example Monitor SLO",
            Tags = new[]
            {
                "foo:bar",
                "baz",
            },
            TargetThreshold = 99.9,
            Thresholds = new[]
            {
                new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
                {
                    Target = 99.9,
                    Timeframe = "7d",
                    Warning = 99.99,
                },
                new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
                {
                    Target = 99.9,
                    Timeframe = "30d",
                    Warning = 99.99,
                },
            },
            Timeframe = "30d",
            Type = "monitor",
            WarningThreshold = 99.99,
        });
    
    });
    
    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 {
    		_, err := datadog.NewServiceLevelObjective(ctx, "foo", &datadog.ServiceLevelObjectiveArgs{
    			Description: pulumi.String("My custom metric SLO"),
    			Name:        pulumi.String("Example Metric SLO"),
    			Query: &datadog.ServiceLevelObjectiveQueryArgs{
    				Denominator: pulumi.String("sum:my.custom.count.metric{*}.as_count()"),
    				Numerator:   pulumi.String("sum:my.custom.count.metric{type:good_events}.as_count()"),
    			},
    			Tags: pulumi.StringArray{
    				pulumi.String("foo:bar"),
    				pulumi.String("baz"),
    			},
    			TargetThreshold: pulumi.Float64(99.9),
    			Thresholds: datadog.ServiceLevelObjectiveThresholdArray{
    				&datadog.ServiceLevelObjectiveThresholdArgs{
    					Target:    pulumi.Float64(99.9),
    					Timeframe: pulumi.String("7d"),
    					Warning:   pulumi.Float64(99.99),
    				},
    				&datadog.ServiceLevelObjectiveThresholdArgs{
    					Target:    pulumi.Float64(99.9),
    					Timeframe: pulumi.String("30d"),
    					Warning:   pulumi.Float64(99.99),
    				},
    			},
    			Timeframe:        pulumi.String("30d"),
    			Type:             pulumi.String("metric"),
    			WarningThreshold: pulumi.Float64(99.99),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = datadog.NewServiceLevelObjective(ctx, "bar", &datadog.ServiceLevelObjectiveArgs{
    			Description: pulumi.String("My custom monitor SLO"),
    			MonitorIds: pulumi.IntArray{
    				pulumi.Int(1),
    				pulumi.Int(2),
    				pulumi.Int(3),
    			},
    			Name: pulumi.String("Example Monitor SLO"),
    			Tags: pulumi.StringArray{
    				pulumi.String("foo:bar"),
    				pulumi.String("baz"),
    			},
    			TargetThreshold: pulumi.Float64(99.9),
    			Thresholds: datadog.ServiceLevelObjectiveThresholdArray{
    				&datadog.ServiceLevelObjectiveThresholdArgs{
    					Target:    pulumi.Float64(99.9),
    					Timeframe: pulumi.String("7d"),
    					Warning:   pulumi.Float64(99.99),
    				},
    				&datadog.ServiceLevelObjectiveThresholdArgs{
    					Target:    pulumi.Float64(99.9),
    					Timeframe: pulumi.String("30d"),
    					Warning:   pulumi.Float64(99.99),
    				},
    			},
    			Timeframe:        pulumi.String("30d"),
    			Type:             pulumi.String("monitor"),
    			WarningThreshold: pulumi.Float64(99.99),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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 foo = new ServiceLevelObjective("foo", ServiceLevelObjectiveArgs.builder()        
                .description("My custom metric SLO")
                .name("Example Metric SLO")
                .query(ServiceLevelObjectiveQueryArgs.builder()
                    .denominator("sum:my.custom.count.metric{*}.as_count()")
                    .numerator("sum:my.custom.count.metric{type:good_events}.as_count()")
                    .build())
                .tags(            
                    "foo:bar",
                    "baz")
                .targetThreshold(99.9)
                .thresholds(            
                    ServiceLevelObjectiveThresholdArgs.builder()
                        .target(99.9)
                        .timeframe("7d")
                        .warning(99.99)
                        .build(),
                    ServiceLevelObjectiveThresholdArgs.builder()
                        .target(99.9)
                        .timeframe("30d")
                        .warning(99.99)
                        .build())
                .timeframe("30d")
                .type("metric")
                .warningThreshold(99.99)
                .build());
    
            var bar = new ServiceLevelObjective("bar", ServiceLevelObjectiveArgs.builder()        
                .description("My custom monitor SLO")
                .monitorIds(            
                    1,
                    2,
                    3)
                .name("Example Monitor SLO")
                .tags(            
                    "foo:bar",
                    "baz")
                .targetThreshold(99.9)
                .thresholds(            
                    ServiceLevelObjectiveThresholdArgs.builder()
                        .target(99.9)
                        .timeframe("7d")
                        .warning(99.99)
                        .build(),
                    ServiceLevelObjectiveThresholdArgs.builder()
                        .target(99.9)
                        .timeframe("30d")
                        .warning(99.99)
                        .build())
                .timeframe("30d")
                .type("monitor")
                .warningThreshold(99.99)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_datadog as datadog
    
    # Metric-Based SLO
    # Create a new Datadog service level objective
    foo = datadog.ServiceLevelObjective("foo",
        description="My custom metric SLO",
        name="Example Metric SLO",
        query=datadog.ServiceLevelObjectiveQueryArgs(
            denominator="sum:my.custom.count.metric{*}.as_count()",
            numerator="sum:my.custom.count.metric{type:good_events}.as_count()",
        ),
        tags=[
            "foo:bar",
            "baz",
        ],
        target_threshold=99.9,
        thresholds=[
            datadog.ServiceLevelObjectiveThresholdArgs(
                target=99.9,
                timeframe="7d",
                warning=99.99,
            ),
            datadog.ServiceLevelObjectiveThresholdArgs(
                target=99.9,
                timeframe="30d",
                warning=99.99,
            ),
        ],
        timeframe="30d",
        type="metric",
        warning_threshold=99.99)
    # Monitor-Based SLO
    # Create a new Datadog service level objective
    bar = datadog.ServiceLevelObjective("bar",
        description="My custom monitor SLO",
        monitor_ids=[
            1,
            2,
            3,
        ],
        name="Example Monitor SLO",
        tags=[
            "foo:bar",
            "baz",
        ],
        target_threshold=99.9,
        thresholds=[
            datadog.ServiceLevelObjectiveThresholdArgs(
                target=99.9,
                timeframe="7d",
                warning=99.99,
            ),
            datadog.ServiceLevelObjectiveThresholdArgs(
                target=99.9,
                timeframe="30d",
                warning=99.99,
            ),
        ],
        timeframe="30d",
        type="monitor",
        warning_threshold=99.99)
    
    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", {
        description: "My custom metric SLO",
        name: "Example Metric SLO",
        query: {
            denominator: "sum:my.custom.count.metric{*}.as_count()",
            numerator: "sum:my.custom.count.metric{type:good_events}.as_count()",
        },
        tags: [
            "foo:bar",
            "baz",
        ],
        targetThreshold: 99.9,
        thresholds: [
            {
                target: 99.9,
                timeframe: "7d",
                warning: 99.99,
            },
            {
                target: 99.9,
                timeframe: "30d",
                warning: 99.99,
            },
        ],
        timeframe: "30d",
        type: "metric",
        warningThreshold: 99.99,
    });
    // Monitor-Based SLO
    // Create a new Datadog service level objective
    const bar = new datadog.ServiceLevelObjective("bar", {
        description: "My custom monitor SLO",
        monitorIds: [
            1,
            2,
            3,
        ],
        name: "Example Monitor SLO",
        tags: [
            "foo:bar",
            "baz",
        ],
        targetThreshold: 99.9,
        thresholds: [
            {
                target: 99.9,
                timeframe: "7d",
                warning: 99.99,
            },
            {
                target: 99.9,
                timeframe: "30d",
                warning: 99.99,
            },
        ],
        timeframe: "30d",
        type: "monitor",
        warningThreshold: 99.99,
    });
    
    resources:
      # Metric-Based SLO
      # // Create a new Datadog service level objective
      foo:
        type: datadog:ServiceLevelObjective
        properties:
          description: My custom metric SLO
          name: Example Metric SLO
          query:
            denominator: sum:my.custom.count.metric{*}.as_count()
            numerator: sum:my.custom.count.metric{type:good_events}.as_count()
          tags:
            - foo:bar
            - baz
          targetThreshold: 99.9
          thresholds:
            - target: 99.9
              timeframe: 7d
              warning: 99.99
            - target: 99.9
              timeframe: 30d
              warning: 99.99
          timeframe: 30d
          type: metric
          warningThreshold: 99.99
      # Monitor-Based SLO
      # // Create a new Datadog service level objective
      bar:
        type: datadog:ServiceLevelObjective
        properties:
          description: My custom monitor SLO
          monitorIds:
            - 1
            - 2
            - 3
          name: Example Monitor SLO
          tags:
            - foo:bar
            - baz
          targetThreshold: 99.9
          thresholds:
            - target: 99.9
              timeframe: 7d
              warning: 99.99
            - target: 99.9
              timeframe: 30d
              warning: 99.99
          timeframe: 30d
          type: monitor
          warningThreshold: 99.99
    

    Create ServiceLevelObjective Resource

    new ServiceLevelObjective(name: string, args: ServiceLevelObjectiveArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceLevelObjective(resource_name: 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,
                              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)
    @overload
    def ServiceLevelObjective(resource_name: str,
                              args: ServiceLevelObjectiveArgs,
                              opts: Optional[ResourceOptions] = 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.
    
    
    name string
    The unique name of the resource.
    args ServiceLevelObjectiveArgs
    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 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 string
    The unique name of the resource.
    args ServiceLevelObjectiveArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceLevelObjectiveArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceLevelObjectiveArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    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

    The ServiceLevelObjective resource accepts the following input properties:

    Name string

    Name of Datadog service level objective

    Thresholds List<ServiceLevelObjectiveThreshold>

    A list of thresholds and targets that define the service level objectives from the provided SLIs.

    Type 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.

    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

    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.

    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 string

    Name of Datadog service level objective

    Thresholds []ServiceLevelObjectiveThresholdArgs

    A list of thresholds and targets that define the service level objectives from the provided SLIs.

    Type 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.

    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

    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.

    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 String

    Name of Datadog service level objective

    thresholds List<ServiceLevelObjectiveThreshold>

    A list of thresholds and targets that define the service level objectives from the provided SLIs.

    type 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.

    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

    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.

    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 string

    Name of Datadog service level objective

    thresholds ServiceLevelObjectiveThreshold[]

    A list of thresholds and targets that define the service level objectives from the provided SLIs.

    type 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.

    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

    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.

    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 str

    Name of Datadog service level objective

    thresholds Sequence[ServiceLevelObjectiveThresholdArgs]

    A list of thresholds and targets that define the service level objectives from the provided SLIs.

    type 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.

    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

    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.

    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 String

    Name of Datadog service level objective

    thresholds List<Property Map>

    A list of thresholds and targets that define the service level objectives from the provided SLIs.

    type 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.

    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

    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.

    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,
            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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    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

    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 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.

    Validate bool

    Whether or not to validate the SLO.

    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

    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 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.

    Validate bool

    Whether or not to validate the SLO.

    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

    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 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.

    validate Boolean

    Whether or not to validate the SLO.

    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

    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 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.

    validate boolean

    Whether or not to validate the SLO.

    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

    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 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.

    validate bool

    Whether or not to validate the SLO.

    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

    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 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.

    validate Boolean

    Whether or not to validate the SLO.

    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 string

    The sum of the total events.

    Numerator string

    The sum of all the good events.

    Denominator string

    The sum of the total events.

    Numerator string

    The sum of all the good events.

    denominator String

    The sum of the total events.

    numerator String

    The sum of all the good events.

    denominator string

    The sum of the total events.

    numerator string

    The sum of all the good events.

    denominator str

    The sum of the total events.

    numerator str

    The sum of all the good events.

    denominator String

    The sum of the total events.

    numerator String

    The sum of all the good events.

    ServiceLevelObjectiveThreshold, ServiceLevelObjectiveThresholdArgs

    Target double

    The objective's target in (0,100).

    Timeframe 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 float64

    The objective's target in (0,100).

    Timeframe 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 Double

    The objective's target in (0,100).

    timeframe 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 number

    The objective's target in (0,100).

    timeframe 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 float

    The objective's target in (0,100).

    timeframe 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 Number

    The objective's target in (0,100).

    timeframe 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
    

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the datadog Terraform Provider.

    datadog logo
    Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi