Skip to main content
This topic describes the API procedure to create an MCR VXC. The first example creates an AWS Hosted Connection in the US market - one of the more involved configurations. Templates for other CSPs appear later in the topic. For more information, see POST Validate MCR VXC Order (v3) in the API reference.

Creating a VXC between an MCR and AWS with a Hosted Connection

This example creates an AWS Hosted Connection in the US market. The steps include how to:
  • get the MCR product ID
  • find the location ID for an available US market
  • validate and order the VXC
  • configure two static routes
  • configure connections — one connection with details and one without.
Before you begin, obtain a valid access token. For more information, see Creating an API Key. To create the VXC, we need the productUid for the MCR. To get the productUid for the MCR
  1. Get the product list.
  2. From the returned product details, locate the productUid value for the MCR you want to connect. This example uses this value: fee85cc0-f06f-4ad7-bce7-36aef7dbe0d0
Next, find the location ID for the US market you want with support for AWS Hosted Connections. To find the locationId in US market where AWS Hosted Connections are available
  1. Get the list for all interfaces Megaport has with Cloud Service Providers.
    You can filter the results by connectType and vxcPermitted.
  2. Click the magnifying glass and search through the response for a site matching your location criteria. For this example, select “US West (Oregon) (us-west-2) [DZ-RED]” with “locationId”: 57.
[DZ-RED] means Red diversity zone. Each AWS Hosted Connection site provides two diversity zones to provide redundancy: DZ-Red and DZ-Blue.
With the MCR ID and the AWS location ID, you can create a VXC. To create the VXC
  1. Create a request with this URL:
    To test your request before you order, you can use: POST {baseUrl}/v3/networkdesign/validate
  2. Add these headers to the request:
    • Content-Type: application/json
    • Authorization: Bearer {your accessToken}
  3. Create the Body of the request with the configuration details. This example uses MCR product ID, the AWS location ID for the B-End, creates two static routes, and configures BGP connections – one connection with MED details and one without. The following sections provide details about the static routes and BGP connections.

Static routes

You can create multiple static routes per interface by adding an ipRoutes array to the interfaces array of the A-End partner configuration object:
An empty ipRoutes array indicates there are no static routes.

BGP connections

You can create multiple BGP connections per interface by adding a bgpConnections array to the interfaces array of the A-End partner configuration object:

Bidirectional Forwarding Detection (BFD)

The bfd configuration object applies to all BGP connections on the interface that have bfdEnabled = true. The BFD settings are not editable. The default values configured when BFD is enabled are:
  • : 300 milliseconds
  • : 300 milliseconds
  • : 3
These settings will be used for all BGP connections on the VXC where BFD is enabled.

DHCP pools

You can configure a DHCP server pool on an MCR VXC interface. A DHCP pool enables the MCR to act as a DHCP server, assigning IP addresses to devices connected through the interface. Add a dhcpPools array to the interfaces array of the A-End or B-End partner configuration object:
  • DHCP pools are supported only on MCR products.
  • DHCP pools are not supported when the opposite end of the VXC is a Transit or IX connection.
  • DHCP pools are not supported on IPsec tunnel interfaces.
  • Each interface supports a maximum of one DHCP pool.

Autoconfiguration with AWS, Azure, and Google

For Azure, AWS Hosted VIF, and Google, Megaport can set up the IP addressing and BGP details on both the MCR and the CSP side ensuring a working BGP setup. This also minimizes the amount of switching between the CSP and Megaport portals. While the Portal handles the autoconfiguration by default, you can also use the API to trigger the BGP autoconfiguration. The functionality is triggered when the interfaces key in partnerConfig does not exist or is null. To configure BGP peering for CSPs
  1. Create a request with this URL:
  2. Add these headers to the request:
    • Content-Type: application/json
    • Authorization: Bearer {your accessToken}
  3. Create the Body of the request with the configuration details. Different templates are available here for the most popular CSPs.

AWS Hosted VIF

For more information about creating a Hosted VIF, see Creating a VXC between an MCR and AWS with the API.

Google Cloud

Microsoft Azure

For Azure configuration details, see Creating a VXC between an MCR and Microsoft Azure with the API.
Last modified on August 21, 2026