Class 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""
]
}}
}}
}}
}}
}}
}}
"),
});
}
}
Inherited Members
Namespace: Pulumi.Azure.Dashboard
Assembly: Pulumi.Azure.dll
Syntax
public class Dashboard : CustomResource
Constructors
View SourceDashboard(String, DashboardArgs, CustomResourceOptions)
Create a Dashboard resource with the given unique name, arguments, and options.
Declaration
public Dashboard(string name, DashboardArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DashboardArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDashboardProperties
JSON data representing dashboard body. See above for details on how to obtain this from the Portal.
Declaration
public Output<string> DashboardProperties { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Location
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Declaration
public Output<string> Location { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Specifies the name of the Shared Dashboard. This should be be 64 chars max, only alphanumeric and hyphens (no spaces). For a more friendly display name, add the hidden-title tag.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the resource group in which to create the dashboard.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A mapping of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
Methods
View SourceGet(String, Input<String>, DashboardState, CustomResourceOptions)
Get an existing Dashboard resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Dashboard Get(string name, Input<string> id, DashboardState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DashboardState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Dashboard |