{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-networking-services/json-schema/azure-networking-services-express-route-connection-schema.json",
  "title": "ExpressRouteConnection",
  "description": "ExpressRouteConnection resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-networking-services-expressrouteconnections-api-openapi.yml#/components/schemas/ExpressRouteConnection",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ExpressRouteConnectionProperties",
      "description": "Properties of the express route connection.",
      "x-ms-client-flatten": true
    },
    "name": {
      "type": "string",
      "description": "The name of the resource."
    }
  },
  "required": [
    "name"
  ],
  "allOf": [
    {
      "$ref": "#/$defs/SubResource"
    }
  ],
  "$defs": {
    "ExpressRouteCircuitPeeringId": {
      "type": "object",
      "description": "ExpressRoute circuit peering identifier.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the ExpressRoute circuit peering."
        }
      }
    },
    "ExpressRouteConnectionProperties": {
      "type": "object",
      "description": "Properties of the ExpressRouteConnection subresource.",
      "properties": {
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the express route connection resource.",
          "readOnly": true
        },
        "expressRouteCircuitPeering": {
          "$ref": "#/$defs/ExpressRouteCircuitPeeringId",
          "description": "The ExpressRoute circuit peering."
        },
        "authorizationKey": {
          "type": "string",
          "description": "Authorization key to establish the connection."
        },
        "routingWeight": {
          "type": "integer",
          "format": "int32",
          "description": "The routing weight associated to the connection."
        },
        "enableInternetSecurity": {
          "type": "boolean",
          "description": "Enable internet security."
        },
        "expressRouteGatewayBypass": {
          "type": "boolean",
          "description": "Enable FastPath to vWan Firewall hub."
        },
        "enablePrivateLinkFastPath": {
          "type": "boolean",
          "description": "Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled."
        },
        "routingConfiguration": {
          "$ref": "#/$defs/RoutingConfiguration",
          "description": "The Routing Configuration indicating the associated and propagated route tables on this connection."
        }
      },
      "required": [
        "expressRouteCircuitPeering"
      ]
    },
    "PropagatedRouteTable": {
      "type": "object",
      "description": "The list of RouteTables to advertise the routes to.",
      "properties": {
        "labels": {
          "type": "array",
          "description": "The list of labels.",
          "items": {
            "type": "string"
          }
        },
        "ids": {
          "type": "array",
          "description": "The list of resource ids of all the RouteTables.",
          "items": {
            "$ref": "#/$defs/SubResource"
          }
        }
      }
    },
    "ProvisioningState": {
      "type": "string",
      "description": "Provisioning states of a resource.",
      "enum": [
        "Failed",
        "Succeeded",
        "Canceled",
        "Creating",
        "Updating",
        "Deleting"
      ],
      "x-ms-enum": {
        "name": "ProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Canceled"
          },
          {
            "name": "Creating",
            "value": "Creating",
            "description": "Creating"
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "Updating"
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "Deleting"
          }
        ]
      }
    },
    "RoutingConfiguration": {
      "type": "object",
      "description": "Routing Configuration indicating the associated and propagated route tables for this connection.",
      "properties": {
        "associatedRouteTable": {
          "$ref": "#/$defs/SubResource",
          "description": "The resource id RouteTable associated with this RoutingConfiguration."
        },
        "propagatedRouteTables": {
          "$ref": "#/$defs/PropagatedRouteTable",
          "description": "The list of RouteTables to advertise the routes to."
        },
        "vnetRoutes": {
          "$ref": "#/$defs/VnetRoute",
          "description": "List of routes that control routing from VirtualHub into a virtual network connection."
        },
        "inboundRouteMap": {
          "$ref": "#/$defs/SubResource",
          "description": "The resource id of the RouteMap associated with this RoutingConfiguration for inbound learned routes."
        },
        "outboundRouteMap": {
          "$ref": "#/$defs/SubResource",
          "description": "The resource id of theRouteMap associated with this RoutingConfiguration for outbound advertised routes."
        }
      }
    },
    "StaticRoute": {
      "type": "object",
      "description": "List of all Static Routes.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the StaticRoute that is unique within a VnetRoute."
        },
        "addressPrefixes": {
          "type": "array",
          "description": "List of all address prefixes.",
          "items": {
            "type": "string"
          }
        },
        "nextHopIpAddress": {
          "type": "string",
          "description": "The ip address of the next hop."
        }
      }
    },
    "StaticRoutesConfig": {
      "type": "object",
      "description": "Configuration for static routes on this HubVnetConnectionConfiguration for static routes on this HubVnetConnection.",
      "properties": {
        "propagateStaticRoutes": {
          "type": "boolean",
          "description": "Boolean indicating whether static routes on this connection are automatically propagate to route tables which this connection propagates to."
        },
        "vnetLocalRouteOverrideCriteria": {
          "$ref": "#/$defs/VnetLocalRouteOverrideCriteria",
          "description": "Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke."
        }
      }
    },
    "SubResource": {
      "type": "object",
      "description": "Reference to another subresource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        }
      }
    },
    "VnetLocalRouteOverrideCriteria": {
      "type": "string",
      "description": "Parameter determining whether NVA in spoke vnet is bypassed for traffic with destination in spoke vnet.",
      "enum": [
        "Contains",
        "Equal"
      ],
      "x-ms-enum": {
        "name": "VnetLocalRouteOverrideCriteria",
        "modelAsString": true,
        "values": [
          {
            "name": "Contains",
            "value": "Contains",
            "description": "Contains"
          },
          {
            "name": "Equal",
            "value": "Equal",
            "description": "Equal"
          }
        ]
      }
    },
    "VnetRoute": {
      "type": "object",
      "description": "List of routes that control routing from VirtualHub into a virtual network connection.",
      "properties": {
        "staticRoutesConfig": {
          "$ref": "#/$defs/StaticRoutesConfig",
          "description": "Configuration for static routes on this HubVnetConnection."
        },
        "staticRoutes": {
          "type": "array",
          "description": "List of all Static Routes.",
          "items": {
            "$ref": "#/$defs/StaticRoute"
          }
        },
        "bgpConnections": {
          "type": "array",
          "description": "The list of references to HubBgpConnection objects.",
          "items": {
            "$ref": "#/$defs/SubResource"
          },
          "readOnly": true
        }
      }
    }
  }
}