Skip to content

Creating a VXC between an MVE and AWS with the API

This topic steps through the API procedure to create a VXC from an MVE to AWS, including how to look up AWS locations and order VXCs.

You can set up two types of AWS connections to an MVE: an AWS Hosted VIF or an AWS Hosted Connection.

You can distinguish the type of connection supported by partner locations by the connectType attribute. Hosted VIF connections are connectType=AWS and Hosted Connections are connectType=AWSHC.

The MVE to AWS deployment includes these tasks:

  1. Look up AWS location details

    To create a VXC to AWS, you first need to identify the productUid of the port you want to connect to.

    You can look up AWS locations for the B-End of the connection with the v2/dropdowns/partner/megaports endpoint.

  2. Create and deploy a VXC

    With the port details identified, you can create the VXC to AWS from the MVE.

    Configuration details are specified in the Body of the request. Some of the key information you need to specify include the productUid of the MVE, the productUid of the AWS port, and the AWS account ID.

Before you begin, obtain a valid access token. For more information, see Creating an API Key.

Look up AWS location details

Use the API to look up the productUid of the port you want to connect to. The response includes details of the available ports. You need the port details to create the VXC.

In the API response, available ports that accept VXCs are listed as “vxcPermitted”: true.

To look up AWS location details

  1. Expand the Locations folder in the left navigation and click GET Partner Megaports.

  2. Click Send to make a GET request to the API server.

    GET {baseUrl}/v2/dropdowns/partner/megaports
    

    This request returns all the interfaces Megaport has with Cloud Service Providers. You can search by clicking the magnifying glass and entering a location, data center, or other parameter in the search field.

    The connectType indicates the Cloud Service Provider. AWS includes “AWS” for Hosted VIFs and “AWSHC” for Hosted Connections.

    You can filter the results by connectType and vxcPermitted.

    GET {baseUrl}/v2/dropdowns/partner/megaports?connectType=AWS&vxcPermitted=true
    

    This example uses a port in the region ap-southeast-2 (Sydney) that accepts VXCs (“vxcPermitted”: true).

      {
            "productUid": "bc7bf158-532b-4306-af12-c57c0bedc8a6",
            "companyUid": "605cb850-dfb4-4a05-a171-8bf17757b3a2",
            "companyName": "AWS",
            "title": "Asia Pacific (Sydney) (ap-southeast-2)",
            "locationId": 50,
            "speed": 10000,
            "maxVxcSpeed": 10000,
            "vxcPermitted": true,
            "diversityZone": null,
            "rank": 657,
            "lag_id": 7,
            "lag_primary": true,
            "aggregation_id": 27443,
            "connectType": "AWS"
        },

Create and deploy a VXC

With the port details, create the VXC to AWS from the MVE.

You specify the configuration details in the Body of the request. The first productUididentifies the MVE ID and the bEnd: productUid identifies the AWS port location from the Partner Megaports lookup. You also need to provide your AWS account number in the request.

This example uses the Hosted VIF connection type, connectType=AWS.

Tip

To test your request before you order and see pricing details, use the /v3/networkdesign/validate endpoint with the same Body configuration.

To create a VXC

  1. Create a request with the POST Buy AWS - Hosted VIF (v3) endpoint:

    POST {baseUrl}/v3/networkdesign/buy
    
  2. Update the Body of the request with the productUid of the MVE, the name of the VXC, the productUid of the AWS port, and the AWS account ID (ownerAccount).
    You can also change additional values, such as rate limit, contract term, VLAN ID, ASN values, authKey, and IP addressing.

    Here is a sample request:

[
  {
    "productUid": "02ec2091-46bb-4904-bd17-96c752ff826e",
    "associatedVxcs": [
      {
        "productName": "AWS VIF MVE VXC",
        "rateLimit": "100",
        "term": 12,
        "shutdown": false,
        "aEnd": {
          "innerVlan": 101
        },
        "bEnd": {
          "productUid": "bc7bf158-532b-4306-af12-c57c0bedc8a6",
          "partnerConfig": {
            "connectType": "AWS",
            "Name": "Test Megaport VIF",
            "type": "private",
            "asn": 65105,
            "ownerAccount": "370553169139",
            "authKey": "123455",
            "customerIpAddress": null,
            "amazonIpAddress": null
          }
        }
      }
    ]
  }
]

After sending the request, you will receive a successful response when the VXC has been ordered.

Here is a sample response:

