1. Packages
  2. Packages
  3. Dynatrace
  4. API Docs
  5. getPlatformSlo
Viewing docs for Dynatrace v0.37.1
published on Thursday, Jun 25, 2026 by Pulumiverse
dynatrace logo
Viewing docs for Dynatrace v0.37.1
published on Thursday, Jun 25, 2026 by Pulumiverse

    Dynatrace SaaS only

    This data source requires the OAuth permission View SLOs (slo:slos:read)

    The dynatrace.PlatformSlo data source allows to get an SLO and all its data by its name.

    Dynatrace Documentation

    • Service-Level Objectives overview - https://docs.dynatrace.com/docs/deliver/service-level-objectives

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@pulumiverse/dynatrace";
    
    const example = dynatrace.getPlatformSlo({
        name: "Terraform",
    });
    export const id = example.then(example => example.id);
    export const sli = example.then(example => example.customSlis?.[0]?.indicator);
    
    import pulumi
    import pulumi_dynatrace as dynatrace
    
    example = dynatrace.get_platform_slo(name="Terraform")
    pulumi.export("id", example.id)
    pulumi.export("sli", example.custom_slis[0].indicator)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := dynatrace.GetPlatformSlo(ctx, &dynatrace.LookupPlatformSloArgs{
    			Name: "Terraform",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		ctx.Export("sli", example.CustomSlis[0].Indicator)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dynatrace = Pulumiverse.Dynatrace;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Dynatrace.GetPlatformSlo.Invoke(new()
        {
            Name = "Terraform",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getPlatformSloResult => getPlatformSloResult.Id),
            ["sli"] = example.Apply(getPlatformSloResult => getPlatformSloResult.CustomSlis[0]?.Indicator),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dynatrace.DynatraceFunctions;
    import com.pulumi.dynatrace.inputs.GetPlatformSloArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = DynatraceFunctions.getPlatformSlo(GetPlatformSloArgs.builder()
                .name("Terraform")
                .build());
    
            ctx.export("id", example.id());
            ctx.export("sli", example.customSlis()[0].indicator());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: dynatrace:getPlatformSlo
          arguments:
            name: Terraform
    outputs:
      id: ${example.id}
      sli: ${example.customSlis[0].indicator}
    
    pulumi {
      required_providers {
        dynatrace = {
          source = "pulumi/dynatrace"
        }
      }
    }
    
    data "dynatrace_getplatformslo" "example" {
      name = "Terraform"
    }
    
    output "id" {
      value = data.dynatrace_getplatformslo.example.id
    }
    output "sli" {
      value = data.dynatrace_getplatformslo.example.custom_slis[0].indicator
    }
    

    Using getPlatformSlo

    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 getPlatformSlo(args: GetPlatformSloArgs, opts?: InvokeOptions): Promise<GetPlatformSloResult>
    function getPlatformSloOutput(args: GetPlatformSloOutputArgs, opts?: InvokeOptions): Output<GetPlatformSloResult>
    def get_platform_slo(name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetPlatformSloResult
    def get_platform_slo_output(name: pulumi.Input[Optional[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetPlatformSloResult]
    func LookupPlatformSlo(ctx *Context, args *LookupPlatformSloArgs, opts ...InvokeOption) (*LookupPlatformSloResult, error)
    func LookupPlatformSloOutput(ctx *Context, args *LookupPlatformSloOutputArgs, opts ...InvokeOption) LookupPlatformSloResultOutput

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

    public static class GetPlatformSlo 
    {
        public static Task<GetPlatformSloResult> InvokeAsync(GetPlatformSloArgs args, InvokeOptions? opts = null)
        public static Output<GetPlatformSloResult> Invoke(GetPlatformSloInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPlatformSloResult> getPlatformSlo(GetPlatformSloArgs args, InvokeOptions options)
    public static Output<GetPlatformSloResult> getPlatformSlo(GetPlatformSloArgs args, InvokeOptions options)
    
    fn::invoke:
      function: dynatrace:index/getPlatformSlo:getPlatformSlo
      arguments:
        # arguments dictionary
    data "dynatrace_getplatformslo" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Name of the SLO
    Name string
    Name of the SLO
    name string
    Name of the SLO
    name String
    Name of the SLO
    name string
    Name of the SLO
    name str
    Name of the SLO
    name String
    Name of the SLO

    getPlatformSlo Result

    The following output properties are available:

    Criterias List<Pulumiverse.Dynatrace.Outputs.GetPlatformSloCriteria>
    Criteria of the SLO
    CustomSlis List<Pulumiverse.Dynatrace.Outputs.GetPlatformSloCustomSli>
    Custom SLI of the SLO
    Description string
    Description of the SLO
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the SLO
    SliReferences List<Pulumiverse.Dynatrace.Outputs.GetPlatformSloSliReference>
    SLI reference of the SLO
    Tags List<string>
    Tags of the SLO. Example: Stage:DEV
    Criterias []GetPlatformSloCriteria
    Criteria of the SLO
    CustomSlis []GetPlatformSloCustomSli
    Custom SLI of the SLO
    Description string
    Description of the SLO
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the SLO
    SliReferences []GetPlatformSloSliReference
    SLI reference of the SLO
    Tags []string
    Tags of the SLO. Example: Stage:DEV
    criterias list(object)
    Criteria of the SLO
    custom_slis list(object)
    Custom SLI of the SLO
    description string
    Description of the SLO
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the SLO
    sli_references list(object)
    SLI reference of the SLO
    tags list(string)
    Tags of the SLO. Example: Stage:DEV
    criterias List<GetPlatformSloCriteria>
    Criteria of the SLO
    customSlis List<GetPlatformSloCustomSli>
    Custom SLI of the SLO
    description String
    Description of the SLO
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the SLO
    sliReferences List<GetPlatformSloSliReference>
    SLI reference of the SLO
    tags List<String>
    Tags of the SLO. Example: Stage:DEV
    criterias GetPlatformSloCriteria[]
    Criteria of the SLO
    customSlis GetPlatformSloCustomSli[]
    Custom SLI of the SLO
    description string
    Description of the SLO
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the SLO
    sliReferences GetPlatformSloSliReference[]
    SLI reference of the SLO
    tags string[]
    Tags of the SLO. Example: Stage:DEV
    criterias Sequence[GetPlatformSloCriteria]
    Criteria of the SLO
    custom_slis Sequence[GetPlatformSloCustomSli]
    Custom SLI of the SLO
    description str
    Description of the SLO
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the SLO
    sli_references Sequence[GetPlatformSloSliReference]
    SLI reference of the SLO
    tags Sequence[str]
    Tags of the SLO. Example: Stage:DEV
    criterias List<Property Map>
    Criteria of the SLO
    customSlis List<Property Map>
    Custom SLI of the SLO
    description String
    Description of the SLO
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the SLO
    sliReferences List<Property Map>
    SLI reference of the SLO
    tags List<String>
    Tags of the SLO. Example: Stage:DEV

    Supporting Types

    GetPlatformSloCriteria

    GetPlatformSloCriteriaCriteriaDetail

    Target double
    Criteria target, example: 99.8
    TimeframeFrom string
    Timeframe from, example: now-7d
    TimeframeTo string
    Timeframe to, example: now
    Warning double
    Criteria warning, example: 99.9
    Target float64
    Criteria target, example: 99.8
    TimeframeFrom string
    Timeframe from, example: now-7d
    TimeframeTo string
    Timeframe to, example: now
    Warning float64
    Criteria warning, example: 99.9
    target number
    Criteria target, example: 99.8
    timeframe_from string
    Timeframe from, example: now-7d
    timeframe_to string
    Timeframe to, example: now
    warning number
    Criteria warning, example: 99.9
    target Double
    Criteria target, example: 99.8
    timeframeFrom String
    Timeframe from, example: now-7d
    timeframeTo String
    Timeframe to, example: now
    warning Double
    Criteria warning, example: 99.9
    target number
    Criteria target, example: 99.8
    timeframeFrom string
    Timeframe from, example: now-7d
    timeframeTo string
    Timeframe to, example: now
    warning number
    Criteria warning, example: 99.9
    target float
    Criteria target, example: 99.8
    timeframe_from str
    Timeframe from, example: now-7d
    timeframe_to str
    Timeframe to, example: now
    warning float
    Criteria warning, example: 99.9
    target Number
    Criteria target, example: 99.8
    timeframeFrom String
    Timeframe from, example: now-7d
    timeframeTo String
    Timeframe to, example: now
    warning Number
    Criteria warning, example: 99.9

    GetPlatformSloCustomSli

    FilterSegments List<Pulumiverse.Dynatrace.Inputs.GetPlatformSloCustomSliFilterSegment>
    A filter segment is identified by an ID. Each segment includes a list of variable definitions.
    Indicator string
    Indicator of the custom SLI. Example: timeseries sli=avg(dt.host.cpu.idle)
    FilterSegments []GetPlatformSloCustomSliFilterSegment
    A filter segment is identified by an ID. Each segment includes a list of variable definitions.
    Indicator string
    Indicator of the custom SLI. Example: timeseries sli=avg(dt.host.cpu.idle)
    filter_segments list(object)
    A filter segment is identified by an ID. Each segment includes a list of variable definitions.
    indicator string
    Indicator of the custom SLI. Example: timeseries sli=avg(dt.host.cpu.idle)
    filterSegments List<GetPlatformSloCustomSliFilterSegment>
    A filter segment is identified by an ID. Each segment includes a list of variable definitions.
    indicator String
    Indicator of the custom SLI. Example: timeseries sli=avg(dt.host.cpu.idle)
    filterSegments GetPlatformSloCustomSliFilterSegment[]
    A filter segment is identified by an ID. Each segment includes a list of variable definitions.
    indicator string
    Indicator of the custom SLI. Example: timeseries sli=avg(dt.host.cpu.idle)
    filter_segments Sequence[GetPlatformSloCustomSliFilterSegment]
    A filter segment is identified by an ID. Each segment includes a list of variable definitions.
    indicator str
    Indicator of the custom SLI. Example: timeseries sli=avg(dt.host.cpu.idle)
    filterSegments List<Property Map>
    A filter segment is identified by an ID. Each segment includes a list of variable definitions.
    indicator String
    Indicator of the custom SLI. Example: timeseries sli=avg(dt.host.cpu.idle)

    GetPlatformSloCustomSliFilterSegment

    GetPlatformSloCustomSliFilterSegmentFilterSegment

    Id string
    The ID of the filter segment
    Variables List<Pulumiverse.Dynatrace.Inputs.GetPlatformSloCustomSliFilterSegmentFilterSegmentVariable>
    Defines a variable with a name and a list of values
    Id string
    The ID of the filter segment
    Variables []GetPlatformSloCustomSliFilterSegmentFilterSegmentVariable
    Defines a variable with a name and a list of values
    id string
    The ID of the filter segment
    variables list(object)
    Defines a variable with a name and a list of values
    id String
    The ID of the filter segment
    variables List<GetPlatformSloCustomSliFilterSegmentFilterSegmentVariable>
    Defines a variable with a name and a list of values
    id string
    The ID of the filter segment
    variables GetPlatformSloCustomSliFilterSegmentFilterSegmentVariable[]
    Defines a variable with a name and a list of values
    id str
    The ID of the filter segment
    variables Sequence[GetPlatformSloCustomSliFilterSegmentFilterSegmentVariable]
    Defines a variable with a name and a list of values
    id String
    The ID of the filter segment
    variables List<Property Map>
    Defines a variable with a name and a list of values

    GetPlatformSloCustomSliFilterSegmentFilterSegmentVariable

    GetPlatformSloCustomSliFilterSegmentFilterSegmentVariableFilterSegmentVariable

    Name string
    Name of the filter segment variable
    Values List<string>
    Values of the filter segment variable
    Name string
    Name of the filter segment variable
    Values []string
    Values of the filter segment variable
    name string
    Name of the filter segment variable
    values list(string)
    Values of the filter segment variable
    name String
    Name of the filter segment variable
    values List<String>
    Values of the filter segment variable
    name string
    Name of the filter segment variable
    values string[]
    Values of the filter segment variable
    name str
    Name of the filter segment variable
    values Sequence[str]
    Values of the filter segment variable
    name String
    Name of the filter segment variable
    values List<String>
    Values of the filter segment variable

    GetPlatformSloSliReference

    TemplateId string
    Template ID of the SLI reference
    Variables List<Pulumiverse.Dynatrace.Inputs.GetPlatformSloSliReferenceVariable>
    Variables of the SLI reference
    TemplateId string
    Template ID of the SLI reference
    Variables []GetPlatformSloSliReferenceVariable
    Variables of the SLI reference
    template_id string
    Template ID of the SLI reference
    variables list(object)
    Variables of the SLI reference
    templateId String
    Template ID of the SLI reference
    variables List<GetPlatformSloSliReferenceVariable>
    Variables of the SLI reference
    templateId string
    Template ID of the SLI reference
    variables GetPlatformSloSliReferenceVariable[]
    Variables of the SLI reference
    template_id str
    Template ID of the SLI reference
    variables Sequence[GetPlatformSloSliReferenceVariable]
    Variables of the SLI reference
    templateId String
    Template ID of the SLI reference
    variables List<Property Map>
    Variables of the SLI reference

    GetPlatformSloSliReferenceVariable

    GetPlatformSloSliReferenceVariableSliReferenceVariable

    Name string
    Name of the SLI reference variable. Example: hostIds
    Value string
    Value of the SLI reference variable. Example: HOST-123456789ABCDEFG
    Name string
    Name of the SLI reference variable. Example: hostIds
    Value string
    Value of the SLI reference variable. Example: HOST-123456789ABCDEFG
    name string
    Name of the SLI reference variable. Example: hostIds
    value string
    Value of the SLI reference variable. Example: HOST-123456789ABCDEFG
    name String
    Name of the SLI reference variable. Example: hostIds
    value String
    Value of the SLI reference variable. Example: HOST-123456789ABCDEFG
    name string
    Name of the SLI reference variable. Example: hostIds
    value string
    Value of the SLI reference variable. Example: HOST-123456789ABCDEFG
    name str
    Name of the SLI reference variable. Example: hostIds
    value str
    Value of the SLI reference variable. Example: HOST-123456789ABCDEFG
    name String
    Name of the SLI reference variable. Example: hostIds
    value String
    Value of the SLI reference variable. Example: HOST-123456789ABCDEFG

    Package Details

    Repository
    dynatrace pulumiverse/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo
    Viewing docs for Dynatrace v0.37.1
    published on Thursday, Jun 25, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial