{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telnyx/json-schema/telnyx-virtual-cross-connect-create-schema.json",
  "title": "VirtualCrossConnectCreate",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telnyx-virtual-cross-connects-api-openapi.yml#/components/schemas/VirtualCrossConnectCreate",
  "allOf": [
    {
      "$ref": "#/$defs/VirtualCrossConnect"
    },
    {
      "$ref": "#/$defs/RegionIn"
    },
    {
      "required": [
        "network_id",
        "region_code",
        "cloud_provider",
        "cloud_provider_region",
        "bgp_asn",
        "primary_cloud_account_id"
      ],
      "title": "VirtualCrossConnectCreate",
      "type": "object"
    }
  ],
  "$defs": {
    "Interface": {
      "properties": {
        "name": {
          "description": "A user specified name for the interface.",
          "type": "string"
        },
        "network_id": {
          "description": "The id of the network associated with the interface.",
          "format": "uuid",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/InterfaceStatus"
        }
      },
      "type": "object"
    },
    "InterfaceStatus": {
      "description": "The current status of the interface deployment.",
      "enum": [
        "created",
        "provisioning",
        "provisioned",
        "deleting"
      ],
      "readOnly": true,
      "type": "string"
    },
    "Record": {
      "properties": {
        "created_at": {
          "description": "ISO 8601 formatted date-time indicating when the resource was created.",
          "readOnly": true,
          "type": "string"
        },
        "id": {
          "description": "Identifies the resource.",
          "format": "uuid",
          "readOnly": true,
          "type": "string"
        },
        "record_type": {
          "description": "Identifies the type of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "updated_at": {
          "description": "ISO 8601 formatted date-time indicating when the resource was updated.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "RegionIn": {
      "properties": {
        "region_code": {
          "description": "The region the interface should be deployed to.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "VirtualCrossConnect": {
      "allOf": [
        {
          "$ref": "#/$defs/Record"
        },
        {
          "$ref": "#/$defs/Interface"
        },
        {
          "properties": {
            "bandwidth_mbps": {
              "description": "The desired throughput in Megabits per Second (Mbps) for your Virtual Cross Connect.<br /><br />The available bandwidths can be found using the /virtual_cross_connect_regions endpoint.",
              "type": "number"
            },
            "bgp_asn": {
              "description": "The Border Gateway Protocol (BGP) Autonomous System Number (ASN). If null, value will be assigned by Telnyx.",
              "type": "number"
            },
            "cloud_provider": {
              "description": "The Virtual Private Cloud with which you would like to establish a cross connect.",
              "enum": [
                "aws",
                "azure",
                "gce"
              ],
              "type": "string"
            },
            "cloud_provider_region": {
              "description": "The region where your Virtual Private Cloud hosts are located.<br /><br />The available regions can be found using the /virtual_cross_connect_regions endpoint.",
              "type": "string"
            },
            "primary_bgp_key": {
              "description": "The authentication key for BGP peer configuration.",
              "type": "string"
            },
            "primary_cloud_account_id": {
              "description": "The identifier for your Virtual Private Cloud. The number will be different based upon your Cloud provider.",
              "type": "string"
            },
            "primary_cloud_ip": {
              "description": "The IP address assigned for your side of the Virtual Cross Connect.<br /><br />If none is provided, one will be generated for you.<br /><br />This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted.",
              "type": "string"
            },
            "primary_enabled": {
              "description": "Indicates whether the primary circuit is enabled. Setting this to `false` will disable the circuit.",
              "readOnly": true,
              "type": "boolean"
            },
            "primary_telnyx_ip": {
              "description": "The IP address assigned to the Telnyx side of the Virtual Cross Connect.<br /><br />If none is provided, one will be generated for you.<br /><br />This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted.",
              "type": "string"
            },
            "record_type": {
              "description": "Identifies the type of the resource.",
              "readOnly": true,
              "type": "string"
            },
            "secondary_bgp_key": {
              "description": "The authentication key for BGP peer configuration.",
              "type": "string"
            },
            "secondary_cloud_account_id": {
              "description": "The identifier for your Virtual Private Cloud. The number will be different based upon your Cloud provider.<br /><br />This attribute is only necessary for GCE.",
              "type": "string"
            },
            "secondary_cloud_ip": {
              "description": "The IP address assigned for your side of the Virtual Cross Connect.<br /><br />If none is provided, one will be generated for you.<br /><br />This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted.",
              "type": "string"
            },
            "secondary_enabled": {
              "description": "Indicates whether the secondary circuit is enabled. Setting this to `false` will disable the circuit.",
              "readOnly": true,
              "type": "boolean"
            },
            "secondary_telnyx_ip": {
              "description": "The IP address assigned to the Telnyx side of the Virtual Cross Connect.<br /><br />If none is provided, one will be generated for you.<br /><br />This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted.",
              "type": "string"
            }
          },
          "title": "VirtualCrossConnect",
          "type": "object"
        }
      ]
    }
  }
}