Skip to main content

Create a Virtual Cross Connect

POST 
/virtual_cross_connects

Create a new Virtual Cross Connect.

For AWS and GCE, you have the option of creating the primary connection first and the secondary connection later. You also have the option of disabling the primary and/or secondary connections at any time and later re-enabling them. With Azure, you do not have this option. Azure requires both the primary and secondary connections to be created at the same time and they can not be independantly disabled.

Request

Body

required

    network_id uuidrequired

    The id of the network associated with the interface.

    name string

    A user specified name for the interface.

    cloud_provider stringrequired

    Possible values: [aws, azure, gce]

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

    cloud_provider_region stringrequired

    The region where your Virtual Private Cloud hosts are located.

    The available regions can be found using the /virtual_cross_connect_regions endpoint.

    bgp_asn numberrequired

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

    bandwidth_mbps number

    The desired throughput in Megabits per Second (Mbps) for your Virtual Cross Connect.

    The available bandwidths can be found using the /virtual_cross_connect_regions endpoint.

    primary_cloud_account_id stringrequired

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

    primary_telnyx_ip ipv4

    The IP address assigned to the Telnyx side of the Virtual Cross Connect.

    If none is provided, one will be generated for you.

    This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted.

    primary_cloud_ip ipv4

    The IP address assigned for your side of the Virtual Cross Connect.

    If none is provided, one will be generated for you.

    This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted.

    primary_bgp_key string

    The authentication key for BGP peer configuration.

    secondary_cloud_account_id string

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

    This attribute is only necessary for GCE.

    secondary_telnyx_ip ipv4

    The IP address assigned to the Telnyx side of the Virtual Cross Connect.

    If none is provided, one will be generated for you.

    This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted.

    secondary_cloud_ip ipv4

    The IP address assigned for your side of the Virtual Cross Connect.

    If none is provided, one will be generated for you.

    This value should be null for GCE as Google will only inform you of your assigned IP once the connection has been accepted.

    secondary_bgp_key string

    The authentication key for BGP peer configuration.

    region_code stringrequired

    The region the interface should be deployed to.

Responses

200: Successful response

422: Unprocessable entity. Check the 'detail' field in response for details.

default: Unexpected error

Request samples


curl -L 'https://api.telnyx.com/v2/virtual_cross_connects' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"name": "test interface",
"cloud_provider": "aws",
"cloud_provider_region": "us-east-1",
"bgp_asn": 1234,
"bandwidth_mbps": 50,
"primary_cloud_account_id": "123456789012",
"primary_telnyx_ip": "169.254.0.1",
"primary_cloud_ip": "169.254.0.2",
"primary_bgp_key": "yFV4wEPtPVPfDUGLWiyQzwga",
"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"
}'

Response samples


{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": true,
"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"
}
}
}