This page documents the language specification for the azure package. If you're looking for help working with the inputs, outputs, or functions of azure resources in a Pulumi program, please see the resource documentation for examples and API reference.

dashboard

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

class pulumi_azure.dashboard.Dashboard(resource_name, opts=None, dashboard_properties=None, location=None, name=None, resource_group_name=None, tags=None, __props__=None, __name__=None, __opts__=None)

Manages a shared dashboard in the Azure Portal.

import pulumi
import pulumi_azure as azure

config = pulumi.Config()
md_content = config.get("mdContent")
if md_content is None:
    md_content = "# Hello all :)"
video_link = config.get("videoLink")
if video_link is None:
    video_link = "https://www.youtube.com/watch?v=......"
current = azure.core.get_subscription()
my_group = azure.core.ResourceGroup("my-group", location="uksouth")
my_board = azure.dashboard.Dashboard("my-board",
    resource_group_name=my_group.name,
    location=my_group.location,
    tags={
        "source": "managed",
    },
    dashboard_properties=f"""{{
   "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": "{md_content}",
                                    "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": "{video_link}",
                                    "autoplay": true
                                }}
                            }}
                        }}
                    }}
                }},
                "2": {{
                    "position": {{
                        "x": 0,
                        "y": 4,
                        "rowSpan": 4,
                        "colSpan": 6
                    }},
                    "metadata": {{
                        "inputs": [
                            {{
                                "name": "ComponentId",
                                "value": "/subscriptions/{current.subscription_id}/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"
                        ]
                    }}
                }}
            }}
        }}
    }}
}}
""")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • dashboard_properties (pulumi.Input[str]) – JSON data representing dashboard body. See above for details on how to obtain this from the Portal.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – 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.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the dashboard.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

dashboard_properties: pulumi.Output[str] = None

JSON data representing dashboard body. See above for details on how to obtain this from the Portal.

location: pulumi.Output[str] = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name: pulumi.Output[str] = None

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.

resource_group_name: pulumi.Output[str] = None

The name of the resource group in which to create the dashboard.

tags: pulumi.Output[dict] = None

A mapping of tags to assign to the resource.

static get(resource_name, id, opts=None, dashboard_properties=None, location=None, name=None, resource_group_name=None, tags=None)

Get an existing Dashboard resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • dashboard_properties (pulumi.Input[str]) – JSON data representing dashboard body. See above for details on how to obtain this from the Portal.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – 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.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the dashboard.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str