rootly logo
Rootly v0.1.22, May 25 23

rootly.Dashboard

Explore with Pulumi AI

Manages dashboards.

Example Usage

using Pulumi;
using Rootly = Pulumi.Rootly;

class MyStack : Stack
{
    public MyStack()
    {
        var overview = new Rootly.Dashboard("overview", new Rootly.DashboardArgs
        {
        });
        var incidentsBySeverity = new Rootly.DashboardPanel("incidentsBySeverity", new Rootly.DashboardPanelArgs
        {
            DashboardId = rootly_dashboard.Foo.Id,
            Params = new Rootly.Inputs.DashboardPanelParamsArgs
            {
                Display = "line_chart",
                Datasets = 
                {
                    new Rootly.Inputs.DashboardPanelParamsDatasetArgs
                    {
                        Collection = "incidents",
                        Filters = 
                        {
                            new Rootly.Inputs.DashboardPanelParamsDatasetFilterArgs
                            {
                                Operation = "and",
                                Rules = 
                                {
                                    new Rootly.Inputs.DashboardPanelParamsDatasetFilterRuleArgs
                                    {
                                        Operation = "and",
                                        Condition = "=",
                                        Key = "status",
                                        Value = "started",
                                    },
                                },
                            },
                        },
                        GroupBy = "severity",
                        Aggregate = new Rootly.Inputs.DashboardPanelParamsDatasetAggregateArgs
                        {
                            Cumulative = false,
                            Key = "results",
                            Operation = "count",
                        },
                    },
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-rootly/sdk/go/rootly"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rootly.NewDashboard(ctx, "overview", nil)
		if err != nil {
			return err
		}
		_, err = rootly.NewDashboardPanel(ctx, "incidentsBySeverity", &rootly.DashboardPanelArgs{
			DashboardId: pulumi.Any(rootly_dashboard.Foo.Id),
			Params: &DashboardPanelParamsArgs{
				Display: pulumi.String("line_chart"),
				Datasets: DashboardPanelParamsDatasetArray{
					&DashboardPanelParamsDatasetArgs{
						Collection: pulumi.String("incidents"),
						Filters: DashboardPanelParamsDatasetFilterArray{
							&DashboardPanelParamsDatasetFilterArgs{
								Operation: pulumi.String("and"),
								Rules: DashboardPanelParamsDatasetFilterRuleArray{
									&DashboardPanelParamsDatasetFilterRuleArgs{
										Operation: pulumi.String("and"),
										Condition: pulumi.String("="),
										Key:       pulumi.String("status"),
										Value:     pulumi.String("started"),
									},
								},
							},
						},
						GroupBy: pulumi.String("severity"),
						Aggregate: &DashboardPanelParamsDatasetAggregateArgs{
							Cumulative: pulumi.Bool(false),
							Key:        pulumi.String("results"),
							Operation:  pulumi.String("count"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_rootly as rootly

overview = rootly.Dashboard("overview")
incidents_by_severity = rootly.DashboardPanel("incidentsBySeverity",
    dashboard_id=rootly_dashboard["foo"]["id"],
    params=rootly.DashboardPanelParamsArgs(
        display="line_chart",
        datasets=[rootly.DashboardPanelParamsDatasetArgs(
            collection="incidents",
            filters=[rootly.DashboardPanelParamsDatasetFilterArgs(
                operation="and",
                rules=[rootly.DashboardPanelParamsDatasetFilterRuleArgs(
                    operation="and",
                    condition="=",
                    key="status",
                    value="started",
                )],
            )],
            group_by="severity",
            aggregate=rootly.DashboardPanelParamsDatasetAggregateArgs(
                cumulative=False,
                key="results",
                operation="count",
            ),
        )],
    ))
import * as pulumi from "@pulumi/pulumi";
import * as rootly from "@pulumi/rootly";

const overview = new rootly.Dashboard("overview", {});
const incidentsBySeverity = new rootly.DashboardPanel("incidentsBySeverity", {
    dashboardId: rootly_dashboard.foo.id,
    params: {
        display: "line_chart",
        datasets: [{
            collection: "incidents",
            filters: [{
                operation: "and",
                rules: [{
                    operation: "and",
                    condition: "=",
                    key: "status",
                    value: "started",
                }],
            }],
            groupBy: "severity",
            aggregate: {
                cumulative: false,
                key: "results",
                operation: "count",
            },
        }],
    },
});

Coming soon!

Create Dashboard Resource

new Dashboard(name: string, args?: DashboardArgs, opts?: CustomResourceOptions);
@overload
def Dashboard(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              name: Optional[str] = None,
              owner: Optional[str] = None,
              public: Optional[bool] = None)
@overload
def Dashboard(resource_name: str,
              args: Optional[DashboardArgs] = None,
              opts: Optional[ResourceOptions] = None)
func NewDashboard(ctx *Context, name string, args *DashboardArgs, opts ...ResourceOption) (*Dashboard, error)
public Dashboard(string name, DashboardArgs? args = null, CustomResourceOptions? opts = null)
public Dashboard(String name, DashboardArgs args)
public Dashboard(String name, DashboardArgs args, CustomResourceOptions options)
type: rootly:Dashboard
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DashboardArgs
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 DashboardArgs
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 DashboardArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DashboardArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DashboardArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Dashboard 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 Dashboard resource accepts the following input properties:

Name string

The name of the dashboard

Owner string

Whether the dashboard is owned by organization or user.

Public bool

Whether the dashboard is public

Name string

The name of the dashboard

Owner string

Whether the dashboard is owned by organization or user.

Public bool

Whether the dashboard is public

name String

The name of the dashboard

owner String

Whether the dashboard is owned by organization or user.

public_ Boolean

Whether the dashboard is public

name string

The name of the dashboard

owner string

Whether the dashboard is owned by organization or user.

public boolean

Whether the dashboard is public

name str

The name of the dashboard

owner str

Whether the dashboard is owned by organization or user.

public bool

Whether the dashboard is public

name String

The name of the dashboard

owner String

Whether the dashboard is owned by organization or user.

public Boolean

Whether the dashboard is public

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Slug string

The slug of the dashboard

UserId int

The user_id of the dashboard, for dashboards with owner == user

Id string

The provider-assigned unique ID for this managed resource.

Slug string

The slug of the dashboard

UserId int

The user_id of the dashboard, for dashboards with owner == user

id String

The provider-assigned unique ID for this managed resource.

slug String

The slug of the dashboard

userId Integer

The user_id of the dashboard, for dashboards with owner == user

id string

The provider-assigned unique ID for this managed resource.

slug string

The slug of the dashboard

userId number

The user_id of the dashboard, for dashboards with owner == user

id str

The provider-assigned unique ID for this managed resource.

slug str

The slug of the dashboard

user_id int

The user_id of the dashboard, for dashboards with owner == user

id String

The provider-assigned unique ID for this managed resource.

slug String

The slug of the dashboard

userId Number

The user_id of the dashboard, for dashboards with owner == user

Look up Existing Dashboard Resource

Get an existing Dashboard 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?: DashboardState, opts?: CustomResourceOptions): Dashboard
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None,
        owner: Optional[str] = None,
        public: Optional[bool] = None,
        slug: Optional[str] = None,
        user_id: Optional[int] = None) -> Dashboard
func GetDashboard(ctx *Context, name string, id IDInput, state *DashboardState, opts ...ResourceOption) (*Dashboard, error)
public static Dashboard Get(string name, Input<string> id, DashboardState? state, CustomResourceOptions? opts = null)
public static Dashboard get(String name, Output<String> id, DashboardState 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:
Name string

The name of the dashboard

Owner string

Whether the dashboard is owned by organization or user.

Public bool

Whether the dashboard is public

Slug string

The slug of the dashboard

UserId int

The user_id of the dashboard, for dashboards with owner == user

Name string

The name of the dashboard

Owner string

Whether the dashboard is owned by organization or user.

Public bool

Whether the dashboard is public

Slug string

The slug of the dashboard

UserId int

The user_id of the dashboard, for dashboards with owner == user

name String

The name of the dashboard

owner String

Whether the dashboard is owned by organization or user.

public_ Boolean

Whether the dashboard is public

slug String

The slug of the dashboard

userId Integer

The user_id of the dashboard, for dashboards with owner == user

name string

The name of the dashboard

owner string

Whether the dashboard is owned by organization or user.

public boolean

Whether the dashboard is public

slug string

The slug of the dashboard

userId number

The user_id of the dashboard, for dashboards with owner == user

name str

The name of the dashboard

owner str

Whether the dashboard is owned by organization or user.

public bool

Whether the dashboard is public

slug str

The slug of the dashboard

user_id int

The user_id of the dashboard, for dashboards with owner == user

name String

The name of the dashboard

owner String

Whether the dashboard is owned by organization or user.

public Boolean

Whether the dashboard is public

slug String

The slug of the dashboard

userId Number

The user_id of the dashboard, for dashboards with owner == user

Package Details

Repository
rootly rootlyhq/pulumi-rootly
License
Apache-2.0
Notes

This Pulumi package is based on the rootly Terraform Provider.