Skip to main content
POST
/
virtual_cross_connects
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const virtualCrossConnect = await client.virtualCrossConnects.create({
  bgp_asn: 1234,
  cloud_provider: 'aws',
  cloud_provider_region: 'us-east-1',
  network_id: '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
  primary_cloud_account_id: '123456789012',
  region_code: 'ashburn-va',
});

console.log(virtualCrossConnect.data);
{
  "data": {
    "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "record_type": "virtual_cross_connect",
    "created_at": "2018-02-02T22:25:27.521Z",
    "updated_at": "2018-02-02T22:25:27.521Z",
    "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    "name": "test interface",
    "status": "provisioned",
    "cloud_provider": "aws",
    "cloud_provider_region": "us-east-1",
    "bgp_asn": 1234,
    "bandwidth_mbps": 50,
    "primary_enabled": true,
    "primary_cloud_account_id": "123456789012",
    "primary_telnyx_ip": "169.254.0.1",
    "primary_cloud_ip": "169.254.0.2",
    "primary_bgp_key": "yFV4wEPtPVPfDUGLWiyQzwga",
    "secondary_enabled": true,
    "secondary_cloud_account_id": "",
    "secondary_telnyx_ip": "169.254.0.3",
    "secondary_cloud_ip": "169.254.0.4",
    "secondary_bgp_key": "ge1lONeK9RcA83uuWaw9DvZy",
    "region_code": "ashburn-va",
    "primary_routing_announcement": false,
    "secondary_routing_announcement": false,
    "region": {
      "code": "ashburn-va",
      "name": "Ashburn",
      "record_type": "region"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
region_code
string
required

The region the interface should be deployed to.

Example:

"ashburn-va"

network_id
string<uuid>
required

The id of the network associated with the interface.

Example:

"6a09cdc3-8948-47f0-aa62-74ac943d6c58"

cloud_provider
enum<string>
required

The Virtual Private Cloud with which you would like to establish a cross connect.

Available options:
aws,
azure,
gce
Example:

"aws"

cloud_provider_region
string
required

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.

Example:

"us-east-1"

bgp_asn
number
required

The Border Gateway Protocol (BGP) Autonomous System Number (ASN). If null, value will be assigned by Telnyx.

Example:

1234

primary_cloud_account_id
string
required

The identifier for your Virtual Private Cloud. The number will be different based upon your Cloud provider.

Example:

"123456789012"

name
string

A user specified name for the interface.

Example:

"test interface"

bandwidth_mbps
number

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.

Example:

50

primary_telnyx_ip
string

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.

Example:

"169.254.0.1"

primary_cloud_ip
string

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.

Example:

"169.254.0.2"

primary_bgp_key
string

The authentication key for BGP peer configuration.

Example:

"yFV4wEPtPVPfDUGLWiyQzwga"

secondary_cloud_account_id
string

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.

Example:

""

secondary_telnyx_ip
string

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.

Example:

"169.254.0.3"

secondary_cloud_ip
string

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.

Example:

"169.254.0.4"

secondary_bgp_key
string

The authentication key for BGP peer configuration.

Example:

"ge1lONeK9RcA83uuWaw9DvZy"

Response

Successful response

data
object