{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/palo-alto-networks/main/json-schema/palo-alto-networks-interconnect-request-schema.json",
  "title": "InterconnectRequest",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/palo-alto-networks-interconnect-api-openapi.yml#/components/schemas/InterconnectRequest",
  "type": "object",
  "required": [
    "name",
    "region",
    "partnerName",
    "partnerEmail",
    "usage",
    "cloudProvider",
    "type"
  ],
  "properties": {
    "name": {
      "type": "string",
      "pattern": "^([-0-9a-z]){1,13}$"
    },
    "region": {
      "type": "string",
      "pattern": "\\\\S+"
    },
    "partnerName": {
      "type": "string",
      "pattern": "^([a-zA-Z0-9\\s\\-]){1,30}$"
    },
    "partnerEmail": {
      "type": "string",
      "pattern": "\\\\S"
    },
    "usage": {
      "$ref": "#/$defs/InterconnectUsage"
    },
    "tsgId": {
      "type": "string",
      "pattern": "^[0-9-]+$"
    },
    "cloudProvider": {
      "$ref": "#/$defs/CloudProvider"
    },
    "type": {
      "$ref": "#/$defs/ConnectionType"
    },
    "ipPool": {
      "$ref": "#/$defs/IPPoolRequest"
    },
    "physicalConnection": {
      "$ref": "#/$defs/PhysicalConnectionEntry"
    },
    "vlanAttachment": {
      "$ref": "#/$defs/VlanAttachmentRequest"
    }
  },
  "$defs": {
    "Bandwidth": {
      "type": "string",
      "enum": [
        "BPS_50M",
        "BPS_100M",
        "BPS_200M",
        "BPS_300M",
        "BPS_400M",
        "BPS_500M",
        "BPS_1G",
        "BPS_2G",
        "BPS_5G",
        "BPS_10G"
      ]
    },
    "CloudProvider": {
      "type": "string",
      "enum": [
        "GCP",
        "AWS"
      ]
    },
    "ConnectionType": {
      "type": "string",
      "enum": [
        "DEDICATED",
        "PARTNER"
      ]
    },
    "DedicatedVlanAttachmentDetailsEntry": {
      "type": "object",
      "properties": {
        "edgeAvailability": {
          "type": "string"
        },
        "bandwidth": {
          "$ref": "#/$defs/Bandwidth"
        }
      },
      "required": [
        "edgeAvailability"
      ]
    },
    "IPBlockEntry": {
      "type": "object",
      "required": [
        "cidr"
      ],
      "properties": {
        "edgeLocation": {
          "type": "string"
        },
        "cidr": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        },
        "type": {
          "$ref": "#/$defs/IPBlockType"
        }
      }
    },
    "IPBlockType": {
      "type": "string",
      "enum": [
        "PRIMARY",
        "SECONDARY"
      ]
    },
    "IPPoolRequest": {
      "type": "object",
      "required": [
        "ipProvider"
      ],
      "properties": {
        "ipBlocks": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/IPBlockEntry"
          }
        },
        "ipProvider": {
          "$ref": "#/$defs/IPProvider"
        }
      }
    },
    "IPProvider": {
      "type": "string",
      "enum": [
        "SP",
        "PANW"
      ]
    },
    "InterconnectUsage": {
      "type": "string",
      "enum": [
        "SHARED",
        "PER_TENANT"
      ]
    },
    "PhysicalConnectionEntry": {
      "type": "object",
      "required": [
        "physicalConnectionName",
        "linkType",
        "coloFacilities",
        "partnerName",
        "partnerEmail"
      ],
      "properties": {
        "physicalConnectionName": {
          "type": "string",
          "pattern": "\\\\S"
        },
        "linkType": {
          "$ref": "#/$defs/PhysicalInterconnectLinkType"
        },
        "requestedLinkCount": {
          "type": "integer",
          "format": "int32"
        },
        "coloFacilities": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "macSecEnabled": {
          "type": "boolean"
        },
        "partnerName": {
          "type": "string",
          "pattern": "\\\\S"
        },
        "partnerEmail": {
          "type": "string",
          "pattern": "\\\\S"
        }
      }
    },
    "PhysicalInterconnectLinkType": {
      "type": "string",
      "enum": [
        "LINK_TYPE_ETHERNET_10G_LR",
        "LINK_TYPE_ETHERNET_100G_LR"
      ]
    },
    "SessionInitializationMode": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "PASSIVE",
        "DISABLED"
      ]
    },
    "StackType": {
      "type": "string",
      "enum": [
        "IPV4_ONLY",
        "IPV4_IPV6"
      ]
    },
    "VlanAttachmentCustomIpAddress": {
      "type": "object",
      "description": "Custom IP address configuration for VLAN attachment BGP peering. Both Cloud Router and Customer Router IP addresses must be provided together with matching prefix lengths (/29 or /30). IP addresses must not be in reserved ranges (RFC1918 private IPs, loopback, etc.) and must not be network or broadcast addresses.",
      "properties": {
        "candidateCloudRouterIpAddress": {
          "type": "string",
          "description": "Cloud Router IP address in CIDR notation (e.g., 169.254.1.1/29). Must have prefix length /29 or /30 and match the prefix length of candidateCustomerRouterIpAddress.",
          "pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))/(29|30)$"
        },
        "candidateCustomerRouterIpAddress": {
          "type": "string",
          "description": "Customer Router IP address in CIDR notation (e.g., 169.254.1.2/29). Must have prefix length /29 or /30 and match the prefix length of candidateCloudRouterIpAddress.",
          "pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))/(29|30)$"
        }
      }
    },
    "VlanAttachmentRequest": {
      "type": "object",
      "required": [
        "name",
        "bgpPeerAsn",
        "bgpPeerBfdSessionInitMode"
      ],
      "properties": {
        "name": {
          "type": "string",
          "pattern": "^([-0-9a-z]){1,13}$"
        },
        "stackType": {
          "$ref": "#/$defs/StackType"
        },
        "bandwidth": {
          "$ref": "#/$defs/Bandwidth"
        },
        "bgpPeerAsn": {
          "type": "integer",
          "format": "int64",
          "minimum": 1
        },
        "bgpPeerBfdSessionInitMode": {
          "$ref": "#/$defs/SessionInitializationMode"
        },
        "bgpPeerBfdMinTransmitInterval": {
          "type": "integer",
          "format": "int64",
          "maximum": 30000,
          "minimum": 1000
        },
        "bgpPeerBfdMinReceiveInterval": {
          "type": "integer",
          "format": "int64",
          "maximum": 30000,
          "minimum": 1000
        },
        "bgpPeerBfdMultiplier": {
          "type": "integer",
          "format": "int64",
          "maximum": 16,
          "minimum": 5
        },
        "dedicatedConnectionDetails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DedicatedVlanAttachmentDetailsEntry"
          }
        },
        "primaryAttachmentCustomIpAddress": {
          "$ref": "#/$defs/VlanAttachmentCustomIpAddress"
        },
        "redundantAttachmentCustomIpAddress": {
          "$ref": "#/$defs/VlanAttachmentCustomIpAddress"
        },
        "bgpPeerMd5AuthEnabled": {
          "type": "boolean"
        }
      }
    }
  }
}