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

datadog.getServiceLevelObjectives

Explore with Pulumi AI

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

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

    Example Usage

    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 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
    	})
    }
    
    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());
    
        }
    }
    
    import pulumi
    import pulumi_datadog as datadog
    
    ft_foo_slos = datadog.get_service_level_objectives(tags_query="owner:ft-foo")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    const ftFooSlos = datadog.getServiceLevelObjectives({
        tagsQuery: "owner:ft-foo",
    });
    
    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(ids: Optional[Sequence[str]] = None,
                                     metrics_query: Optional[str] = None,
                                     name_query: Optional[str] = None,
                                     tags_query: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetServiceLevelObjectivesResult
    def get_service_level_objectives_output(ids: Optional[pulumi.Input[Sequence[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[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:

    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.

    TagsQuery string

    Filter results based on a single SLO tag.

    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.

    TagsQuery string

    Filter results based on a single SLO tag.

    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.

    tagsQuery String

    Filter results based on a single SLO tag.

    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.

    tagsQuery string

    Filter results based on a single SLO tag.

    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.

    tags_query str

    Filter results based on a single SLO tag.

    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.

    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

    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.

    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

    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.

    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

    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.

    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

    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.

    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

    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.

    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

    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.

    tagsQuery String

    Filter results based on a single SLO tag.

    Supporting Types

    GetServiceLevelObjectivesSlo

    Id string

    The ID of this resource.

    Name string
    Type string
    Id string

    The ID of this resource.

    Name string
    Type string
    id String

    The ID of this resource.

    name String
    type String
    id string

    The ID of this resource.

    name string
    type string
    id str

    The ID of this resource.

    name str
    type str
    id String

    The ID of this resource.

    name String
    type String

    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