Network Topology (Net3D) Azure Resource Import Guide
This guide explains how to turn an Azure subscription's resource list and the connections between resources into JSON and overlay it as a separate layer on the Network Topology screen. As long as you follow the schema in this document, the JSON can be produced by any tool (including an AI) and imported as-is.
⚠️ Current premises — read first
- Manual import only. The giip server does not store Azure credentials and does not run
azon the server (multi-tenant isolation principle). The operator (or an AI acting for the operator) creates the JSON in their own environment and imports it on the screen.- Nothing is stored on the server. Imported data is kept only in the browser session (sessionStorage) and is never sent to the server. It disappears when the session ends and is replaced when you import again. There is currently no periodic/automatic refresh path.
- No secret values. The JSON contains only resource metadata and connections (edges). Never include keys, connection strings, passwords or other secrets. The
azcommands in this procedure return no secret values by design.
📋 Overview
The Azure import layer is an overlay layer separate from the server/DB graph collected by agents (the main Net3D graph).
- All nodes are drawn as spheres with a fixed color per Azure resource type (see the legend in the import panel).
- The layer is an opt-in toggle (off by default). Turn it off and only the main graph is shown.
- PaaS resources that cannot run an agent, such as App Service, can still appear in the layout through this layer. Note that it shows configuration relationships (which resource belongs where and what it connects to), not live traffic.
🚀 Quick Start
- On your own PC, run
az loginand select the target subscription. - Create the import JSON using Method 1 (the export script) or Method 2 (author it directly to the schema) below.
- On the topology screen, open Import Azure Resources and upload the file or paste the JSON.
- Turn the layer toggle on and the Azure nodes and links are overlaid on the main graph.
Method 1: Generate with the export script
A helper script in the giipv3 repository assembles nodes and edges from az output. It requires az and jq.
az login
az account set --subscription <subscription name or ID>
./scripts/net3d-azure/export-azure-topology.sh > azure-topology.json
# Or pass the subscription as an argument: ./scripts/net3d-azure/export-azure-topology.sh "giip" > azure-topology.json
What the script collects:
| Material | az command | Produces |
|---|---|---|
| Resource list | az resource list | All nodes (id·name·type·location·resourceGroup·kind) |
| Site → plan | serverFarmId from az webapp list, az functionapp list | hostedOn edges |
| SQL DB → SQL server | Resource ID hierarchy (the part before /databases/) | childOf edges |
| Subnet → VNet | Resource ID hierarchy (the part before /subnets/) | childOf edges |
| Private Endpoint → target | privateLinkServiceId from az network private-endpoint list | privateEndpoint edges |
properties.serverFarmIdfromaz resource listcan come back empty, so site→plan edges must be taken fromaz webapp list/az functionapp list(the script does this).
Method 2: Author directly to the schema
Top-level structure
{
"schemaVersion": "1.0", // Optional. Currently "1.0"
"generatedAt": "2026-10-09T02:35:29Z", // Optional. ISO8601 UTC
"subscriptionName": "example-sub", // Optional. Display only
"subscriptionId": "00000000-0000-0000-0000-000000000000", // Optional. Display only
"nodes": [ /* AzureImportNode[] */ ], // Required. Empty is an error
"edges": [ /* AzureImportEdge[] */ ] // Optional. May be absent or empty
}
nodes[] — required
| Field | Type | Required | Description |
|---|---|---|---|
id | string | ✅ | Azure resourceId (globally unique). The key that edges reference |
name | string | ✅ | Resource name (display). If absent, id is used instead |
type | string | ✅ | Resource type (e.g. Microsoft.Web/sites). Used for legend color classification |
location | string | null | — | Region (e.g. japaneast) |
resourceGroup | string | null | — | Resource group name |
kind | string | null | — | kind (e.g. functionapp, StorageV2) |
- Nodes without
idortypeare excluded from mapping. Ifidis duplicated, only the first entry is kept.
edges[] — optional
| Field | Type | Required | Description |
|---|---|---|---|
source | string | ✅ | resourceId of the source node |
target | string | ✅ | resourceId of the target node |
relation | string | — | Connection kind. Defaults to related |
Standard relation values:
| Value | Meaning | Source |
|---|---|---|
hostedOn | Site (App Service/Function App) → App Service Plan | serverFarmId |
childOf | SQL Database → SQL Server, Subnet → VNet | resourceId hierarchy |
privateEndpoint | Private Endpoint → target resource | privateLinkServiceId |
- An edge is drawn only when both endpoint nodes exist in
nodes[](otherwise it is skipped). - resourceIds may mix upper and lower case (e.g.
serverFarmsvsserverfarms); matching is done after lower-case normalization. - Self-referencing edges and duplicate edges are excluded.
Complete minimal example
{
"schemaVersion": "1.0",
"generatedAt": "2026-11-24T00:00:00Z",
"subscriptionName": "example-sub",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"nodes": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Web/serverfarms/example-plan",
"name": "example-plan",
"type": "Microsoft.Web/serverfarms",
"location": "japaneast",
"resourceGroup": "example-rg",
"kind": null
},
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Web/sites/example-app",
"name": "example-app",
"type": "Microsoft.Web/sites",
"location": "japaneast",
"resourceGroup": "example-rg",
"kind": "app"
},
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Sql/servers/example-sql",
"name": "example-sql",
"type": "Microsoft.Sql/servers",
"location": "japaneast",
"resourceGroup": "example-rg",
"kind": null
},
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Sql/servers/example-sql/databases/example-db",
"name": "example-db",
"type": "Microsoft.Sql/servers/databases",
"location": "japaneast",
"resourceGroup": "example-rg",
"kind": null
}
],
"edges": [
{
"source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Web/sites/example-app",
"target": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Web/serverfarms/example-plan",
"relation": "hostedOn"
},
{
"source": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Sql/servers/example-sql/databases/example-db",
"target": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Sql/servers/example-sql",
"relation": "childOf"
}
]
}
Procedure when building directly from az output
- Collect nodes: Use the output of
az resource list --query "[].{id:id, name:name, type:type, location:location, resourceGroup:resourceGroup, kind:kind}" -o jsonasnodesas-is. - hostedOn: From
az webapp list --query "[].{id:id, serverFarmId:serverFarmId}" -o jsonand the same query onaz functionapp list, create{source: id, target: serverFarmId, relation: "hostedOn"}for every item that has aserverFarmId. - childOf: For nodes of type
Microsoft.Sql/servers/databases, the part of the id before/databases/is the SQL server id; forMicrosoft.Network/virtualNetworks/subnets, the part before/subnets/is the VNet id. - privateEndpoint: From
az network private-endpoint list --query "[].{id:id, targets:privateLinkServiceConnections[].privateLinkServiceId}" -o json, create{source: id, target: target, relation: "privateEndpoint"}for each target. - Clean up: Remove edges whose endpoints are not in
nodes, self edges and duplicates. Comparison uses lower-case normalization. - Check for secrets: Confirm no keys or connection strings slipped into the output JSON. The queries above return no secret values by design.
Input validation and limits
The adapter validates input on import. The screen never breaks; only an error message is shown.
| Item | Limit | Error key when exceeded |
|---|---|---|
| Raw text size | 5 MB | net3d.azure.error.tooLarge |
| Node count | 3000 | net3d.azure.error.tooManyNodes |
| Edge count | 6000 | net3d.azure.error.tooManyEdges |
Other error keys: empty input (emptyInput), JSON parse failure (invalidJson), root is not an object (invalidRoot), nodes missing (missingNodes), empty array (emptyNodes), zero valid nodes (noValidNodes).
Importing on the screen
- Open
/en/network-topology. - Click Import Azure Resources and import by file upload or by pasting JSON. On success, a summary shows how many nodes/edges were imported.
- Turn the layer toggle on to display it. Check the legend for the per-type colors.
- To remove it, use the import clear (empty layer) action. The data does not survive the end of the session either.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
tooManyNodes / tooManyEdges error | Limit exceeded | Narrow the subscription / resource group scope and regenerate |
noValidNodes error | Every node lacks id/type | Fill in node fields per the schema |
| An edge is not drawn | One endpoint is not in nodes | Include the referenced resource in nodes. ID case is ignored |
| No site→plan edges | Used serverFarmId from az resource list | Take it from az webapp list / az functionapp list |
| Layer disappears after refresh | Stored in sessionStorage, gone when the session ends | Keep the JSON file and import it again |
| Want periodic automatic refresh | No path under the current premise (manual import) | Automate only the JSON generation; import on the screen |
Related Documents
- Network Topology Guide
- Network Topology (Net3D) API Reference
- Canonical schema document:
giipv3/docs/specs/net3d-azure-import-schema.md
Version: 1.0
Last Updated: 2026-11-24
Source File: giipv3/public/help/api-network-topology-azure.en.md