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
{
Description = "Created using the Datadog provider in TF",
IsReadOnly = true,
LayoutType = "ordered",
Title = "TF Test Layout Dashboard",
Widgets =
{
new Datadog.Inputs.DashboardWidgetArgs
{
AlertGraphDefinition = new Datadog.Inputs.DashboardWidgetAlertGraphDefinitionArgs
{
AlertId = "1234",
Time = new Datadog.Inputs.DashboardWidgetAlertGraphDefinitionTimeArgs
{
LiveSpan = "1h",
},
Title = "Widget Title",
VizType = "timeseries",
},
},
},
});
var screen = new Datadog.Dashboard("screen", new Datadog.DashboardArgs
{
Description = "Created using the Datadog provider in TF",
IsReadOnly = false,
LayoutType = "free",
Title = "TF Test Free Layout Dashboard",
Widgets =
{
new Datadog.Inputs.DashboardWidgetArgs
{
EventStreamDefinition = new Datadog.Inputs.DashboardWidgetEventStreamDefinitionArgs
{
EventSize = "l",
Query = "*",
Time = new Datadog.Inputs.DashboardWidgetEventStreamDefinitionTimeArgs
{
LiveSpan = "1h",
},
Title = "Widget Title",
TitleAlign = "left",
TitleSize = "16",
},
Layout = new Datadog.Inputs.DashboardWidgetLayoutArgs
{
Height = 43,
Width = 32,
X = 5,
Y = 5,
},
},
},
});
var newList = new Datadog.DashboardList("newList", new Datadog.DashboardListArgs
{
DashItems =
{
new Datadog.Inputs.DashboardListDashItemArgs
{
DashId = time.Id,
Type = "custom_timeboard",
},
new Datadog.Inputs.DashboardListDashItemArgs
{
DashId = screen.Id,
Type = "custom_screenboard",
},
},
Name = "TF Created List",
}, new CustomResourceOptions
{
DependsOn =
{
"datadog_dashboard.screen",
"datadog_dashboard.time",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-datadog/sdk/v2/go/datadog"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
time, err := datadog.NewDashboard(ctx, "time", &datadog.DashboardArgs{
Description: pulumi.String("Created using the Datadog provider in TF"),
IsReadOnly: pulumi.Bool(true),
LayoutType: pulumi.String("ordered"),
Title: pulumi.String("TF Test Layout Dashboard"),
Widgets: datadog.DashboardWidgetArray{
&datadog.DashboardWidgetArgs{
AlertGraphDefinition: &datadog.DashboardWidgetAlertGraphDefinitionArgs{
AlertId: pulumi.String("1234"),
Time: &datadog.DashboardWidgetAlertGraphDefinitionTimeArgs{
LiveSpan: pulumi.String("1h"),
},
Title: pulumi.String("Widget Title"),
VizType: pulumi.String("timeseries"),
},
},
},
})
if err != nil {
return err
}
screen, err := datadog.NewDashboard(ctx, "screen", &datadog.DashboardArgs{
Description: pulumi.String("Created using the Datadog provider in TF"),
IsReadOnly: pulumi.Bool(false),
LayoutType: pulumi.String("free"),
Title: pulumi.String("TF Test Free Layout Dashboard"),
Widgets: datadog.DashboardWidgetArray{
&datadog.DashboardWidgetArgs{
EventStreamDefinition: &datadog.DashboardWidgetEventStreamDefinitionArgs{
EventSize: pulumi.String("l"),
Query: pulumi.String("*"),
Time: &datadog.DashboardWidgetEventStreamDefinitionTimeArgs{
LiveSpan: pulumi.String("1h"),
},
Title: pulumi.String("Widget Title"),
TitleAlign: pulumi.String("left"),
TitleSize: pulumi.String("16"),
},
Layout: &datadog.DashboardWidgetLayoutArgs{
Height: pulumi.Float64(43),
Width: pulumi.Float64(32),
X: pulumi.Float64(5),
Y: pulumi.Float64(5),
},
},
},
})
if err != nil {
return err
}
_, err = datadog.NewDashboardList(ctx, "newList", &datadog.DashboardListArgs{
DashItems: datadog.DashboardListDashItemArray{
&datadog.DashboardListDashItemArgs{
DashId: time.ID(),
Type: pulumi.String("custom_timeboard"),
},
&datadog.DashboardListDashItemArgs{
DashId: screen.ID(),
Type: pulumi.String("custom_screenboard"),
},
},
Name: pulumi.String("TF Created List"),
}, pulumi.DependsOn([]pulumi.Resource{
"datadog_dashboard.screen",
"datadog_dashboard.time",
}))
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_datadog as datadog
time = datadog.Dashboard("time",
description="Created using the Datadog provider in TF",
is_read_only=True,
layout_type="ordered",
title="TF Test Layout Dashboard",
widgets=[datadog.DashboardWidgetArgs(
alert_graph_definition=datadog.DashboardWidgetAlertGraphDefinitionArgs(
alert_id="1234",
time=datadog.DashboardWidgetAlertGraphDefinitionTimeArgs(
live_span="1h",
),
title="Widget Title",
viz_type="timeseries",
),
)])
screen = datadog.Dashboard("screen",
description="Created using the Datadog provider in TF",
is_read_only=False,
layout_type="free",
title="TF Test Free Layout Dashboard",
widgets=[datadog.DashboardWidgetArgs(
event_stream_definition=datadog.DashboardWidgetEventStreamDefinitionArgs(
event_size="l",
query="*",
time=datadog.DashboardWidgetEventStreamDefinitionTimeArgs(
live_span="1h",
),
title="Widget Title",
title_align="left",
title_size="16",
),
layout=datadog.DashboardWidgetLayoutArgs(
height=43,
width=32,
x=5,
y=5,
),
)])
new_list = datadog.DashboardList("newList",
dash_items=[
datadog.DashboardListDashItemArgs(
dash_id=time.id,
type="custom_timeboard",
),
datadog.DashboardListDashItemArgs(
dash_id=screen.id,
type="custom_screenboard",
),
],
name="TF Created List",
opts=pulumi.ResourceOptions(depends_on=[
"datadog_dashboard.screen",
"datadog_dashboard.time",
]))
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const time = new datadog.Dashboard("time", {
description: "Created using the Datadog provider in TF",
isReadOnly: true,
layoutType: "ordered",
title: "TF Test Layout Dashboard",
widgets: [{
alertGraphDefinition: {
alertId: "1234",
time: {
live_span: "1h",
},
title: "Widget Title",
vizType: "timeseries",
},
}],
});
const screen = new datadog.Dashboard("screen", {
description: "Created using the Datadog provider in TF",
isReadOnly: false,
layoutType: "free",
title: "TF Test Free Layout Dashboard",
widgets: [{
eventStreamDefinition: {
eventSize: "l",
query: "*",
time: {
live_span: "1h",
},
title: "Widget Title",
titleAlign: "left",
titleSize: "16",
},
layout: {
height: 43,
width: 32,
x: 5,
y: 5,
},
}],
});
const newList = new datadog.DashboardList("new_list", {
dashItems: [
{
dashId: time.id,
type: "custom_timeboard",
},
{
dashId: screen.id,
type: "custom_screenboard",
},
],
name: "TF Created List",
}, { dependsOn: [screen, time] });
Create a DashboardList Resource
new DashboardList(name: string, args: DashboardListArgs, opts?: CustomResourceOptions);
def DashboardList(resource_name: str, opts: Optional[ResourceOptions] = None, dash_items: Optional[Sequence[DashboardListDashItemArgs]] = None, name: Optional[str] = None)
func NewDashboardList(ctx *Context, name string, args DashboardListArgs, opts ...ResourceOption) (*DashboardList, error)
public DashboardList(string name, DashboardListArgs args, CustomResourceOptions? opts = null)
- 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.
- opts ResourceOptions
- A bag of options that control this 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.
DashboardList Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The DashboardList resource accepts the following input properties:
- Name string
The name of the Dashboard List
- Dash
Items List<DashboardList Dash Item Args> A set of dashbaord items that belong to this list
- Name string
The name of the Dashboard List
- Dash
Items []DashboardList Dash Item A set of dashbaord items that belong to this list
- name string
The name of the Dashboard List
- dash
Items DashboardList Dash Item[] A set of dashbaord items that belong to this list
- name str
The name of the Dashboard List
- dash_
items Sequence[DashboardList Dash Item Args] A set of dashbaord 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 str
- 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)
- 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.
The following state arguments are supported:
- Dash
Items List<DashboardList Dash Item Args> A set of dashbaord items that belong to this list
- Name string
The name of the Dashboard List
- Dash
Items []DashboardList Dash Item A set of dashbaord items that belong to this list
- Name string
The name of the Dashboard List
- dash
Items DashboardList Dash Item[] A set of dashbaord items that belong to this list
- name string
The name of the Dashboard List
- dash_
items Sequence[DashboardList Dash Item Args] A set of dashbaord items that belong to this list
- name str
The name of the Dashboard List
Supporting Types
DashboardListDashItem
Import
dashboard lists can be imported using their id, e.g.
$ 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.