1. Packages
  2. Rootly
  3. API Docs
  4. Dashboard
Rootly v1.5.0 published on Thursday, Apr 25, 2024 by Rootly

rootly.Dashboard

Explore with Pulumi AI

rootly logo
Rootly v1.5.0 published on Thursday, Apr 25, 2024 by Rootly

    Manages dashboards.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rootly = Pulumi.Rootly;
    
    return await Deployment.RunAsync(() => 
    {
        var overview = new Rootly.Dashboard("overview");
    
        var incidentsBySeverity = new Rootly.DashboardPanel("incidentsBySeverity", new()
        {
            DashboardId = rootly_dashboard.Foo.Id,
            Params = new Rootly.Inputs.DashboardPanelParamsArgs
            {
                Display = "line_chart",
                Datasets = new[]
                {
                    new Rootly.Inputs.DashboardPanelParamsDatasetArgs
                    {
                        Collection = "incidents",
                        Filters = new[]
                        {
                            new Rootly.Inputs.DashboardPanelParamsDatasetFilterArgs
                            {
                                Operation = "and",
                                Rules = new[]
                                {
                                    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: &rootly.DashboardPanelParamsArgs{
    				Display: pulumi.String("line_chart"),
    				Datasets: rootly.DashboardPanelParamsDatasetArray{
    					&rootly.DashboardPanelParamsDatasetArgs{
    						Collection: pulumi.String("incidents"),
    						Filters: rootly.DashboardPanelParamsDatasetFilterArray{
    							&rootly.DashboardPanelParamsDatasetFilterArgs{
    								Operation: pulumi.String("and"),
    								Rules: rootly.DashboardPanelParamsDatasetFilterRuleArray{
    									&rootly.DashboardPanelParamsDatasetFilterRuleArgs{
    										Operation: pulumi.String("and"),
    										Condition: pulumi.String("="),
    										Key:       pulumi.String("status"),
    										Value:     pulumi.String("started"),
    									},
    								},
    							},
    						},
    						GroupBy: pulumi.String("severity"),
    						Aggregate: &rootly.DashboardPanelParamsDatasetAggregateArgs{
    							Cumulative: pulumi.Bool(false),
    							Key:        pulumi.String("results"),
    							Operation:  pulumi.String("count"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.rootly.Dashboard;
    import com.pulumi.rootly.DashboardPanel;
    import com.pulumi.rootly.DashboardPanelArgs;
    import com.pulumi.rootly.inputs.DashboardPanelParamsArgs;
    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 overview = new Dashboard("overview");
    
            var incidentsBySeverity = new DashboardPanel("incidentsBySeverity", DashboardPanelArgs.builder()        
                .dashboardId(rootly_dashboard.foo().id())
                .params(DashboardPanelParamsArgs.builder()
                    .display("line_chart")
                    .datasets(DashboardPanelParamsDatasetArgs.builder()
                        .collection("incidents")
                        .filters(DashboardPanelParamsDatasetFilterArgs.builder()
                            .operation("and")
                            .rules(DashboardPanelParamsDatasetFilterRuleArgs.builder()
                                .operation("and")
                                .condition("=")
                                .key("status")
                                .value("started")
                                .build())
                            .build())
                        .groupBy("severity")
                        .aggregate(DashboardPanelParamsDatasetAggregateArgs.builder()
                            .cumulative(false)
                            .key("results")
                            .operation("count")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    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",
                },
            }],
        },
    });
    
    resources:
      overview:
        type: rootly:Dashboard
      incidentsBySeverity:
        type: rootly:DashboardPanel
        properties:
          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
    

    Create Dashboard Resource

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

    Constructor syntax

    new Dashboard(name: string, args?: DashboardArgs, opts?: CustomResourceOptions);
    @overload
    def Dashboard(resource_name: str,
                  args: Optional[DashboardArgs] = None,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Dashboard(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  name: Optional[str] = None,
                  owner: Optional[str] = None,
                  public: Optional[bool] = 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.
    
    

    Parameters

    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.

    Constructor example

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

    var dashboardResource = new Rootly.Dashboard("dashboardResource", new()
    {
        Name = "string",
        Owner = "string",
        Public = false,
    });
    
    example, err := rootly.NewDashboard(ctx, "dashboardResource", &rootly.DashboardArgs{
    	Name:   pulumi.String("string"),
    	Owner:  pulumi.String("string"),
    	Public: pulumi.Bool(false),
    })
    
    var dashboardResource = new Dashboard("dashboardResource", DashboardArgs.builder()
        .name("string")
        .owner("string")
        .public_(false)
        .build());
    
    dashboard_resource = rootly.Dashboard("dashboardResource",
        name="string",
        owner="string",
        public=False)
    
    const dashboardResource = new rootly.Dashboard("dashboardResource", {
        name: "string",
        owner: "string",
        "public": false,
    });
    
    type: rootly:Dashboard
    properties:
        name: string
        owner: string
        public: false
    

    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.
    rootly logo
    Rootly v1.5.0 published on Thursday, Apr 25, 2024 by Rootly