1. Packages
  2. Datadog Provider
  3. API Docs
  4. DashboardList
Datadog v4.36.1 published on Friday, Nov 15, 2024 by Pulumi

datadog.DashboardList

Explore with Pulumi AI

datadog logo
Datadog v4.36.1 published on Friday, Nov 15, 2024 by Pulumi

    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

    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 in Pulumi",
        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 in Pulumi",
        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("new_list", {
        name: "Automated Created List",
        dashItems: [
            {
                type: "custom_timeboard",
                dashId: time.id,
            },
            {
                type: "custom_screenboard",
                dashId: screen.id,
            },
        ],
    }, {
        dependsOn: [
            screen,
            time,
        ],
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    time = datadog.Dashboard("time",
        title="TF Test Layout Dashboard",
        description="Created using the Datadog provider in Pulumi",
        layout_type="ordered",
        is_read_only=True,
        widgets=[{
            "alert_graph_definition": {
                "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 in Pulumi",
        layout_type="free",
        is_read_only=False,
        widgets=[{
            "event_stream_definition": {
                "query": "*",
                "event_size": "l",
                "title": "Widget Title",
                "title_size": "16",
                "title_align": "left",
                "live_span": "1h",
            },
            "widget_layout": {
                "height": 43,
                "width": 32,
                "x": 5,
                "y": 5,
            },
        }])
    # Create a new Dashboard List with two Dashboards
    new_list = datadog.DashboardList("new_list",
        name="Automated Created List",
        dash_items=[
            {
                "type": "custom_timeboard",
                "dash_id": time.id,
            },
            {
                "type": "custom_screenboard",
                "dash_id": screen.id,
            },
        ],
        opts = pulumi.ResourceOptions(depends_on=[
                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 in Pulumi"),
    			LayoutType:  pulumi.String("ordered"),
    			IsReadOnly:  pulumi.Bool(true),
    			Widgets: datadog.DashboardWidgetArray{
    				&datadog.DashboardWidgetArgs{
    					AlertGraphDefinition: &datadog.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 in Pulumi"),
    			LayoutType:  pulumi.String("free"),
    			IsReadOnly:  pulumi.Bool(false),
    			Widgets: datadog.DashboardWidgetArray{
    				&datadog.DashboardWidgetArgs{
    					EventStreamDefinition: &datadog.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: &datadog.DashboardWidgetWidgetLayoutArgs{
    						Height: pulumi.Int(43),
    						Width:  pulumi.Int(32),
    						X:      pulumi.Int(5),
    						Y:      pulumi.Int(5),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Create a new Dashboard List with two Dashboards
    		_, err = datadog.NewDashboardList(ctx, "new_list", &datadog.DashboardListArgs{
    			Name: pulumi.String("Automated Created List"),
    			DashItems: datadog.DashboardListDashItemArray{
    				&datadog.DashboardListDashItemArgs{
    					Type:   pulumi.String("custom_timeboard"),
    					DashId: time.ID(),
    				},
    				&datadog.DashboardListDashItemArgs{
    					Type:   pulumi.String("custom_screenboard"),
    					DashId: screen.ID(),
    				},
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			screen,
    			time,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        var time = new Datadog.Dashboard("time", new()
        {
            Title = "TF Test Layout Dashboard",
            Description = "Created using the Datadog provider in Pulumi",
            LayoutType = "ordered",
            IsReadOnly = true,
            Widgets = new[]
            {
                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()
        {
            Title = "TF Test Free Layout Dashboard",
            Description = "Created using the Datadog provider in Pulumi",
            LayoutType = "free",
            IsReadOnly = false,
            Widgets = new[]
            {
                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("new_list", new()
        {
            Name = "Automated Created List",
            DashItems = new[]
            {
                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 generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.Dashboard;
    import com.pulumi.datadog.DashboardArgs;
    import com.pulumi.datadog.inputs.DashboardWidgetArgs;
    import com.pulumi.datadog.inputs.DashboardWidgetAlertGraphDefinitionArgs;
    import com.pulumi.datadog.inputs.DashboardWidgetEventStreamDefinitionArgs;
    import com.pulumi.datadog.inputs.DashboardWidgetWidgetLayoutArgs;
    import com.pulumi.datadog.DashboardList;
    import com.pulumi.datadog.DashboardListArgs;
    import com.pulumi.datadog.inputs.DashboardListDashItemArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            var time = new Dashboard("time", DashboardArgs.builder()
                .title("TF Test Layout Dashboard")
                .description("Created using the Datadog provider in Pulumi")
                .layoutType("ordered")
                .isReadOnly(true)
                .widgets(DashboardWidgetArgs.builder()
                    .alertGraphDefinition(DashboardWidgetAlertGraphDefinitionArgs.builder()
                        .alertId("1234")
                        .vizType("timeseries")
                        .title("Widget Title")
                        .liveSpan("1h")
                        .build())
                    .build())
                .build());
    
            var screen = new Dashboard("screen", DashboardArgs.builder()
                .title("TF Test Free Layout Dashboard")
                .description("Created using the Datadog provider in Pulumi")
                .layoutType("free")
                .isReadOnly(false)
                .widgets(DashboardWidgetArgs.builder()
                    .eventStreamDefinition(DashboardWidgetEventStreamDefinitionArgs.builder()
                        .query("*")
                        .eventSize("l")
                        .title("Widget Title")
                        .titleSize(16)
                        .titleAlign("left")
                        .liveSpan("1h")
                        .build())
                    .widgetLayout(DashboardWidgetWidgetLayoutArgs.builder()
                        .height(43)
                        .width(32)
                        .x(5)
                        .y(5)
                        .build())
                    .build())
                .build());
    
            // Create a new Dashboard List with two Dashboards
            var newList = new DashboardList("newList", DashboardListArgs.builder()
                .name("Automated Created List")
                .dashItems(            
                    DashboardListDashItemArgs.builder()
                        .type("custom_timeboard")
                        .dashId(time.id())
                        .build(),
                    DashboardListDashItemArgs.builder()
                        .type("custom_screenboard")
                        .dashId(screen.id())
                        .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(                
                        screen,
                        time)
                    .build());
    
        }
    }
    
    resources:
      # Create a new Dashboard List with two Dashboards
      newList:
        type: datadog:DashboardList
        name: new_list
        properties:
          name: Automated Created List
          dashItems:
            - type: custom_timeboard
              dashId: ${time.id}
            - type: custom_screenboard
              dashId: ${screen.id}
        options:
          dependson:
            - ${screen}
            - ${time}
      time:
        type: datadog:Dashboard
        properties:
          title: TF Test Layout Dashboard
          description: Created using the Datadog provider in Pulumi
          layoutType: ordered
          isReadOnly: true
          widgets:
            - alertGraphDefinition:
                alertId: '1234'
                vizType: timeseries
                title: Widget Title
                liveSpan: 1h
      screen:
        type: datadog:Dashboard
        properties:
          title: TF Test Free Layout Dashboard
          description: Created using the Datadog provider in Pulumi
          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 DashboardList Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DashboardList(name: string, args: DashboardListArgs, opts?: CustomResourceOptions);
    @overload
    def DashboardList(resource_name: str,
                      args: DashboardListArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def DashboardList(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      name: Optional[str] = None,
                      dash_items: Optional[Sequence[DashboardListDashItemArgs]] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var dashboardListResource = new Datadog.DashboardList("dashboardListResource", new()
    {
        Name = "string",
        DashItems = new[]
        {
            new Datadog.Inputs.DashboardListDashItemArgs
            {
                DashId = "string",
                Type = "string",
            },
        },
    });
    
    example, err := datadog.NewDashboardList(ctx, "dashboardListResource", &datadog.DashboardListArgs{
    	Name: pulumi.String("string"),
    	DashItems: datadog.DashboardListDashItemArray{
    		&datadog.DashboardListDashItemArgs{
    			DashId: pulumi.String("string"),
    			Type:   pulumi.String("string"),
    		},
    	},
    })
    
    var dashboardListResource = new DashboardList("dashboardListResource", DashboardListArgs.builder()
        .name("string")
        .dashItems(DashboardListDashItemArgs.builder()
            .dashId("string")
            .type("string")
            .build())
        .build());
    
    dashboard_list_resource = datadog.DashboardList("dashboardListResource",
        name="string",
        dash_items=[{
            "dash_id": "string",
            "type": "string",
        }])
    
    const dashboardListResource = new datadog.DashboardList("dashboardListResource", {
        name: "string",
        dashItems: [{
            dashId: "string",
            type: "string",
        }],
    });
    
    type: datadog:DashboardList
    properties:
        dashItems:
            - dashId: string
              type: string
        name: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DashboardList resource accepts the following input properties:

    Name string
    The name of the Dashboard List
    DashItems List<DashboardListDashItem>
    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 List<DashboardListDashItem>
    A set of dashboard items that belong to this list
    name string
    The name of the Dashboard List
    dashItems DashboardListDashItem[]
    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<Property Map>
    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 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<DashboardListDashItem>
    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 List<DashboardListDashItem>
    A set of dashboard items that belong to this list
    name String
    The name of the Dashboard List
    dashItems DashboardListDashItem[]
    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<Property Map>
    A set of dashboard items that belong to this list
    name String
    The name of the Dashboard List

    Supporting Types

    DashboardListDashItem, DashboardListDashItemArgs

    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
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.36.1 published on Friday, Nov 15, 2024 by Pulumi