1. Packages
  2. Datadog
  3. API Docs
  4. getServiceLevelObjectives
Datadog v4.28.1 published on Monday, Jun 24, 2024 by Pulumi

datadog.getServiceLevelObjectives

Explore with Pulumi AI

datadog logo
Datadog v4.28.1 published on Monday, Jun 24, 2024 by Pulumi

    Use this data source to retrieve information about multiple SLOs for use in other resources.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    const ftFooSlos = datadog.getServiceLevelObjectives({
        tagsQuery: "owner:ft-foo",
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    ft_foo_slos = datadog.get_service_level_objectives(tags_query="owner:ft-foo")
    
    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.GetServiceLevelObjectives(ctx, &datadog.GetServiceLevelObjectivesArgs{
    			TagsQuery: pulumi.StringRef("owner:ft-foo"),
    		}, 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 ftFooSlos = Datadog.GetServiceLevelObjectives.Invoke(new()
        {
            TagsQuery = "owner:ft-foo",
        });
    
    });
    
    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.GetServiceLevelObjectivesArgs;
    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 ftFooSlos = DatadogFunctions.getServiceLevelObjectives(GetServiceLevelObjectivesArgs.builder()
                .tagsQuery("owner:ft-foo")
                .build());
    
        }
    }
    
    variables:
      ftFooSlos:
        fn::invoke:
          Function: datadog:getServiceLevelObjectives
          Arguments:
            tagsQuery: owner:ft-foo
    

    Using getServiceLevelObjectives

    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 getServiceLevelObjectives(args: GetServiceLevelObjectivesArgs, opts?: InvokeOptions): Promise<GetServiceLevelObjectivesResult>
    function getServiceLevelObjectivesOutput(args: GetServiceLevelObjectivesOutputArgs, opts?: InvokeOptions): Output<GetServiceLevelObjectivesResult>
    def get_service_level_objectives(error_on_empty_result: Optional[bool] = None,
                                     ids: Optional[Sequence[str]] = None,
                                     metrics_query: Optional[str] = None,
                                     name_query: Optional[str] = None,
                                     query: Optional[str] = None,
                                     tags_query: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetServiceLevelObjectivesResult
    def get_service_level_objectives_output(error_on_empty_result: Optional[pulumi.Input[bool]] = None,
                                     ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                     metrics_query: Optional[pulumi.Input[str]] = None,
                                     name_query: Optional[pulumi.Input[str]] = None,
                                     query: Optional[pulumi.Input[str]] = None,
                                     tags_query: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetServiceLevelObjectivesResult]
    func GetServiceLevelObjectives(ctx *Context, args *GetServiceLevelObjectivesArgs, opts ...InvokeOption) (*GetServiceLevelObjectivesResult, error)
    func GetServiceLevelObjectivesOutput(ctx *Context, args *GetServiceLevelObjectivesOutputArgs, opts ...InvokeOption) GetServiceLevelObjectivesResultOutput

    > Note: This function is named GetServiceLevelObjectives in the Go SDK.

    public static class GetServiceLevelObjectives 
    {
        public static Task<GetServiceLevelObjectivesResult> InvokeAsync(GetServiceLevelObjectivesArgs args, InvokeOptions? opts = null)
        public static Output<GetServiceLevelObjectivesResult> Invoke(GetServiceLevelObjectivesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServiceLevelObjectivesResult> getServiceLevelObjectives(GetServiceLevelObjectivesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: datadog:index/getServiceLevelObjectives:getServiceLevelObjectives
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ErrorOnEmptyResult bool
    Throw an error if no results are found. Defaults to true.
    Ids List<string>
    An array of SLO IDs to limit the search.
    MetricsQuery string
    Filter results based on SLO numerator and denominator.
    NameQuery string
    Filter results based on SLO names.
    Query string
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    TagsQuery string
    Filter results based on a single SLO tag.
    ErrorOnEmptyResult bool
    Throw an error if no results are found. Defaults to true.
    Ids []string
    An array of SLO IDs to limit the search.
    MetricsQuery string
    Filter results based on SLO numerator and denominator.
    NameQuery string
    Filter results based on SLO names.
    Query string
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    TagsQuery string
    Filter results based on a single SLO tag.
    errorOnEmptyResult Boolean
    Throw an error if no results are found. Defaults to true.
    ids List<String>
    An array of SLO IDs to limit the search.
    metricsQuery String
    Filter results based on SLO numerator and denominator.
    nameQuery String
    Filter results based on SLO names.
    query String
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    tagsQuery String
    Filter results based on a single SLO tag.
    errorOnEmptyResult boolean
    Throw an error if no results are found. Defaults to true.
    ids string[]
    An array of SLO IDs to limit the search.
    metricsQuery string
    Filter results based on SLO numerator and denominator.
    nameQuery string
    Filter results based on SLO names.
    query string
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    tagsQuery string
    Filter results based on a single SLO tag.
    error_on_empty_result bool
    Throw an error if no results are found. Defaults to true.
    ids Sequence[str]
    An array of SLO IDs to limit the search.
    metrics_query str
    Filter results based on SLO numerator and denominator.
    name_query str
    Filter results based on SLO names.
    query str
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    tags_query str
    Filter results based on a single SLO tag.
    errorOnEmptyResult Boolean
    Throw an error if no results are found. Defaults to true.
    ids List<String>
    An array of SLO IDs to limit the search.
    metricsQuery String
    Filter results based on SLO numerator and denominator.
    nameQuery String
    Filter results based on SLO names.
    query String
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    tagsQuery String
    Filter results based on a single SLO tag.

    getServiceLevelObjectives Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Slos List<GetServiceLevelObjectivesSlo>
    List of SLOs
    ErrorOnEmptyResult bool
    Throw an error if no results are found. Defaults to true.
    Ids List<string>
    An array of SLO IDs to limit the search.
    MetricsQuery string
    Filter results based on SLO numerator and denominator.
    NameQuery string
    Filter results based on SLO names.
    Query string
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    TagsQuery string
    Filter results based on a single SLO tag.
    Id string
    The provider-assigned unique ID for this managed resource.
    Slos []GetServiceLevelObjectivesSlo
    List of SLOs
    ErrorOnEmptyResult bool
    Throw an error if no results are found. Defaults to true.
    Ids []string
    An array of SLO IDs to limit the search.
    MetricsQuery string
    Filter results based on SLO numerator and denominator.
    NameQuery string
    Filter results based on SLO names.
    Query string
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    TagsQuery string
    Filter results based on a single SLO tag.
    id String
    The provider-assigned unique ID for this managed resource.
    slos List<GetServiceLevelObjectivesSlo>
    List of SLOs
    errorOnEmptyResult Boolean
    Throw an error if no results are found. Defaults to true.
    ids List<String>
    An array of SLO IDs to limit the search.
    metricsQuery String
    Filter results based on SLO numerator and denominator.
    nameQuery String
    Filter results based on SLO names.
    query String
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    tagsQuery String
    Filter results based on a single SLO tag.
    id string
    The provider-assigned unique ID for this managed resource.
    slos GetServiceLevelObjectivesSlo[]
    List of SLOs
    errorOnEmptyResult boolean
    Throw an error if no results are found. Defaults to true.
    ids string[]
    An array of SLO IDs to limit the search.
    metricsQuery string
    Filter results based on SLO numerator and denominator.
    nameQuery string
    Filter results based on SLO names.
    query string
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    tagsQuery string
    Filter results based on a single SLO tag.
    id str
    The provider-assigned unique ID for this managed resource.
    slos Sequence[GetServiceLevelObjectivesSlo]
    List of SLOs
    error_on_empty_result bool
    Throw an error if no results are found. Defaults to true.
    ids Sequence[str]
    An array of SLO IDs to limit the search.
    metrics_query str
    Filter results based on SLO numerator and denominator.
    name_query str
    Filter results based on SLO names.
    query str
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    tags_query str
    Filter results based on a single SLO tag.
    id String
    The provider-assigned unique ID for this managed resource.
    slos List<Property Map>
    List of SLOs
    errorOnEmptyResult Boolean
    Throw an error if no results are found. Defaults to true.
    ids List<String>
    An array of SLO IDs to limit the search.
    metricsQuery String
    Filter results based on SLO numerator and denominator.
    nameQuery String
    Filter results based on SLO names.
    query String
    The query string to filter results based on SLO names. Some examples of queries include service:\n\n and \n\n.
    tagsQuery String
    Filter results based on a single SLO tag.

    Supporting Types

    GetServiceLevelObjectivesSlo

    Id string
    ID of the Datadog service level objective
    Name string
    Name of the Datadog 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 options to choose from are: metric and monitor.
    Id string
    ID of the Datadog service level objective
    Name string
    Name of the Datadog 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 options to choose from are: metric and monitor.
    id String
    ID of the Datadog service level objective
    name String
    Name of the Datadog 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 options to choose from are: metric and monitor.
    id string
    ID of the Datadog service level objective
    name string
    Name of the Datadog 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 options to choose from are: metric and monitor.
    id str
    ID of the Datadog service level objective
    name str
    Name of the Datadog 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 options to choose from are: metric and monitor.
    id String
    ID of the Datadog service level objective
    name String
    Name of the Datadog 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 options to choose from are: metric and monitor.

    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.28.1 published on Monday, Jun 24, 2024 by Pulumi