1. Packages
  2. Dynatrace
  3. API Docs
  4. getDashboard
Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse

dynatrace.getDashboard

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse

    The dynatrace.Dashboard data source allows the dashboard ID to be retrieved by its name and owner.

    • name (String) - The name of the dashboard
    • owner (String) - The owner of the dashboard

    If multiple services match the given criteria, the first result will be retrieved.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@pulumi/dynatrace";
    
    const example = dynatrace.getDashboard({
        name: "Terraform",
        owner: "Hashicorp",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_dynatrace as dynatrace
    
    example = dynatrace.get_dashboard(name="Terraform",
        owner="Hashicorp")
    pulumi.export("id", example.id)
    
    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.LookupDashboard(ctx, &dynatrace.LookupDashboardArgs{
    			Name:  "Terraform",
    			Owner: "Hashicorp",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dynatrace = Pulumi.Dynatrace;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Dynatrace.GetDashboard.Invoke(new()
        {
            Name = "Terraform",
            Owner = "Hashicorp",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getDashboardResult => getDashboardResult.Id),
        };
    });
    
    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.GetDashboardArgs;
    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 example = DynatraceFunctions.getDashboard(GetDashboardArgs.builder()
                .name("Terraform")
                .owner("Hashicorp")
                .build());
    
            ctx.export("id", example.applyValue(getDashboardResult -> getDashboardResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: dynatrace:getDashboard
          Arguments:
            name: Terraform
            owner: Hashicorp
    outputs:
      id: ${example.id}
    

    Using getDashboard

    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 getDashboard(args: GetDashboardArgs, opts?: InvokeOptions): Promise<GetDashboardResult>
    function getDashboardOutput(args: GetDashboardOutputArgs, opts?: InvokeOptions): Output<GetDashboardResult>
    def get_dashboard(name: Optional[str] = None,
                      owner: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDashboardResult
    def get_dashboard_output(name: Optional[pulumi.Input[str]] = None,
                      owner: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetDashboardResult]
    func LookupDashboard(ctx *Context, args *LookupDashboardArgs, opts ...InvokeOption) (*LookupDashboardResult, error)
    func LookupDashboardOutput(ctx *Context, args *LookupDashboardOutputArgs, opts ...InvokeOption) LookupDashboardResultOutput

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

    public static class GetDashboard 
    {
        public static Task<GetDashboardResult> InvokeAsync(GetDashboardArgs args, InvokeOptions? opts = null)
        public static Output<GetDashboardResult> Invoke(GetDashboardInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDashboardResult> getDashboard(GetDashboardArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: dynatrace:index/getDashboard:getDashboard
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Owner string
    Name string
    Owner string
    name String
    owner String
    name string
    owner string
    name str
    owner str
    name String
    owner String

    getDashboard Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Owner string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Owner string
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    owner String
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    owner string
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    owner str
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    owner String

    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.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse