Show / Hide Table of Contents

Class ServiceLevelObjective

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

Example Usage

Metric-Based SLO

using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
public MyStack()
{
    // Create a new Datadog service level objective
    var foo = new Datadog.ServiceLevelObjective("foo", new Datadog.ServiceLevelObjectiveArgs
    {
        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 = 
        {
            "foo:bar",
            "baz",
        },
        Thresholds = 
        {
            new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
            {
                Target = 99.9,
                TargetDisplay = "99.900",
                Timeframe = "7d",
                Warning = 99.99,
                WarningDisplay = "99.990",
            },
            new Datadog.Inputs.ServiceLevelObjectiveThresholdArgs
            {
                Target = 99.9,
                TargetDisplay = "99.900",
                Timeframe = "30d",
                Warning = 99.99,
                WarningDisplay = "99.990",
            },
        },
        Type = "metric",
    });
}

}

Monitor-Based SLO

using Pulumi;
using Datadog = Pulumi.Datadog;

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

}
Inheritance
System.Object
Resource
CustomResource
ServiceLevelObjective
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Datadog
Assembly: Pulumi.Datadog.dll
Syntax
public class ServiceLevelObjective : CustomResource

Constructors

View Source

ServiceLevelObjective(String, ServiceLevelObjectiveArgs, CustomResourceOptions)

Create a ServiceLevelObjective resource with the given unique name, arguments, and options.

Declaration
public ServiceLevelObjective(string name, ServiceLevelObjectiveArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ServiceLevelObjectiveArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Description

A description of this service level objective.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

Groups

A custom set of groups from the monitor(s) for which to use as the SLI instead of all the groups.

Declaration
public Output<ImmutableArray<string>> Groups { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

MonitorIds

A list of numeric monitor IDs for which to use as SLIs. Their tags will be auto-imported into monitor_tags field in the API resource.

Declaration
public Output<ImmutableArray<int>> MonitorIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.Int32>>
View Source

Name

Name of Datadog service level objective

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Query

The metric query configuration to use for the SLI. This is a dictionary and requires both the numerator and denominator fields which should be count metrics using the sum aggregator.

Declaration
public Output<ServiceLevelObjectiveQuery> Query { get; }
Property Value
Type Description
Output<ServiceLevelObjectiveQuery>
View Source

Tags

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

Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Thresholds

  • A list of thresholds and targets that define the service level objectives from the provided SLIs.
Declaration
public Output<ImmutableArray<ServiceLevelObjectiveThreshold>> Thresholds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<ServiceLevelObjectiveThreshold>>
View Source

Type

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. Available options to choose from are:

  • metric
  • monitor
Declaration
public Output<string> Type { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ServiceLevelObjectiveState, CustomResourceOptions)

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

Declaration
public static ServiceLevelObjective Get(string name, Input<string> id, ServiceLevelObjectiveState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ServiceLevelObjectiveState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
ServiceLevelObjective
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.