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

rootly.DashboardPanel

Explore with Pulumi AI

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

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

    Constructor syntax

    new DashboardPanel(name: string, args: DashboardPanelArgs, opts?: CustomResourceOptions);
    @overload
    def DashboardPanel(resource_name: str,
                       args: DashboardPanelArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def DashboardPanel(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       dashboard_id: Optional[str] = None,
                       params: Optional[DashboardPanelParamsArgs] = None,
                       name: Optional[str] = None,
                       position: Optional[DashboardPanelPositionArgs] = 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.
    
    

    Parameters

    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.

    Constructor example

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

    var dashboardPanelResource = new Rootly.DashboardPanel("dashboardPanelResource", new()
    {
        DashboardId = "string",
        Params = new Rootly.Inputs.DashboardPanelParamsArgs
        {
            Display = "string",
            Datasets = new[]
            {
                new Rootly.Inputs.DashboardPanelParamsDatasetArgs
                {
                    Collection = "string",
                    Aggregate = new Rootly.Inputs.DashboardPanelParamsDatasetAggregateArgs
                    {
                        Cumulative = false,
                        Key = "string",
                        Operation = "string",
                    },
                    Filters = new[]
                    {
                        new Rootly.Inputs.DashboardPanelParamsDatasetFilterArgs
                        {
                            Operation = "string",
                            Rules = new[]
                            {
                                new Rootly.Inputs.DashboardPanelParamsDatasetFilterRuleArgs
                                {
                                    Condition = "string",
                                    Key = "string",
                                    Operation = "string",
                                    Value = "string",
                                },
                            },
                        },
                    },
                    GroupBy = "string",
                    Name = "string",
                },
            },
            Legend = new Rootly.Inputs.DashboardPanelParamsLegendArgs
            {
                Groups = "string",
            },
        },
        Name = "string",
        Position = new Rootly.Inputs.DashboardPanelPositionArgs
        {
            H = 0,
            W = 0,
            X = 0,
            Y = 0,
        },
    });
    
    example, err := rootly.NewDashboardPanel(ctx, "dashboardPanelResource", &rootly.DashboardPanelArgs{
    	DashboardId: pulumi.String("string"),
    	Params: &rootly.DashboardPanelParamsArgs{
    		Display: pulumi.String("string"),
    		Datasets: rootly.DashboardPanelParamsDatasetArray{
    			&rootly.DashboardPanelParamsDatasetArgs{
    				Collection: pulumi.String("string"),
    				Aggregate: &rootly.DashboardPanelParamsDatasetAggregateArgs{
    					Cumulative: pulumi.Bool(false),
    					Key:        pulumi.String("string"),
    					Operation:  pulumi.String("string"),
    				},
    				Filters: rootly.DashboardPanelParamsDatasetFilterArray{
    					&rootly.DashboardPanelParamsDatasetFilterArgs{
    						Operation: pulumi.String("string"),
    						Rules: rootly.DashboardPanelParamsDatasetFilterRuleArray{
    							&rootly.DashboardPanelParamsDatasetFilterRuleArgs{
    								Condition: pulumi.String("string"),
    								Key:       pulumi.String("string"),
    								Operation: pulumi.String("string"),
    								Value:     pulumi.String("string"),
    							},
    						},
    					},
    				},
    				GroupBy: pulumi.String("string"),
    				Name:    pulumi.String("string"),
    			},
    		},
    		Legend: &rootly.DashboardPanelParamsLegendArgs{
    			Groups: pulumi.String("string"),
    		},
    	},
    	Name: pulumi.String("string"),
    	Position: &rootly.DashboardPanelPositionArgs{
    		H: pulumi.Int(0),
    		W: pulumi.Int(0),
    		X: pulumi.Int(0),
    		Y: pulumi.Int(0),
    	},
    })
    
    var dashboardPanelResource = new DashboardPanel("dashboardPanelResource", DashboardPanelArgs.builder()
        .dashboardId("string")
        .params(DashboardPanelParamsArgs.builder()
            .display("string")
            .datasets(DashboardPanelParamsDatasetArgs.builder()
                .collection("string")
                .aggregate(DashboardPanelParamsDatasetAggregateArgs.builder()
                    .cumulative(false)
                    .key("string")
                    .operation("string")
                    .build())
                .filters(DashboardPanelParamsDatasetFilterArgs.builder()
                    .operation("string")
                    .rules(DashboardPanelParamsDatasetFilterRuleArgs.builder()
                        .condition("string")
                        .key("string")
                        .operation("string")
                        .value("string")
                        .build())
                    .build())
                .groupBy("string")
                .name("string")
                .build())
            .legend(DashboardPanelParamsLegendArgs.builder()
                .groups("string")
                .build())
            .build())
        .name("string")
        .position(DashboardPanelPositionArgs.builder()
            .h(0)
            .w(0)
            .x(0)
            .y(0)
            .build())
        .build());
    
    dashboard_panel_resource = rootly.DashboardPanel("dashboardPanelResource",
        dashboard_id="string",
        params=rootly.DashboardPanelParamsArgs(
            display="string",
            datasets=[rootly.DashboardPanelParamsDatasetArgs(
                collection="string",
                aggregate=rootly.DashboardPanelParamsDatasetAggregateArgs(
                    cumulative=False,
                    key="string",
                    operation="string",
                ),
                filters=[rootly.DashboardPanelParamsDatasetFilterArgs(
                    operation="string",
                    rules=[rootly.DashboardPanelParamsDatasetFilterRuleArgs(
                        condition="string",
                        key="string",
                        operation="string",
                        value="string",
                    )],
                )],
                group_by="string",
                name="string",
            )],
            legend=rootly.DashboardPanelParamsLegendArgs(
                groups="string",
            ),
        ),
        name="string",
        position=rootly.DashboardPanelPositionArgs(
            h=0,
            w=0,
            x=0,
            y=0,
        ))
    
    const dashboardPanelResource = new rootly.DashboardPanel("dashboardPanelResource", {
        dashboardId: "string",
        params: {
            display: "string",
            datasets: [{
                collection: "string",
                aggregate: {
                    cumulative: false,
                    key: "string",
                    operation: "string",
                },
                filters: [{
                    operation: "string",
                    rules: [{
                        condition: "string",
                        key: "string",
                        operation: "string",
                        value: "string",
                    }],
                }],
                groupBy: "string",
                name: "string",
            }],
            legend: {
                groups: "string",
            },
        },
        name: "string",
        position: {
            h: 0,
            w: 0,
            x: 0,
            y: 0,
        },
    });
    
    type: rootly:DashboardPanel
    properties:
        dashboardId: string
        name: string
        params:
            datasets:
                - aggregate:
                    cumulative: false
                    key: string
                    operation: string
                  collection: string
                  filters:
                    - operation: string
                      rules:
                        - condition: string
                          key: string
                          operation: string
                          value: string
                  groupBy: string
                  name: string
            display: string
            legend:
                groups: string
        position:
            h: 0
            w: 0
            x: 0
            "y": 0
    

    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
    Position DashboardPanelPosition
    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
    Position DashboardPanelPositionArgs
    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
    position DashboardPanelPosition
    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
    position DashboardPanelPosition
    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
    position DashboardPanelPositionArgs
    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
    position Property Map

    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,
            position: Optional[DashboardPanelPositionArgs] = 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.
    Position DashboardPanelPosition
    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.
    Position DashboardPanelPositionArgs
    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.
    position DashboardPanelPosition
    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.
    position DashboardPanelPosition
    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.
    position DashboardPanelPositionArgs
    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.
    position Property Map

    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

    DashboardPanelParamsLegend, DashboardPanelParamsLegendArgs

    Groups string
    Groups string
    groups String
    groups string
    groups str
    groups String

    DashboardPanelPosition, DashboardPanelPositionArgs

    H int
    W int
    X int
    Y int
    H int
    W int
    X int
    Y int
    h Integer
    w Integer
    x Integer
    y Integer
    h number
    w number
    x number
    y number
    h int
    w int
    x int
    y int
    h Number
    w Number
    x Number
    y Number

    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