{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-express-route/json-schema/microsoft-azure-express-route-express-route-circuit-peering-schema.json",
  "title": "ExpressRouteCircuitPeering",
  "description": "Peering in an ExpressRouteCircuit resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-express-route-expressroutecircuitpeerings-api-openapi.yml#/components/schemas/ExpressRouteCircuitPeering",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ExpressRouteCircuitPeeringPropertiesFormat",
      "description": "Properties of the express route circuit peering.",
      "x-ms-client-flatten": true
    },
    "etag": {
      "type": "string",
      "description": "A unique read-only string that changes whenever the resource is updated.",
      "readOnly": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/SubResourceModel"
    }
  ],
  "$defs": {
    "AdvertisedPublicPrefixProperties": {
      "type": "object",
      "description": "Prefix properties required to perform validation using openssl signature.",
      "properties": {
        "prefix": {
          "type": "string",
          "description": "Advertised Public Prefix."
        },
        "validationId": {
          "type": "string",
          "description": "Validation string that contains circuit peering info."
        },
        "signature": {
          "type": "string",
          "description": "Signed string generated by encrypting validationId with a private key."
        },
        "validationState": {
          "$ref": "#/$defs/AdvertisedPublicPrefixPropertiesValidationState",
          "description": "Advertised Public Prefix State that denotes if the prefix is validated or not.",
          "readOnly": true
        }
      }
    },
    "AdvertisedPublicPrefixPropertiesValidationState": {
      "type": "string",
      "description": "Advertised Public Prefix State that denotes if the prefix is validated or not.",
      "enum": [
        "NotConfigured",
        "Configuring",
        "Configured",
        "ValidationNeeded",
        "ValidationFailed",
        "ManualValidationNeeded",
        "AsnValidationFailed",
        "CertificateMissingInRoutingRegistry",
        "InvalidSignatureEncoding",
        "SignatureVerificationFailed"
      ],
      "x-ms-enum": {
        "name": "AdvertisedPublicPrefixPropertiesValidationState",
        "modelAsString": true,
        "values": [
          {
            "name": "NotConfigured",
            "value": "NotConfigured",
            "description": "NotConfigured"
          },
          {
            "name": "Configuring",
            "value": "Configuring",
            "description": "Configuring"
          },
          {
            "name": "Configured",
            "value": "Configured",
            "description": "Configured"
          },
          {
            "name": "ValidationNeeded",
            "value": "ValidationNeeded",
            "description": "ValidationNeeded"
          },
          {
            "name": "ValidationFailed",
            "value": "ValidationFailed",
            "description": "ValidationFailed"
          },
          {
            "name": "ManualValidationNeeded",
            "value": "ManualValidationNeeded",
            "description": "ManualValidationNeeded"
          },
          {
            "name": "AsnValidationFailed",
            "value": "AsnValidationFailed",
            "description": "AsnValidationFailed"
          },
          {
            "name": "CertificateMissingInRoutingRegistry",
            "value": "CertificateMissingInRoutingRegistry",
            "description": "CertificateMissingInRoutingRegistry"
          },
          {
            "name": "InvalidSignatureEncoding",
            "value": "InvalidSignatureEncoding",
            "description": "InvalidSignatureEncoding"
          },
          {
            "name": "SignatureVerificationFailed",
            "value": "SignatureVerificationFailed",
            "description": "SignatureVerificationFailed"
          }
        ]
      }
    },
    "CircuitConnectionStatus": {
      "type": "string",
      "description": "Express Route Circuit connection state.",
      "enum": [
        "Connected",
        "Connecting",
        "Disconnected"
      ],
      "x-ms-enum": {
        "name": "CircuitConnectionStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Connected",
            "value": "Connected",
            "description": "Connected"
          },
          {
            "name": "Connecting",
            "value": "Connecting",
            "description": "Connecting"
          },
          {
            "name": "Disconnected",
            "value": "Disconnected",
            "description": "Disconnected"
          }
        ]
      }
    },
    "ExpressRouteCircuitConnection": {
      "type": "object",
      "description": "Express Route Circuit Connection in an ExpressRouteCircuitPeering resource.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/ExpressRouteCircuitConnectionPropertiesFormat",
          "description": "Properties of the express route circuit connection.",
          "x-ms-client-flatten": true
        },
        "etag": {
          "type": "string",
          "description": "A unique read-only string that changes whenever the resource is updated.",
          "readOnly": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/SubResourceModel"
        }
      ]
    },
    "ExpressRouteCircuitConnectionPropertiesFormat": {
      "type": "object",
      "description": "Properties of the express route circuit connection.",
      "properties": {
        "expressRouteCircuitPeering": {
          "$ref": "#/$defs/SubResource",
          "description": "Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection."
        },
        "peerExpressRouteCircuitPeering": {
          "$ref": "#/$defs/SubResource",
          "description": "Reference to Express Route Circuit Private Peering Resource of the peered circuit."
        },
        "addressPrefix": {
          "type": "string",
          "description": "/29 IP address space to carve out Customer addresses for tunnels."
        },
        "authorizationKey": {
          "type": "string",
          "description": "The authorization key."
        },
        "ipv6CircuitConnectionConfig": {
          "$ref": "#/$defs/Ipv6CircuitConnectionConfig",
          "description": "IPv6 Address PrefixProperties of the express route circuit connection."
        },
        "circuitConnectionStatus": {
          "$ref": "#/$defs/CircuitConnectionStatus",
          "description": "Express Route Circuit connection state.",
          "readOnly": true
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the express route circuit connection resource.",
          "readOnly": true
        }
      }
    },
    "ExpressRouteCircuitPeeringAdvertisedPublicPrefixState": {
      "type": "string",
      "description": "The advertised public prefix state of the Peering resource.",
      "enum": [
        "NotConfigured",
        "Configuring",
        "Configured",
        "ValidationNeeded"
      ],
      "x-ms-enum": {
        "name": "ExpressRouteCircuitPeeringAdvertisedPublicPrefixState",
        "modelAsString": true,
        "values": [
          {
            "name": "NotConfigured",
            "value": "NotConfigured",
            "description": "NotConfigured"
          },
          {
            "name": "Configuring",
            "value": "Configuring",
            "description": "Configuring"
          },
          {
            "name": "Configured",
            "value": "Configured",
            "description": "Configured"
          },
          {
            "name": "ValidationNeeded",
            "value": "ValidationNeeded",
            "description": "ValidationNeeded"
          }
        ]
      }
    },
    "ExpressRouteCircuitPeeringConfig": {
      "type": "object",
      "description": "Specifies the peering configuration.",
      "properties": {
        "advertisedPublicPrefixes": {
          "type": "array",
          "description": "The reference to AdvertisedPublicPrefixes.",
          "items": {
            "type": "string"
          }
        },
        "advertisedCommunities": {
          "type": "array",
          "description": "The communities of bgp peering. Specified for microsoft peering.",
          "items": {
            "type": "string"
          }
        },
        "advertisedPublicPrefixesState": {
          "$ref": "#/$defs/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState",
          "description": "The advertised public prefix state of the Peering resource.",
          "readOnly": true
        },
        "legacyMode": {
          "type": "integer",
          "format": "int32",
          "description": "The legacy mode of the peering."
        },
        "customerASN": {
          "type": "integer",
          "format": "int32",
          "description": "The CustomerASN of the peering."
        },
        "routingRegistryName": {
          "type": "string",
          "description": "The RoutingRegistryName of the configuration."
        },
        "advertisedPublicPrefixInfo": {
          "type": "array",
          "description": "List of Prefix information required to perform validation.",
          "items": {
            "$ref": "#/$defs/AdvertisedPublicPrefixProperties"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "ExpressRouteCircuitPeeringPropertiesFormat": {
      "type": "object",
      "description": "Properties of the express route circuit peering.",
      "properties": {
        "peeringType": {
          "$ref": "#/$defs/ExpressRoutePeeringType",
          "description": "The peering type."
        },
        "state": {
          "$ref": "#/$defs/ExpressRoutePeeringState",
          "description": "The peering state."
        },
        "azureASN": {
          "type": "integer",
          "format": "int32",
          "description": "The Azure ASN."
        },
        "peerASN": {
          "type": "integer",
          "format": "int64",
          "description": "The peer ASN.",
          "minimum": 1,
          "maximum": 4294967295
        },
        "primaryPeerAddressPrefix": {
          "type": "string",
          "description": "The primary address prefix."
        },
        "secondaryPeerAddressPrefix": {
          "type": "string",
          "description": "The secondary address prefix."
        },
        "primaryAzurePort": {
          "type": "string",
          "description": "The primary port."
        },
        "secondaryAzurePort": {
          "type": "string",
          "description": "The secondary port."
        },
        "sharedKey": {
          "type": "string",
          "description": "The shared key."
        },
        "vlanId": {
          "type": "integer",
          "format": "int32",
          "description": "The VLAN ID."
        },
        "microsoftPeeringConfig": {
          "$ref": "#/$defs/ExpressRouteCircuitPeeringConfig",
          "description": "The Microsoft peering configuration."
        },
        "stats": {
          "$ref": "#/$defs/ExpressRouteCircuitStats",
          "description": "The peering stats of express route circuit."
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the express route circuit peering resource.",
          "readOnly": true
        },
        "gatewayManagerEtag": {
          "type": "string",
          "description": "The GatewayManager Etag."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "Who was the last to modify the peering.",
          "readOnly": true
        },
        "routeFilter": {
          "$ref": "#/$defs/SubResource",
          "description": "The reference to the RouteFilter resource."
        },
        "ipv6PeeringConfig": {
          "$ref": "#/$defs/Ipv6ExpressRouteCircuitPeeringConfig",
          "description": "The IPv6 peering configuration."
        },
        "expressRouteConnection": {
          "$ref": "#/$defs/ExpressRouteConnectionId",
          "description": "The ExpressRoute connection."
        },
        "connections": {
          "type": "array",
          "description": "The list of circuit connections associated with Azure Private Peering for this circuit.",
          "items": {
            "$ref": "#/$defs/ExpressRouteCircuitConnection"
          }
        },
        "peeredConnections": {
          "type": "array",
          "description": "The list of peered circuit connections associated with Azure Private Peering for this circuit.",
          "items": {
            "$ref": "#/$defs/PeerExpressRouteCircuitConnection"
          },
          "readOnly": true
        }
      }
    },
    "ExpressRouteCircuitPeeringState": {
      "type": "string",
      "description": "The state of peering.",
      "enum": [
        "Disabled",
        "Enabled"
      ],
      "x-ms-enum": {
        "name": "ExpressRouteCircuitPeeringState",
        "modelAsString": true,
        "values": [
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Disabled"
          },
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Enabled"
          }
        ]
      }
    },
    "ExpressRouteCircuitStats": {
      "type": "object",
      "description": "Contains stats associated with the peering.",
      "properties": {
        "primarybytesIn": {
          "type": "integer",
          "format": "int64",
          "description": "The Primary BytesIn of the peering."
        },
        "primarybytesOut": {
          "type": "integer",
          "format": "int64",
          "description": "The primary BytesOut of the peering."
        },
        "secondarybytesIn": {
          "type": "integer",
          "format": "int64",
          "description": "The secondary BytesIn of the peering."
        },
        "secondarybytesOut": {
          "type": "integer",
          "format": "int64",
          "description": "The secondary BytesOut of the peering."
        }
      }
    },
    "ExpressRouteConnectionId": {
      "type": "object",
      "description": "The ID of the ExpressRouteConnection.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the ExpressRouteConnection.",
          "readOnly": true
        }
      }
    },
    "ExpressRoutePeeringState": {
      "type": "string",
      "description": "The state of peering.",
      "enum": [
        "Disabled",
        "Enabled"
      ],
      "x-ms-enum": {
        "name": "ExpressRoutePeeringState",
        "modelAsString": true,
        "values": [
          {
            "name": "Disabled",
            "value": "Disabled",
            "description": "Disabled"
          },
          {
            "name": "Enabled",
            "value": "Enabled",
            "description": "Enabled"
          }
        ]
      }
    },
    "ExpressRoutePeeringType": {
      "type": "string",
      "description": "The peering type.",
      "enum": [
        "AzurePublicPeering",
        "AzurePrivatePeering",
        "MicrosoftPeering"
      ],
      "x-ms-enum": {
        "name": "ExpressRoutePeeringType",
        "modelAsString": true,
        "values": [
          {
            "name": "AzurePublicPeering",
            "value": "AzurePublicPeering",
            "description": "AzurePublicPeering"
          },
          {
            "name": "AzurePrivatePeering",
            "value": "AzurePrivatePeering",
            "description": "AzurePrivatePeering"
          },
          {
            "name": "MicrosoftPeering",
            "value": "MicrosoftPeering",
            "description": "MicrosoftPeering"
          }
        ]
      }
    },
    "Ipv6CircuitConnectionConfig": {
      "type": "object",
      "description": "IPv6 Circuit Connection properties for global reach.",
      "properties": {
        "addressPrefix": {
          "type": "string",
          "description": "/125 IP address space to carve out customer addresses for global reach."
        },
        "circuitConnectionStatus": {
          "$ref": "#/$defs/CircuitConnectionStatus",
          "description": "Express Route Circuit connection state.",
          "readOnly": true
        }
      }
    },
    "Ipv6ExpressRouteCircuitPeeringConfig": {
      "type": "object",
      "description": "Contains IPv6 peering config.",
      "properties": {
        "primaryPeerAddressPrefix": {
          "type": "string",
          "description": "The primary address prefix."
        },
        "secondaryPeerAddressPrefix": {
          "type": "string",
          "description": "The secondary address prefix."
        },
        "microsoftPeeringConfig": {
          "$ref": "#/$defs/ExpressRouteCircuitPeeringConfig",
          "description": "The Microsoft peering configuration."
        },
        "routeFilter": {
          "$ref": "#/$defs/SubResource",
          "description": "The reference to the RouteFilter resource."
        },
        "state": {
          "$ref": "#/$defs/ExpressRouteCircuitPeeringState",
          "description": "The state of peering."
        }
      }
    },
    "PeerExpressRouteCircuitConnection": {
      "type": "object",
      "description": "Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering resource.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/PeerExpressRouteCircuitConnectionPropertiesFormat",
          "description": "Properties of the peer express route circuit connection.",
          "x-ms-client-flatten": true
        },
        "etag": {
          "type": "string",
          "description": "A unique read-only string that changes whenever the resource is updated.",
          "readOnly": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/SubResourceModel"
        }
      ]
    },
    "PeerExpressRouteCircuitConnectionPropertiesFormat": {
      "type": "object",
      "description": "Properties of the peer express route circuit connection.",
      "properties": {
        "expressRouteCircuitPeering": {
          "$ref": "#/$defs/SubResource",
          "description": "Reference to Express Route Circuit Private Peering Resource of the circuit."
        },
        "peerExpressRouteCircuitPeering": {
          "$ref": "#/$defs/SubResource",
          "description": "Reference to Express Route Circuit Private Peering Resource of the peered circuit."
        },
        "addressPrefix": {
          "type": "string",
          "description": "/29 IP address space to carve out Customer addresses for tunnels."
        },
        "circuitConnectionStatus": {
          "$ref": "#/$defs/CircuitConnectionStatus",
          "description": "Express Route Circuit connection state.",
          "readOnly": true
        },
        "connectionName": {
          "type": "string",
          "description": "The name of the express route circuit connection resource."
        },
        "authResourceGuid": {
          "type": "string",
          "description": "The resource guid of the authorization used for the express route circuit connection."
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the peer express route circuit connection resource.",
          "readOnly": true
        }
      }
    },
    "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"
          }
        ]
      }
    },
    "SubResource": {
      "type": "object",
      "description": "Reference to another subresource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        }
      }
    },
    "SubResourceModel": {
      "type": "object",
      "description": "Reference to another subresource.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the resource."
        },
        "type": {
          "type": "string",
          "description": "Resource type.",
          "readOnly": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/SubResource"
        }
      ],
      "x-ms-azure-resource": true
    }
  }
}