Show / Hide Table of Contents

Namespace Pulumi.Azure.Dashboard

Classes

Dashboard

Manages a shared dashboard in the Azure Portal.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
public MyStack()
{
    var config = new Config();
    var mdContent = config.Get("mdContent") ?? "# Hello all :)";
    var videoLink = config.Get("videoLink") ?? "https://www.youtube.com/watch?v=......";
    var current = Output.Create(Azure.Core.GetSubscription.InvokeAsync());
    var my_group = new Azure.Core.ResourceGroup("my-group", new Azure.Core.ResourceGroupArgs
    {
        Location = "uksouth",
    });
    var my_board = new Azure.Dashboard.Dashboard("my-board", new Azure.Dashboard.DashboardArgs
    {
        ResourceGroupName = my_group.Name,
        Location = my_group.Location,
        Tags = 
        {
            { "source", "managed" },
        },
        DashboardProperties = current.Apply(current => @$"{{
""lenses"": {{
    ""0"": {{
        ""order"": 0,
        ""parts"": {{
            ""0"": {{
                ""position"": {{
                    ""x"": 0,
                    ""y"": 0,
                    ""rowSpan"": 2,
                    ""colSpan"": 3
                }},
                ""metadata"": {{
                    ""inputs"": [],
                    ""type"": ""Extension/HubsExtension/PartType/MarkdownPart"",
                    ""settings"": {{
                        ""content"": {{
                            ""settings"": {{
                                ""content"": ""{mdContent}"",
                                ""subtitle"": """",
                                ""title"": """"
                            }}
                        }}
                    }}
                }}
            }},               
            ""1"": {{
                ""position"": {{
                    ""x"": 5,
                    ""y"": 0,
                    ""rowSpan"": 4,
                    ""colSpan"": 6
                }},
                ""metadata"": {{
                    ""inputs"": [],
                    ""type"": ""Extension/HubsExtension/PartType/VideoPart"",
                    ""settings"": {{
                        ""content"": {{
                            ""settings"": {{
                                ""title"": ""Important Information"",
                                ""subtitle"": """",
                                ""src"": ""{videoLink}"",
                                ""autoplay"": true
                            }}
                        }}
                    }}
                }}
            }},
            ""2"": {{
                ""position"": {{
                    ""x"": 0,
                    ""y"": 4,
                    ""rowSpan"": 4,
                    ""colSpan"": 6
                }},
                ""metadata"": {{
                    ""inputs"": [
                        {{
                            ""name"": ""ComponentId"",
                            ""value"": ""/subscriptions/{current.SubscriptionId}/resourceGroups/myRG/providers/microsoft.insights/components/myWebApp""
                        }}
                    ],
                    ""type"": ""Extension/AppInsightsExtension/PartType/AppMapGalPt"",
                    ""settings"": {{}},
                    ""asset"": {{
                        ""idInputName"": ""ComponentId"",
                        ""type"": ""ApplicationInsights""
                    }}
                }}
            }}              
        }}
    }}
}},
""metadata"": {{
    ""model"": {{
        ""timeRange"": {{
            ""value"": {{
                ""relative"": {{
                    ""duration"": 24,
                    ""timeUnit"": 1
                }}
            }},
            ""type"": ""MsPortalFx.Composition.Configuration.ValueTypes.TimeRange""
        }},
        ""filterLocale"": {{
            ""value"": ""en-us""
        }},
        ""filters"": {{
            ""value"": {{
                ""MsPortalFx_TimeRange"": {{
                    ""model"": {{
                        ""format"": ""utc"",
                        ""granularity"": ""auto"",
                        ""relative"": ""24h""
                    }},
                    ""displayCache"": {{
                        ""name"": ""UTC Time"",
                        ""value"": ""Past 24 hours""
                    }},
                    ""filteredPartIds"": [
                        ""StartboardPart-UnboundPart-ae44fef5-76b8-46b0-86f0-2b3f47bad1c7""
                    ]
                }}
            }}
        }}
    }}
}}
}}
"),
    });
}

}

DashboardArgs

DashboardState

Back to top Copyright 2016-2020, Pulumi Corporation.