DashboardArgs

data class DashboardArgs(val dashboardName: Output<String>? = null, val location: Output<String>? = null, val properties: Output<DashboardPropertiesWithProvisioningStateArgs>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<DashboardArgs>

The shared dashboard resource definition. Uses Azure REST API version 2022-12-01-preview. In version 2.x of the Azure Native provider, it used API version 2020-09-01-preview. Other available API versions: 2019-01-01-preview, 2020-09-01-preview, 2025-04-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native portal [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create or update a Dashboard

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var dashboard = new AzureNative.Portal.Dashboard("dashboard", new()
{
DashboardName = "testDashboard",
Location = "eastus",
Properties = new AzureNative.Portal.Inputs.DashboardPropertiesWithProvisioningStateArgs
{
Lenses = new[]
{
new AzureNative.Portal.Inputs.DashboardLensArgs
{
Order = 1,
Parts = new[]
{
new AzureNative.Portal.Inputs.DashboardPartsArgs
{
Position = new AzureNative.Portal.Inputs.DashboardPartsPositionArgs
{
ColSpan = 3,
RowSpan = 4,
X = 1,
Y = 2,
},
},
new AzureNative.Portal.Inputs.DashboardPartsArgs
{
Position = new AzureNative.Portal.Inputs.DashboardPartsPositionArgs
{
ColSpan = 6,
RowSpan = 6,
X = 5,
Y = 5,
},
},
},
},
new AzureNative.Portal.Inputs.DashboardLensArgs
{
Order = 2,
Parts = new() { },
},
},
Metadata = new Dictionary<string, object?>
{
["metadata"] = new Dictionary<string, object?>
{
["ColSpan"] = 2,
["RowSpan"] = 1,
["X"] = 4,
["Y"] = 3,
},
},
},
ResourceGroupName = "testRG",
Tags =
{
{ "aKey", "aValue" },
{ "anotherKey", "anotherValue" },
},
});
});
package main
import (
portal "github.com/pulumi/pulumi-azure-native-sdk/portal/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := portal.NewDashboard(ctx, "dashboard", &portal.DashboardArgs{
DashboardName: pulumi.String("testDashboard"),
Location: pulumi.String("eastus"),
Properties: &portal.DashboardPropertiesWithProvisioningStateArgs{
Lenses: portal.DashboardLensArray{
&portal.DashboardLensArgs{
Order: pulumi.Int(1),
Parts: portal.DashboardPartsArray{
&portal.DashboardPartsArgs{
Position: &portal.DashboardPartsPositionArgs{
ColSpan: pulumi.Int(3),
RowSpan: pulumi.Int(4),
X: pulumi.Int(1),
Y: pulumi.Int(2),
},
},
&portal.DashboardPartsArgs{
Position: &portal.DashboardPartsPositionArgs{
ColSpan: pulumi.Int(6),
RowSpan: pulumi.Int(6),
X: pulumi.Int(5),
Y: pulumi.Int(5),
},
},
},
},
&portal.DashboardLensArgs{
Order: pulumi.Int(2),
Parts: portal.DashboardPartsArray{},
},
},
Metadata: pulumi.Any(map[string]interface{}{
"metadata": map[string]interface{}{
"ColSpan": 2,
"RowSpan": 1,
"X": 4,
"Y": 3,
},
}),
},
ResourceGroupName: pulumi.String("testRG"),
Tags: pulumi.StringMap{
"aKey": pulumi.String("aValue"),
"anotherKey": pulumi.String("anotherValue"),
},
})
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.azurenative.portal.Dashboard;
import com.pulumi.azurenative.portal.DashboardArgs;
import com.pulumi.azurenative.portal.inputs.DashboardPropertiesWithProvisioningStateArgs;
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 dashboard = new Dashboard("dashboard", DashboardArgs.builder()
.dashboardName("testDashboard")
.location("eastus")
.properties(DashboardPropertiesWithProvisioningStateArgs.builder()
.lenses(
DashboardLensArgs.builder()
.order(1)
.parts(
DashboardPartsArgs.builder()
.position(DashboardPartsPositionArgs.builder()
.colSpan(3)
.rowSpan(4)
.x(1)
.y(2)
.build())
.build(),
DashboardPartsArgs.builder()
.position(DashboardPartsPositionArgs.builder()
.colSpan(6)
.rowSpan(6)
.x(5)
.y(5)
.build())
.build())
.build(),
DashboardLensArgs.builder()
.order(2)
.parts()
.build())
.metadata(Map.of("metadata", Map.ofEntries(
Map.entry("ColSpan", 2),
Map.entry("RowSpan", 1),
Map.entry("X", 4),
Map.entry("Y", 3)
)))
.build())
.resourceGroupName("testRG")
.tags(Map.ofEntries(
Map.entry("aKey", "aValue"),
Map.entry("anotherKey", "anotherValue")
))
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:portal:Dashboard testDashboard /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Portal/dashboards/{dashboardName}

Constructors

Link copied to clipboard
constructor(dashboardName: Output<String>? = null, location: Output<String>? = null, properties: Output<DashboardPropertiesWithProvisioningStateArgs>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val dashboardName: Output<String>? = null

The name of the dashboard.

Link copied to clipboard
val location: Output<String>? = null

The geo-location where the resource lives

Link copied to clipboard

The resource-specific properties for this resource.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Functions

Link copied to clipboard
open override fun toJava(): DashboardArgs