Datadog v4.33.2 published on Tuesday, Sep 24, 2024 by Pulumi
datadog.getServiceLevelObjective
Explore with Pulumi AI
Use this data source to retrieve information about an existing SLO for use in other resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const test = datadog.getServiceLevelObjective({
nameQuery: "My test SLO",
tagsQuery: "foo:bar",
});
const apiSlo = datadog.getServiceLevelObjective({
id: api.outputs.slo,
});
import pulumi
import pulumi_datadog as datadog
test = datadog.get_service_level_objective(name_query="My test SLO",
tags_query="foo:bar")
api_slo = datadog.get_service_level_objective(id=api["outputs"]["slo"])
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.LookupServiceLevelObjective(ctx, &datadog.LookupServiceLevelObjectiveArgs{
NameQuery: pulumi.StringRef("My test SLO"),
TagsQuery: pulumi.StringRef("foo:bar"),
}, nil)
if err != nil {
return err
}
_, err = datadog.LookupServiceLevelObjective(ctx, &datadog.LookupServiceLevelObjectiveArgs{
Id: pulumi.StringRef(api.Outputs.Slo),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
var test = Datadog.GetServiceLevelObjective.Invoke(new()
{
NameQuery = "My test SLO",
TagsQuery = "foo:bar",
});
var apiSlo = Datadog.GetServiceLevelObjective.Invoke(new()
{
Id = api.Outputs.Slo,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.DatadogFunctions;
import com.pulumi.datadog.inputs.GetServiceLevelObjectiveArgs;
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) {
final var test = DatadogFunctions.getServiceLevelObjective(GetServiceLevelObjectiveArgs.builder()
.nameQuery("My test SLO")
.tagsQuery("foo:bar")
.build());
final var apiSlo = DatadogFunctions.getServiceLevelObjective(GetServiceLevelObjectiveArgs.builder()
.id(api.outputs().slo())
.build());
}
}
variables:
test:
fn::invoke:
Function: datadog:getServiceLevelObjective
Arguments:
nameQuery: My test SLO
tagsQuery: foo:bar
apiSlo:
fn::invoke:
Function: datadog:getServiceLevelObjective
Arguments:
id: ${api.outputs.slo}
Using getServiceLevelObjective
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getServiceLevelObjective(args: GetServiceLevelObjectiveArgs, opts?: InvokeOptions): Promise<GetServiceLevelObjectiveResult>
function getServiceLevelObjectiveOutput(args: GetServiceLevelObjectiveOutputArgs, opts?: InvokeOptions): Output<GetServiceLevelObjectiveResult>
def get_service_level_objective(id: Optional[str] = None,
metrics_query: Optional[str] = None,
name_query: Optional[str] = None,
tags_query: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceLevelObjectiveResult
def get_service_level_objective_output(id: Optional[pulumi.Input[str]] = None,
metrics_query: Optional[pulumi.Input[str]] = None,
name_query: Optional[pulumi.Input[str]] = None,
tags_query: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServiceLevelObjectiveResult]
func LookupServiceLevelObjective(ctx *Context, args *LookupServiceLevelObjectiveArgs, opts ...InvokeOption) (*LookupServiceLevelObjectiveResult, error)
func LookupServiceLevelObjectiveOutput(ctx *Context, args *LookupServiceLevelObjectiveOutputArgs, opts ...InvokeOption) LookupServiceLevelObjectiveResultOutput
> Note: This function is named LookupServiceLevelObjective
in the Go SDK.
public static class GetServiceLevelObjective
{
public static Task<GetServiceLevelObjectiveResult> InvokeAsync(GetServiceLevelObjectiveArgs args, InvokeOptions? opts = null)
public static Output<GetServiceLevelObjectiveResult> Invoke(GetServiceLevelObjectiveInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetServiceLevelObjectiveResult> getServiceLevelObjective(GetServiceLevelObjectiveArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: datadog:index/getServiceLevelObjective:getServiceLevelObjective
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- A SLO ID to limit the search.
- Metrics
Query string - Filter results based on SLO numerator and denominator.
- Name
Query string - Filter results based on SLO names.
- string
- Filter results based on a single SLO tag.
- Id string
- A SLO ID to limit the search.
- Metrics
Query string - Filter results based on SLO numerator and denominator.
- Name
Query string - Filter results based on SLO names.
- string
- Filter results based on a single SLO tag.
- id String
- A SLO ID to limit the search.
- metrics
Query String - Filter results based on SLO numerator and denominator.
- name
Query String - Filter results based on SLO names.
- String
- Filter results based on a single SLO tag.
- id string
- A SLO ID to limit the search.
- metrics
Query string - Filter results based on SLO numerator and denominator.
- name
Query string - Filter results based on SLO names.
- string
- Filter results based on a single SLO tag.
- id str
- A SLO ID to limit the search.
- metrics_
query str - Filter results based on SLO numerator and denominator.
- name_
query str - Filter results based on SLO names.
- str
- Filter results based on a single SLO tag.
- id String
- A SLO ID to limit the search.
- metrics
Query String - Filter results based on SLO numerator and denominator.
- name
Query String - Filter results based on SLO names.
- String
- Filter results based on a single SLO tag.
getServiceLevelObjective Result
The following output properties are available:
- Description string
- The description of the service level objective.
- Name string
- Name of the Datadog service level objective
- Queries
List<Get
Service Level Objective Query> - The metric query of good / total events
- Target
Threshold double - The primary target threshold of the service level objective.
- Timeframe string
- The primary timeframe of the service level objective.
- 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. Available values are:
metric
andmonitor
. - Warning
Threshold double - The primary warning threshold of the service level objective.
- Id string
- A SLO ID to limit the search.
- Metrics
Query string - Filter results based on SLO numerator and denominator.
- Name
Query string - Filter results based on SLO names.
- string
- Filter results based on a single SLO tag.
- Description string
- The description of the service level objective.
- Name string
- Name of the Datadog service level objective
- Queries
[]Get
Service Level Objective Query - The metric query of good / total events
- Target
Threshold float64 - The primary target threshold of the service level objective.
- Timeframe string
- The primary timeframe of the service level objective.
- 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. Available values are:
metric
andmonitor
. - Warning
Threshold float64 - The primary warning threshold of the service level objective.
- Id string
- A SLO ID to limit the search.
- Metrics
Query string - Filter results based on SLO numerator and denominator.
- Name
Query string - Filter results based on SLO names.
- string
- Filter results based on a single SLO tag.
- description String
- The description of the service level objective.
- name String
- Name of the Datadog service level objective
- queries
List<Get
Service Level Objective Query> - The metric query of good / total events
- target
Threshold Double - The primary target threshold of the service level objective.
- timeframe String
- The primary timeframe of the service level objective.
- 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. Available values are:
metric
andmonitor
. - warning
Threshold Double - The primary warning threshold of the service level objective.
- id String
- A SLO ID to limit the search.
- metrics
Query String - Filter results based on SLO numerator and denominator.
- name
Query String - Filter results based on SLO names.
- String
- Filter results based on a single SLO tag.
- description string
- The description of the service level objective.
- name string
- Name of the Datadog service level objective
- queries
Get
Service Level Objective Query[] - The metric query of good / total events
- target
Threshold number - The primary target threshold of the service level objective.
- timeframe string
- The primary timeframe of the service level objective.
- 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. Available values are:
metric
andmonitor
. - warning
Threshold number - The primary warning threshold of the service level objective.
- id string
- A SLO ID to limit the search.
- metrics
Query string - Filter results based on SLO numerator and denominator.
- name
Query string - Filter results based on SLO names.
- string
- Filter results based on a single SLO tag.
- description str
- The description of the service level objective.
- name str
- Name of the Datadog service level objective
- queries
Sequence[Get
Service Level Objective Query] - The metric query of good / total events
- target_
threshold float - The primary target threshold of the service level objective.
- timeframe str
- The primary timeframe of the service level objective.
- 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. Available values are:
metric
andmonitor
. - warning_
threshold float - The primary warning threshold of the service level objective.
- id str
- A SLO ID to limit the search.
- metrics_
query str - Filter results based on SLO numerator and denominator.
- name_
query str - Filter results based on SLO names.
- str
- Filter results based on a single SLO tag.
- description String
- The description of the service level objective.
- name String
- Name of the Datadog service level objective
- queries List<Property Map>
- The metric query of good / total events
- target
Threshold Number - The primary target threshold of the service level objective.
- timeframe String
- The primary timeframe of the service level objective.
- 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. Available values are:
metric
andmonitor
. - warning
Threshold Number - The primary warning threshold of the service level objective.
- id String
- A SLO ID to limit the search.
- metrics
Query String - Filter results based on SLO numerator and denominator.
- name
Query String - Filter results based on SLO names.
- String
- Filter results based on a single SLO tag.
Supporting Types
GetServiceLevelObjectiveQuery
- 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.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.