Microsoft.Network virtualRouters 2020-07-01

Template format

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

  "name": "string",
  "type": "Microsoft.Network/virtualRouters",
  "apiVersion": "2020-07-01",
  "location": "string",
  "tags": {},
  "properties": {
    "virtualRouterAsn": "integer",
    "virtualRouterIps": [
    "hostedSubnet": {
      "id": "string"
    "hostedGateway": {
      "id": "string"
  "resources": []

Property values

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

Microsoft.Network/virtualRouters object


In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.

Name Type Required Value
name string Yes The name of the Virtual Router.
type enum Yes For JSON - Microsoft.Network/virtualRouters
apiVersion enum Yes For JSON - 2020-07-01
location string Yes Resource location.
tags object No Resource tags.
properties object Yes Properties of the Virtual Router. - VirtualRouterPropertiesFormat object
resources array No peerings

VirtualRouterPropertiesFormat object

Name Type Required Value
virtualRouterAsn integer No VirtualRouter ASN.
virtualRouterIps array No VirtualRouter IPs. - string
hostedSubnet object No The Subnet on which VirtualRouter is hosted. - SubResource object
hostedGateway object No The Gateway on which VirtualRouter is hosted. - SubResource object

SubResource object

Name Type Required Value
id string No Resource ID.