{
    "message": "VXC [92e5c7d6-8d97-4ee3-bbf9-13e69b49517c] created.",
    "terms": "This data is subject to the Acceptable Use Policy https://www.megaport.com/legal/acceptable-use-policy",
    "data": [
        {
            "createDate": 1680239079646,
            "vxcOrderId": 114006,
            "payerMegaPortId": 155354,
            "nonPayerMegaPortId": 12103,
            "payerMegaPortName": "greg T",
            "nonPayerMegaPortName": "Asia Pacific (Sydney) (ap-southeast-2)",
            "payerCompanyId": 1153,
            "nonPayerCompanyId": 117,
            "payerLocationId": 2,
            "nonPayerLocationId": 50,
            "salesId": null,
            "payerCompanyName": "Megaport Lab",
            "nonPayerCompanyName": "AWS",
            "payerMegaPortNsId": 397416,
            "nonPayerMegaPortNsId": 27443,
            "payerVlanId": 0,
            "nonPayerVlanId": 0,
            "payerInnerVlanId": 101,
            "nonPayerInnerVlanId": null,
            "payerApproverName": "Greg Brown",
            "payerApproverId": 50402,
            "nonPayerApproverName": "Greg Brown",
            "nonPayerApproverId": 50402,
            "payerApproval": 1680239079601,
            "nonPayerApproval": 1680239079629,
            "fixedTerm": true,
            "duration": 1,
            "rollover": true,
            "serviceName": "from greg T to Asia Pacific (Sydney) (ap-southeast-2)",
            "payerStatus": "APPROVED",
            "nonPayerStatus": "APPROVED",
            "speed": 100,
            "distanceBand": "INTERZONE",
            "intercapPath": "",
            "awsId": null,
            "promoCode": null,
            "dealUid": null,
            "rateType": "MONTHLY",
            "vxcJTechnicalServiceId": 155724,
            "vxcJTechnicalServiceUid": "92e5c7d6-8d97-4ee3-bbf9-13e69b49517c",
            "provisionDate": 1680239079588,
            "orderType": "NEW",
            "monthlyDiscountAmount": null,
            "discountMonths": null,
            "amazonDirectConnectConfigDto": {
                "type": "private",
                "asn": 65105,
                "ownerAccount": "370553169139",
                "authKey": "123455",
                "customerIpAddress": null,
                "amazonIpAddress": null,
                "prefixes": null,
                "name": null
            },
            "amsixConnectConfigDto": null,
            "webAirProvItem": null,
            "sdrcProvItem": null,
            "rate": null,
            "setup": null,
            "asn": null,
            "bgpPassword": null,
            "usageAlgorithm": "POST_PAID_HOURLY_SPEED_LONG_HAUL_VXC",
            "costCentre": null,
            "azureServiceKey": null,
            "oracleVirtualCircuitId": null,
            "serviceKey": null,
            "vxc": {
                "serviceName": "Test AWS VIF MVE VXC",
                "name": "Test AWS VIF MVE VXC",
                "secondaryName": null,
                "technicalServiceId": 155724,
                "technicalServiceUid": "92e5c7d6-8d97-4ee3-bbf9-13e69b49517c",
                "requestedDate": 1680239079588,
                "configuredDate": null,
                "currentEstimatedDelivery": null,
                "companyName": "Megaport Lab",
                "companyId": 1153,
                "billingContactName": null,
                "billingContactId": null,
                "adminContactName": null,
                "adminContactId": null,
                "technicalContactName": null,
                "technicalContactId": null,
                "salesName": null,
                "salesId": null,
                "billableId": 147629,
                "billableUsageAlgorithm": null,
                "productType": "VXC",
                "provisioningStatus": "DEPLOYABLE",
                "failedReason": null,
                "inAdvanceBillingStatus": null,
                "provisioningItems": [],
                "tags": [],
                "vxcDistanceBand": "INTERZONE",
                "intercapPath": "",
                "marketplaceVisibility": true,
                "vxcPermitted": true,
                "vxcAutoApproval": false,
                "createDate": 1680239079620,
                "terminationDate": null,
                "contractStartDate": null,
                "contractTermMonths": 12,
                "rateType": "MONTHLY",
                "trialAgreement": false,
                "payerCompanyId": null,
                "nonPayerCompanyId": null,
                "minimumSpeed": null,
                "maximumSpeed": null,
                "rateLimit": 100,
                "errorMessage": null,
                "market": "Australia",
                "accountManager": null,
                "promptUid": null,
                "components": [],
                "attributes": [],
                "aLocation": null,
                "bLocation": null,
                "aLocationId": null,
                "bLocationId": null,
                "attributeTags": {},
                "createdBy": "f39b8983-256e-4643-adec-9f0b5da09ab7",
                "buyoutPort": null,
                "virtual": false,
                "locked": false,
                "adminLocked": false,
                "bgpShutdownDefault": false,
                "originDomain": null
            },
            "connectType": "AWS",
            "payerConfig": {},
            "nonPayerConfig": {},
            "attributeTags": {},
            "serviceLicense": null,
            "originDomain": null,
            "fullyApproved": true
        }
    ]
}

The VXC will now appear in the Megaport Portal.

For this example, the AWS Hosted VIF will appear in the AWS portal account under Direct Connect - Virtual Interfaces. The account holder can accept the Virtual Interface and connect it to a Virtual Private Gateway or a Direct Connect Gateway and then to their VPCs.


Last update: 2024-04-15