Datadog

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

DashboardList

Provides a Datadog dashboard_list resource. This can be used to create and manage Datadog Dashboard Lists and the individual dashboards within them.

Example Usage

using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        var time = new Datadog.Dashboard("time", new Datadog.DashboardArgs
        {
            Title = "TF Test Layout Dashboard",
            Description = "Created using the Datadog provider",
            LayoutType = "ordered",
            IsReadOnly = true,
            Widgets = 
            {
                new Datadog.Inputs.DashboardWidgetArgs
                {
                    AlertGraphDefinition = new Datadog.Inputs.DashboardWidgetAlertGraphDefinitionArgs
                    {
                        AlertId = "1234",
                        VizType = "timeseries",
                        Title = "Widget Title",
                        LiveSpan = "1h",
                    },
                },
            },
        });
        var screen = new Datadog.Dashboard("screen", new Datadog.DashboardArgs
        {
            Title = "TF Test Free Layout Dashboard",
            Description = "Created using the Datadog provider",
            LayoutType = "free",
            IsReadOnly = false,
            Widgets = 
            {
                new Datadog.Inputs.DashboardWidgetArgs
                {
                    EventStreamDefinition = new Datadog.Inputs.DashboardWidgetEventStreamDefinitionArgs
                    {
                        Query = "*",
                        EventSize = "l",
                        Title = "Widget Title",
                        TitleSize = "16",
                        TitleAlign = "left",
                        LiveSpan = "1h",
                    },
                    WidgetLayout = new Datadog.Inputs.DashboardWidgetWidgetLayoutArgs
                    {
                        Height = 43,
                        Width = 32,
                        X = 5,
                        Y = 5,
                    },
                },
            },
        });
        // Create a new Dashboard List with two Dashboards
        var newList = new Datadog.DashboardList("newList", new Datadog.DashboardListArgs
        {
            Name = "Automated Created List",
            DashItems = 
            {
                new Datadog.Inputs.DashboardListDashItemArgs
                {
                    Type = "custom_timeboard",
                    DashId = time.Id,
                },
                new Datadog.Inputs.DashboardListDashItemArgs
                {
                    Type = "custom_screenboard",
                    DashId = screen.Id,
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                screen,
                time,
            },
        });
    }

}
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 {
		time, err := datadog.NewDashboard(ctx, "time", &datadog.DashboardArgs{
			Title:       pulumi.String("TF Test Layout Dashboard"),
			Description: pulumi.String("Created using the Datadog provider"),
			LayoutType:  pulumi.String("ordered"),
			IsReadOnly:  pulumi.Bool(true),
			Widgets: DashboardWidgetArray{
				&DashboardWidgetArgs{
					AlertGraphDefinition: &DashboardWidgetAlertGraphDefinitionArgs{
						AlertId:  pulumi.String("1234"),
						VizType:  pulumi.String("timeseries"),
						Title:    pulumi.String("Widget Title"),
						LiveSpan: pulumi.String("1h"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		screen, err := datadog.NewDashboard(ctx, "screen", &datadog.DashboardArgs{
			Title:       pulumi.String("TF Test Free Layout Dashboard"),
			Description: pulumi.String("Created using the Datadog provider"),
			LayoutType:  pulumi.String("free"),
			IsReadOnly:  pulumi.Bool(false),
			Widgets: DashboardWidgetArray{
				&DashboardWidgetArgs{
					EventStreamDefinition: &DashboardWidgetEventStreamDefinitionArgs{
						Query:      pulumi.String("*"),
						EventSize:  pulumi.String("l"),
						Title:      pulumi.String("Widget Title"),
						TitleSize:  pulumi.String("16"),
						TitleAlign: pulumi.String("left"),
						LiveSpan:   pulumi.String("1h"),
					},
					WidgetLayout: &DashboardWidgetWidgetLayoutArgs{
						Height: pulumi.Int(43),
						Width:  pulumi.Int(32),
						X:      pulumi.Int(5),
						Y:      pulumi.Int(5),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = datadog.NewDashboardList(ctx, "newList", &datadog.DashboardListArgs{
			Name: pulumi.String("Automated Created List"),
			DashItems: DashboardListDashItemArray{
				&DashboardListDashItemArgs{
					Type:   pulumi.String("custom_timeboard"),
					DashId: time.ID(),
				},
				&DashboardListDashItemArgs{
					Type:   pulumi.String("custom_screenboard"),
					DashId: screen.ID(),
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			screen,
			time,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_datadog as datadog

time = datadog.Dashboard("time",
    title="TF Test Layout Dashboard",
    description="Created using the Datadog provider",
    layout_type="ordered",
    is_read_only=True,
    widgets=[datadog.DashboardWidgetArgs(
        alert_graph_definition=datadog.DashboardWidgetAlertGraphDefinitionArgs(
            alert_id="1234",
            viz_type="timeseries",
            title="Widget Title",
            live_span="1h",
        ),
    )])
screen = datadog.Dashboard("screen",
    title="TF Test Free Layout Dashboard",
    description="Created using the Datadog provider",
    layout_type="free",
    is_read_only=False,
    widgets=[datadog.DashboardWidgetArgs(
        event_stream_definition=datadog.DashboardWidgetEventStreamDefinitionArgs(
            query="*",
            event_size="l",
            title="Widget Title",
            title_size="16",
            title_align="left",
            live_span="1h",
        ),
        widget_layout=datadog.DashboardWidgetWidgetLayoutArgs(
            height=43,
            width=32,
            x=5,
            y=5,
        ),
    )])
# Create a new Dashboard List with two Dashboards
new_list = datadog.DashboardList("newList",
    name="Automated Created List",
    dash_items=[
        datadog.DashboardListDashItemArgs(
            type="custom_timeboard",
            dash_id=time.id,
        ),
        datadog.DashboardListDashItemArgs(
            type="custom_screenboard",
            dash_id=screen.id,
        ),
    ],
    opts=pulumi.ResourceOptions(depends_on=[
            screen,
            time,
        ]))
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

const time = new datadog.Dashboard("time", {
    title: "TF Test Layout Dashboard",
    description: "Created using the Datadog provider",
    layoutType: "ordered",
    isReadOnly: true,
    widgets: [{
        alertGraphDefinition: {
            alertId: "1234",
            vizType: "timeseries",
            title: "Widget Title",
            liveSpan: "1h",
        },
    }],
});
const screen = new datadog.Dashboard("screen", {
    title: "TF Test Free Layout Dashboard",
    description: "Created using the Datadog provider",
    layoutType: "free",
    isReadOnly: false,
    widgets: [{
        eventStreamDefinition: {
            query: "*",
            eventSize: "l",
            title: "Widget Title",
            titleSize: 16,
            titleAlign: "left",
            liveSpan: "1h",
        },
        widgetLayout: {
            height: 43,
            width: 32,
            x: 5,
            y: 5,
        },
    }],
});
// Create a new Dashboard List with two Dashboards
const newList = new datadog.DashboardList("newList", {
    name: "Automated Created List",
    dashItems: [
        {
            type: "custom_timeboard",
            dashId: time.id,
        },
        {
            type: "custom_screenboard",
            dashId: screen.id,
        },
    ],
}, {
    dependsOn: [
        screen,
        time,
    ],
});

Coming soon!

Create a DashboardList Resource

new DashboardList(name: string, args: DashboardListArgs, opts?: CustomResourceOptions);
@overload
def DashboardList(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  dash_items: Optional[Sequence[DashboardListDashItemArgs]] = None,
                  name: Optional[str] = None)
@overload
def DashboardList(resource_name: str,
                  args: DashboardListArgs,
                  opts: Optional[ResourceOptions] = None)
func NewDashboardList(ctx *Context, name string, args DashboardListArgs, opts ...ResourceOption) (*DashboardList, error)
public DashboardList(string name, DashboardListArgs args, CustomResourceOptions? opts = null)
public DashboardList(String name, DashboardListArgs args)
public DashboardList(String name, DashboardListArgs args, CustomResourceOptions options)
type: datadog:DashboardList
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DashboardListArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DashboardListArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DashboardListArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DashboardListArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DashboardListArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DashboardList Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DashboardList resource accepts the following input properties:

Name string

The name of the Dashboard List

DashItems List<DashboardListDashItemArgs>

A set of dashboard items that belong to this list

Name string

The name of the Dashboard List

DashItems []DashboardListDashItemArgs

A set of dashboard items that belong to this list

name String

The name of the Dashboard List

dashItems ListListDashItemArgs>

A set of dashboard items that belong to this list

name string

The name of the Dashboard List

dashItems DashboardListDashItemArgs[]

A set of dashboard items that belong to this list

name str

The name of the Dashboard List

dash_items Sequence[DashboardListDashItemArgs]

A set of dashboard items that belong to this list

name String

The name of the Dashboard List

dashItems List

A set of dashboard items that belong to this list

Outputs

All input properties are implicitly available as output properties. Additionally, the DashboardList resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing DashboardList Resource

Get an existing DashboardList resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DashboardListState, opts?: CustomResourceOptions): DashboardList
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        dash_items: Optional[Sequence[DashboardListDashItemArgs]] = None,
        name: Optional[str] = None) -> DashboardList
func GetDashboardList(ctx *Context, name string, id IDInput, state *DashboardListState, opts ...ResourceOption) (*DashboardList, error)
public static DashboardList Get(string name, Input<string> id, DashboardListState? state, CustomResourceOptions? opts = null)
public static DashboardList get(String name, Output<String> id, DashboardListState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DashItems List<DashboardListDashItemArgs>

A set of dashboard items that belong to this list

Name string

The name of the Dashboard List

DashItems []DashboardListDashItemArgs

A set of dashboard items that belong to this list

Name string

The name of the Dashboard List

dashItems ListListDashItemArgs>

A set of dashboard items that belong to this list

name String

The name of the Dashboard List

dashItems DashboardListDashItemArgs[]

A set of dashboard items that belong to this list

name string

The name of the Dashboard List

dash_items Sequence[DashboardListDashItemArgs]

A set of dashboard items that belong to this list

name str

The name of the Dashboard List

dashItems List

A set of dashboard items that belong to this list

name String

The name of the Dashboard List

Supporting Types

DashboardListDashItem

DashId string

The ID of the dashboard to add

Type string

The type of this dashboard. Valid values are custom_timeboard, custom_screenboard, integration_screenboard, integration_timeboard, host_timeboard.

DashId string

The ID of the dashboard to add

Type string

The type of this dashboard. Valid values are custom_timeboard, custom_screenboard, integration_screenboard, integration_timeboard, host_timeboard.

dashId String

The ID of the dashboard to add

type String

The type of this dashboard. Valid values are custom_timeboard, custom_screenboard, integration_screenboard, integration_timeboard, host_timeboard.

dashId string

The ID of the dashboard to add

type string

The type of this dashboard. Valid values are custom_timeboard, custom_screenboard, integration_screenboard, integration_timeboard, host_timeboard.

dash_id str

The ID of the dashboard to add

type str

The type of this dashboard. Valid values are custom_timeboard, custom_screenboard, integration_screenboard, integration_timeboard, host_timeboard.

dashId String

The ID of the dashboard to add

type String

The type of this dashboard. Valid values are custom_timeboard, custom_screenboard, integration_screenboard, integration_timeboard, host_timeboard.

Import

 $ pulumi import datadog:index/dashboardList:DashboardList new_list 123456

Package Details

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

This Pulumi package is based on the datadog Terraform Provider.