Microsoft.Network virtualHubs template reference

Template format

To create a Microsoft.Network/virtualHubs resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Network/virtualHubs",
  "apiVersion": "2019-04-01",
  "location": "string",
  "tags": {},
  "properties": {
    "virtualWan": {
      "id": "string"
    },
    "vpnGateway": {
      "id": "string"
    },
    "p2SVpnGateway": {
      "id": "string"
    },
    "expressRouteGateway": {
      "id": "string"
    },
    "virtualNetworkConnections": [
      {
        "id": "string",
        "properties": {
          "remoteVirtualNetwork": {
            "id": "string"
          },
          "allowHubToRemoteVnetTransit": "boolean",
          "allowRemoteVnetToUseHubVnetGateways": "boolean",
          "enableInternetSecurity": "boolean"
        },
        "name": "string"
      }
    ],
    "addressPrefix": "string",
    "routeTable": {
      "routes": [
        {
          "addressPrefixes": [
            "string"
          ],
          "nextHopIpAddress": "string"
        }
      ]
    }
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Network/virtualHubs object

Name Type Required Value
name string Yes The name of the VirtualHub.
type enum Yes Microsoft.Network/virtualHubs
apiVersion enum Yes 2019-04-01
location string Yes Resource location.
tags object No Resource tags.
properties object Yes Properties of the virtual hub. - VirtualHubProperties object

VirtualHubProperties object

Name Type Required Value
virtualWan object No The VirtualWAN to which the VirtualHub belongs. - SubResource object
vpnGateway object No The VpnGateway associated with this VirtualHub. - SubResource object
p2SVpnGateway object No The P2SVpnGateway associated with this VirtualHub. - SubResource object
expressRouteGateway object No The expressRouteGateway associated with this VirtualHub. - SubResource object
virtualNetworkConnections array No List of all vnet connections with this VirtualHub. - HubVirtualNetworkConnection object
addressPrefix string No Address-prefix for this VirtualHub.
routeTable object No The routeTable associated with this virtual hub. - VirtualHubRouteTable object

SubResource object

Name Type Required Value
id string No Resource ID.

HubVirtualNetworkConnection object

Name Type Required Value
id string No Resource ID.
properties object No Properties of the hub virtual network connection. - HubVirtualNetworkConnectionProperties object
name string No The name of the resource that is unique within a resource group. This name can be used to access the resource.

VirtualHubRouteTable object

Name Type Required Value
routes array No List of all routes. - VirtualHubRoute object

HubVirtualNetworkConnectionProperties object

Name Type Required Value
remoteVirtualNetwork object No Reference to the remote virtual network. - SubResource object
allowHubToRemoteVnetTransit boolean No VirtualHub to RemoteVnet transit to enabled or not.
allowRemoteVnetToUseHubVnetGateways boolean No Allow RemoteVnet to use Virtual Hub's gateways.
enableInternetSecurity boolean No Enable internet security.

VirtualHubRoute object

Name Type Required Value
addressPrefixes array No List of all addressPrefixes. - string
nextHopIpAddress string No NextHop ip address.

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Creates Virtual wan resources

Deploy to Azure
This template allows you to create virtual wan resources including virtual wan, virtual hub, vpn gateway, vpnsite and a vpn connecton.
Secured virtual hubs

Deploy to Azure
This template creates a secured virtual hub using Azure Firewall to secure your cloud network traffic destined to the Internet.