1. Packages
  2. Dynatrace
  3. API Docs
  4. getPlatformSloTemplates
Dynatrace v0.28.0 published on Sunday, May 11, 2025 by Pulumiverse

dynatrace.getPlatformSloTemplates

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.28.0 published on Sunday, May 11, 2025 by Pulumiverse

    To utilize this data source, please define the environment variables DT_CLIENT_ID, DT_CLIENT_SECRET, DT_ACCOUNT_ID with an OAuth client including the following permissions: View SLOs (slo:slos:read) and View SLO objective templates (slo:objective-templates:read).

    The SLO objective templates data source allows to retrieve a list of all templates.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@pulumi/dynatrace";
    
    const testPlatformSloTemplates = dynatrace.getPlatformSloTemplates({});
    export const test = testPlatformSloTemplates;
    
    import pulumi
    import pulumi_dynatrace as dynatrace
    
    test_platform_slo_templates = dynatrace.get_platform_slo_templates()
    pulumi.export("test", test_platform_slo_templates)
    
    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 {
    		testPlatformSloTemplates, err := dynatrace.GetPlatformSloTemplates(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("test", testPlatformSloTemplates)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dynatrace = Pulumi.Dynatrace;
    
    return await Deployment.RunAsync(() => 
    {
        var testPlatformSloTemplates = Dynatrace.GetPlatformSloTemplates.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["test"] = testPlatformSloTemplates,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dynatrace.DynatraceFunctions;
    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 testPlatformSloTemplates = DynatraceFunctions.getPlatformSloTemplates(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
    
            ctx.export("test", testPlatformSloTemplates);
        }
    }
    
    variables:
      testPlatformSloTemplates:
        fn::invoke:
          function: dynatrace:getPlatformSloTemplates
          arguments: {}
    outputs:
      test: ${testPlatformSloTemplates}
    

    Using getPlatformSloTemplates

    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 getPlatformSloTemplates(opts?: InvokeOptions): Promise<GetPlatformSloTemplatesResult>
    function getPlatformSloTemplatesOutput(opts?: InvokeOptions): Output<GetPlatformSloTemplatesResult>
    def get_platform_slo_templates(opts: Optional[InvokeOptions] = None) -> GetPlatformSloTemplatesResult
    def get_platform_slo_templates_output(opts: Optional[InvokeOptions] = None) -> Output[GetPlatformSloTemplatesResult]
    func GetPlatformSloTemplates(ctx *Context, opts ...InvokeOption) (*GetPlatformSloTemplatesResult, error)
    func GetPlatformSloTemplatesOutput(ctx *Context, opts ...InvokeOption) GetPlatformSloTemplatesResultOutput

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

    public static class GetPlatformSloTemplates 
    {
        public static Task<GetPlatformSloTemplatesResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetPlatformSloTemplatesResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPlatformSloTemplatesResult> getPlatformSloTemplates(InvokeOptions options)
    public static Output<GetPlatformSloTemplatesResult> getPlatformSloTemplates(InvokeOptions options)
    
    fn::invoke:
      function: dynatrace:index/getPlatformSloTemplates:getPlatformSloTemplates
      arguments:
        # arguments dictionary

    getPlatformSloTemplates Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Templates List<Pulumiverse.Dynatrace.Outputs.GetPlatformSloTemplatesTemplate>
    Id string
    The provider-assigned unique ID for this managed resource.
    Templates []GetPlatformSloTemplatesTemplate
    id String
    The provider-assigned unique ID for this managed resource.
    templates List<GetPlatformSloTemplatesTemplate>
    id string
    The provider-assigned unique ID for this managed resource.
    templates GetPlatformSloTemplatesTemplate[]
    id str
    The provider-assigned unique ID for this managed resource.
    templates Sequence[GetPlatformSloTemplatesTemplate]
    id String
    The provider-assigned unique ID for this managed resource.
    templates List<Property Map>

    Supporting Types

    GetPlatformSloTemplatesTemplate

    Id string
    ID of the SLO objective template
    Name string
    Name of the SLO objective template
    Id string
    ID of the SLO objective template
    Name string
    Name of the SLO objective template
    id String
    ID of the SLO objective template
    name String
    Name of the SLO objective template
    id string
    ID of the SLO objective template
    name string
    Name of the SLO objective template
    id str
    ID of the SLO objective template
    name str
    Name of the SLO objective template
    id String
    ID of the SLO objective template
    name String
    Name of the SLO objective template

    Package Details

    Repository
    dynatrace pulumiverse/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo
    Dynatrace v0.28.0 published on Sunday, May 11, 2025 by Pulumiverse