Datadog

Pulumi Official
Package maintained by Pulumi
v4.8.0 published on Monday, Mar 28, 2022 by Pulumi

getDashboardList

Use this data source to retrieve information about an existing dashboard list, for use in other resources. In particular, it can be used in a dashboard to register it in the list.

Example Usage

using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Datadog.GetDashboardList.InvokeAsync(new Datadog.GetDashboardListArgs
        {
            Name = "My super list",
        }));
        // Create a dashboard and register it in the list above.
        var time = new Datadog.Dashboard("time", new Datadog.DashboardArgs
        {
            DashboardLists = 
            {
                test.Apply(test => test.Id),
            },
            Description = "Created using the Datadog provider in Terraform",
            IsReadOnly = true,
            LayoutType = "ordered",
            Title = "TF Test Layout Dashboard",
            Widgets = 
            {
                new Datadog.Inputs.DashboardWidgetArgs
                {
                    AlertGraphDefinition = new Datadog.Inputs.DashboardWidgetAlertGraphDefinitionArgs
                    {
                        AlertId = "1234",
                        LiveSpan = "1h",
                        Title = "Widget Title",
                        VizType = "timeseries",
                    },
                },
            },
        });
    }

}
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 {
		test, err := datadog.LookupDashboardList(ctx, &GetDashboardListArgs{
			Name: "My super list",
		}, nil)
		if err != nil {
			return err
		}
		_, err = datadog.NewDashboard(ctx, "time", &datadog.DashboardArgs{
			DashboardLists: pulumi.IntArray{
				pulumi.String(test.Id),
			},
			Description: pulumi.String("Created using the Datadog provider in Terraform"),
			IsReadOnly:  pulumi.Bool(true),
			LayoutType:  pulumi.String("ordered"),
			Title:       pulumi.String("TF Test Layout Dashboard"),
			Widgets: DashboardWidgetArray{
				&DashboardWidgetArgs{
					AlertGraphDefinition: &DashboardWidgetAlertGraphDefinitionArgs{
						AlertId:  pulumi.String("1234"),
						LiveSpan: pulumi.String("1h"),
						Title:    pulumi.String("Widget Title"),
						VizType:  pulumi.String("timeseries"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_datadog as datadog

test = datadog.get_dashboard_list(name="My super list")
# Create a dashboard and register it in the list above.
time = datadog.Dashboard("time",
    dashboard_lists=[test.id],
    description="Created using the Datadog provider in Terraform",
    is_read_only=True,
    layout_type="ordered",
    title="TF Test Layout Dashboard",
    widgets=[datadog.DashboardWidgetArgs(
        alert_graph_definition=datadog.DashboardWidgetAlertGraphDefinitionArgs(
            alert_id="1234",
            live_span="1h",
            title="Widget Title",
            viz_type="timeseries",
        ),
    )])
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

const test = pulumi.output(datadog.getDashboardList({
    name: "My super list",
}));
// Create a dashboard and register it in the list above.
const time = new datadog.Dashboard("time", {
    dashboardLists: [test.apply(test => Number.parseFloat(test.id))],
    description: "Created using the Datadog provider in Terraform",
    isReadOnly: true,
    layoutType: "ordered",
    title: "TF Test Layout Dashboard",
    widgets: [{
        alertGraphDefinition: {
            alertId: "1234",
            liveSpan: "1h",
            title: "Widget Title",
            vizType: "timeseries",
        },
    }],
});

Coming soon!

Using getDashboardList

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 getDashboardList(args: GetDashboardListArgs, opts?: InvokeOptions): Promise<GetDashboardListResult>
function getDashboardListOutput(args: GetDashboardListOutputArgs, opts?: InvokeOptions): Output<GetDashboardListResult>
def get_dashboard_list(name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetDashboardListResult
def get_dashboard_list_output(name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetDashboardListResult]
func LookupDashboardList(ctx *Context, args *LookupDashboardListArgs, opts ...InvokeOption) (*LookupDashboardListResult, error)
func LookupDashboardListOutput(ctx *Context, args *LookupDashboardListOutputArgs, opts ...InvokeOption) LookupDashboardListResultOutput

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

public static class GetDashboardList 
{
    public static Task<GetDashboardListResult> InvokeAsync(GetDashboardListArgs args, InvokeOptions? opts = null)
    public static Output<GetDashboardListResult> Invoke(GetDashboardListInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDashboardListResult> getDashboardList(GetDashboardListArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: datadog:index/getDashboardList:getDashboardList
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

A dashboard list name to limit the search.

Name string

A dashboard list name to limit the search.

name String

A dashboard list name to limit the search.

name string

A dashboard list name to limit the search.

name str

A dashboard list name to limit the search.

name String

A dashboard list name to limit the search.

getDashboardList Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string

A dashboard list name to limit the search.

Id string

The provider-assigned unique ID for this managed resource.

Name string

A dashboard list name to limit the search.

id String

The provider-assigned unique ID for this managed resource.

name String

A dashboard list name to limit the search.

id string

The provider-assigned unique ID for this managed resource.

name string

A dashboard list name to limit the search.

id str

The provider-assigned unique ID for this managed resource.

name str

A dashboard list name to limit the search.

id String

The provider-assigned unique ID for this managed resource.

name String

A dashboard list name to limit the search.

Package Details

Repository
https://github.com/pulumi/pulumi-datadog
License
Apache-2.0
Notes

This Pulumi package is based on the datadog Terraform Provider.