Skip to content

Commit 3a7a949

Browse files
committed
Refresh create dashboards programmatically
1 parent 8a35442 commit 3a7a949

File tree

6 files changed

+12
-19
lines changed

6 files changed

+12
-19
lines changed

articles/azure-portal/azure-portal-dashboards-create-programmatically.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ ms.devlang: NA
1212
ms.topic: conceptual
1313
ms.tgt_pltfrm: NA
1414
ms.workload: na
15-
ms.date: 01/29/2020
15+
ms.date: 03/23/2020
1616
ms.author: mblythe
1717

1818
---
1919
# Programmatically create Azure Dashboards
2020

21-
This document walks through the process of programmatically creating and publishing Azure dashboards. The dashboard shown below is referenced throughout the document.
21+
This article walks you through the process of programmatically creating and publishing Azure dashboards. The dashboard shown below is referenced throughout the document.
2222

2323
![sample dashboard](./media/azure-portal-dashboards-create-programmatically/sample-dashboard.png)
2424

2525
## Overview
2626

27-
Shared dashboards in the [Azure portal](https://portal.azure.com) are [resources](../azure-resource-manager/management/overview.md) just like virtual machines and storage accounts. You can manage resources programmatically by using the [Azure Resource Manager REST APIs](/rest/api/), the [Azure CLI](/cli/azure), and [Azure PowerShell commands](/powershell/azure/get-started-azureps).
27+
Shared dashboards in the [Azure portal](https://portal.azure.com) are [resources](../azure-resource-manager/management/overview.md) just like virtual machines and storage accounts. You can manage resources programmatically by using the [Azure Resource Manager REST APIs](/rest/api/), the [Azure CLI](/cli/azure), and [Azure PowerShell commands](/powershell/azure/get-started-azureps).
2828

2929
Many features build on these APIs to make resource management easier. Each of these APIs and tools offers ways to create, list, retrieve, modify, and delete resources. Since dashboards are resources, you can pick your favorite API or tool to use.
3030

31-
Whichever tools you use, you need to construct a JSON representation of your dashboard object. This object contains information about the tiles on the dashboard. It includes sizes, positions, resources they're bound to, and any user customizations.
31+
Whichever tools you use, to create a dashboard programmatically, you construct a JSON representation of your dashboard object. This object contains information about the tiles on the dashboard. It includes sizes, positions, resources they're bound to, and any user customizations.
3232

3333
The most practical way to build up this JSON document is to use the Azure portal. You can interactively add and position your tiles. Then export the JSON and create a template from the result for later use in scripts, programs, and deployment tools.
3434

@@ -48,7 +48,7 @@ Others have fixed sizes to choose from in their context menu.
4848

4949
## Share the dashboard
5050

51-
After you configure the dashboard, the next steps are to publish the dashboard using the **Share** command and then use the Resource Explorer to fetch the JSON.
51+
After you configure the dashboard, the next step is to publish the dashboard using the **Share** command.
5252

5353
![sharing a dashboard](./media/azure-portal-dashboards-create-programmatically/share-command.png)
5454

@@ -58,13 +58,9 @@ Selecting **Share** prompts you to choose which subscription and resource group
5858

5959
## Fetch the JSON representation of the dashboard
6060

61-
Publishing only takes a few seconds. When it's done, the next step is to go to the [Resource Explorer](https://portal.azure.com/#blade/HubsExtension/ArmExplorerBlade) to fetch the JSON.
61+
Publishing only takes a few seconds. When it's done, the next step is to fetch the JSON using the **Download** command.
6262

63-
![browse Resource Explorer](./media/azure-portal-dashboards-create-programmatically/search-resource-explorer.png)
64-
65-
From the Resource Explorer, navigate to the subscription and resource group that you chose. Next, select the newly published dashboard resource to reveal the JSON.
66-
67-
![view JSON in Resource Explorer](./media/azure-portal-dashboards-create-programmatically/resource-explorer-json-detail.png)
63+
![download JSON representation](./media/azure-portal-dashboards-create-programmatically/download-command.png)
6864

6965
## Create a template from the JSON
7066

@@ -123,21 +119,18 @@ Declare required template metadata and the parameters at the top of the JSON tem
123119

124120
... rest of template omitted ...
125121
```
126-
127-
You can see the full, working template at the end of this document.
128-
129122
Once you've configured your template, deploy it using any of the following methods:
130123

131124
* [REST APIs](/rest/api/resources/deployments)
132125
* [PowerShell](../azure-resource-manager/resource-group-template-deploy.md)
133126
* [Azure CLI](/cli/azure/group/deployment#az-group-deployment-create)
134127
* [The Azure portal template deployment page](https://portal.azure.com/#create/Microsoft.Template)
135128

136-
Here are two versions of our example dashboard JSON. The first is the version that we exported from the portal that was already bound to a resource. The second is the template version that can be programmatically bound to any virtual machine and deployed using Azure Resource Manager.
129+
Next you'll see two versions of our example dashboard JSON. The first is the version that we exported from the portal that was already bound to a resource. The second is the template version that can be programmatically bound to any virtual machine and deployed using Azure Resource Manager.
137130

138-
## JSON representation of our example dashboard before templating
131+
### JSON representation of our example dashboard before templating
139132

140-
This example shows what you can expect to see if you followed along with this article. The instructions exported the JSON representation of a dashboard that is already deployed. The hard-coded resource identifiers that show that this dashboard is pointing at a specific Azure virtual machine.
133+
This example shows what you can expect to see if you followed along with this article. The instructions exported the JSON representation of a dashboard that is already deployed. The hard-coded resource identifiers show that this dashboard is pointing at a specific Azure virtual machine.
141134

142135
```json
143136

@@ -659,6 +652,6 @@ This example deploys a dashboard by itself, but the template language lets you d
659652
}
660653
]
661654
}
662-
663-
664655
```
656+
657+
Now that you've seen an example of using a parameterized template to deploy a dashboard, you can try deploying the template by using the [Azure Resource Manager REST APIs](/rest/api/), the [Azure CLI](/cli/azure), or [Azure PowerShell commands](/powershell/azure/get-started-azureps).
8.7 KB
Loading
-7.16 KB
Loading

0 commit comments

Comments
 (0)