You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-portal/azure-portal-dashboards-create-programmatically.md
+12-19Lines changed: 12 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,23 +12,23 @@ ms.devlang: NA
12
12
ms.topic: conceptual
13
13
ms.tgt_pltfrm: NA
14
14
ms.workload: na
15
-
ms.date: 01/29/2020
15
+
ms.date: 03/23/2020
16
16
ms.author: mblythe
17
17
18
18
---
19
19
# Programmatically create Azure Dashboards
20
20
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.
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).
28
28
29
29
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.
30
30
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.
32
32
33
33
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.
34
34
@@ -48,7 +48,7 @@ Others have fixed sizes to choose from in their context menu.
48
48
49
49
## Share the dashboard
50
50
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.
52
52
53
53

54
54
@@ -58,13 +58,9 @@ Selecting **Share** prompts you to choose which subscription and resource group
58
58
59
59
## Fetch the JSON representation of the dashboard
60
60
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.
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
-

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.
137
130
138
-
## JSON representation of our example dashboard before templating
131
+
### JSON representation of our example dashboard before templating
139
132
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.
141
134
142
135
```json
143
136
@@ -659,6 +652,6 @@ This example deploys a dashboard by itself, but the template language lets you d
659
652
}
660
653
]
661
654
}
662
-
663
-
664
655
```
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).
0 commit comments