1. Packages
  2. Rootly
  3. API Docs
  4. DashboardPanel
Rootly v1.1.1 published on Thursday, Jan 11, 2024 by Rootly

rootly.DashboardPanel

Explore with Pulumi AI

rootly logo
Rootly v1.1.1 published on Thursday, Jan 11, 2024 by Rootly

    Manages dashboard_panels.

    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 DashboardPanel Resource

    new DashboardPanel(name: string, args: DashboardPanelArgs, opts?: CustomResourceOptions);
    @overload
    def DashboardPanel(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       dashboard_id: Optional[str] = None,
                       name: Optional[str] = None,
                       params: Optional[DashboardPanelParamsArgs] = None)
    @overload
    def DashboardPanel(resource_name: str,
                       args: DashboardPanelArgs,
                       opts: Optional[ResourceOptions] = None)
    func NewDashboardPanel(ctx *Context, name string, args DashboardPanelArgs, opts ...ResourceOption) (*DashboardPanel, error)
    public DashboardPanel(string name, DashboardPanelArgs args, CustomResourceOptions? opts = null)
    public DashboardPanel(String name, DashboardPanelArgs args)
    public DashboardPanel(String name, DashboardPanelArgs args, CustomResourceOptions options)
    
    type: rootly:DashboardPanel
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args DashboardPanelArgs
    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 DashboardPanelArgs
    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 DashboardPanelArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DashboardPanelArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DashboardPanelArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DashboardId string
    The id of the parent dashboard
    Params DashboardPanelParams
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    Name string
    The name of the dashboard_panel
    DashboardId string
    The id of the parent dashboard
    Params DashboardPanelParamsArgs
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    Name string
    The name of the dashboard_panel
    dashboardId String
    The id of the parent dashboard
    params DashboardPanelParams
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    name String
    The name of the dashboard_panel
    dashboardId string
    The id of the parent dashboard
    params DashboardPanelParams
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    name string
    The name of the dashboard_panel
    dashboard_id str
    The id of the parent dashboard
    params DashboardPanelParamsArgs
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    name str
    The name of the dashboard_panel
    dashboardId String
    The id of the parent dashboard
    params Property Map
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    name String
    The name of the dashboard_panel

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DashboardPanel 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 DashboardPanel Resource

    Get an existing DashboardPanel 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?: DashboardPanelState, opts?: CustomResourceOptions): DashboardPanel
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dashboard_id: Optional[str] = None,
            name: Optional[str] = None,
            params: Optional[DashboardPanelParamsArgs] = None) -> DashboardPanel
    func GetDashboardPanel(ctx *Context, name string, id IDInput, state *DashboardPanelState, opts ...ResourceOption) (*DashboardPanel, error)
    public static DashboardPanel Get(string name, Input<string> id, DashboardPanelState? state, CustomResourceOptions? opts = null)
    public static DashboardPanel get(String name, Output<String> id, DashboardPanelState 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:
    DashboardId string
    The id of the parent dashboard
    Name string
    The name of the dashboard_panel
    Params DashboardPanelParams
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    DashboardId string
    The id of the parent dashboard
    Name string
    The name of the dashboard_panel
    Params DashboardPanelParamsArgs
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    dashboardId String
    The id of the parent dashboard
    name String
    The name of the dashboard_panel
    params DashboardPanelParams
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    dashboardId string
    The id of the parent dashboard
    name string
    The name of the dashboard_panel
    params DashboardPanelParams
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    dashboard_id str
    The id of the parent dashboard
    name str
    The name of the dashboard_panel
    params DashboardPanelParamsArgs
    The params JSON of the dashboard_panel. See rootly API docs for schema.
    dashboardId String
    The id of the parent dashboard
    name String
    The name of the dashboard_panel
    params Property Map
    The params JSON of the dashboard_panel. See rootly API docs for schema.

    Supporting Types

    DashboardPanelParams, DashboardPanelParamsArgs

    DashboardPanelParamsDataset, DashboardPanelParamsDatasetArgs

    DashboardPanelParamsDatasetAggregate, DashboardPanelParamsDatasetAggregateArgs

    Cumulative bool
    Key string
    Operation string
    Cumulative bool
    Key string
    Operation string
    cumulative Boolean
    key String
    operation String
    cumulative boolean
    key string
    operation string
    cumulative Boolean
    key String
    operation String

    DashboardPanelParamsDatasetFilter, DashboardPanelParamsDatasetFilterArgs

    DashboardPanelParamsDatasetFilterRule, DashboardPanelParamsDatasetFilterRuleArgs

    Condition string
    Key string
    Operation string
    Value string
    Condition string
    Key string
    Operation string
    Value string
    condition String
    key String
    operation String
    value String
    condition string
    key string
    operation string
    value string
    condition String
    key String
    operation String
    value String

    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.1.1 published on Thursday, Jan 11, 2024 by Rootly