Skip to content

Creating a VXC between a Port and Google Cloud with the API

This topic steps through the API procedure to create a VXC from a Port to Google Cloud, including how to look up Google Cloud port locations and order the VXC.

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

A connection between a Port and Google Cloud requires a pairing key. You get this key from the Google Cloud portal. You use the API to validate a Google Cloud pairing key and the response includes details of the associated ports and peers. You need the port details to create the VXCs.

Use this command to look up Google Cloud location details with the pairing key.

GET {baseUrl}/v2/secure/google/{pairing_key}

This is a sample response for a pairing key with the first VXC configured but the second VXC available (vxc = null).

{
   "message": "Successful lookup",
    "data": {
        "bandwidths": [
        50,
        100,
        200,
        300,
        400,
        500,
        1000,
        2000,
        5000,
        10000
        ],
        "megaports": [
        {
            "port": 13687,
            "vxc": {
                // existing vxc object
            },
            "productId": 13687,
            "productUid": "2c9337ba-b6a6-44cc-851c-58315060a0e3",
            "name": "New York (lga-zone2-1422)",
            "nServiceId": 30890,
            "description": "Google Inc at Digital Realty NYC1",
            "companyId": 90,
            "companyUid": "29ba879b-45c8-48eb-bd97-618d0f20ea04",
            "companyName": "Google Inc",
            "portSpeed": 10000,
            "locationId": 62,
            "state": "NY",
            "country": "USA"
        },
        {
            "port": 12515,
            "vxc": null,
            "productId": 12515,
            "productUid": "2fa8c6c5-314f-4d14-8fb6-e1f7f86bdacc",
            "name": "Ashburn (iad-zone2-1)",
            "nServiceId": 28349,
            "description": "Google Inc at zColo 21635 Red Rum Drive",
            "companyId": 90,
            "companyUid": "29ba879b-45c8-48eb-bd97-618d0f20ea04",
            "companyName": "Google Inc",
            "portSpeed": 10000,
            "locationId": 84,
            "state": "VA",
            "country": "USA"
        }
        ],
        "resource_type": "csp_connection"
    }
}

Update this template of the Body of the validate/buy request with the productUid of the Port, the name of the VXC, the productUid of the Google Cloud port, and the pairing key. The bandwidth options are defined in the list returned by the pairing key and you must use a predefined bandwidth.

[
    {
        "productUid": "d5f4a3c6-06d3-4cfa-9d4e-8ce6ec0b6dbd", //UID of your Megaport (A End)
        "associatedVxcs": [
            {
                "rateLimit": 100, // from list of supported bandwidths in key lookup
                "productName": "Example Google VXC",
                "productUid": "6058acf0-410b-11e8-b3ce-150bacf9bc67",
                "aEnd": {
                    "vlan": 90,
                },
                "bEnd": {
                    "productUid": "7bab4547-ff88-43f9-a1de-3df637522fa5", // port UID from pairing key lookup
                    "partnerConfig": {
                        "connectType": "GOOGLE",
                        "pairingKey": "fbbf41b1-9513-4837-a91a-22a8bb065704/us-west1/2"
                    }
                },
                "productType": "VXC"
            }
        ]
    }
]

Test your request before you order and see pricing details.

POST {baseUrl}/v2/networkdesign/validate

Order the VXC.

POST {baseUrl}/v2/networkdesign/buy

Once you have completed and deployed the VXC, go back to the Google Cloud Console and accept the attachment. You will be provided your private IP address from Google to configure BGP.

This completes your Layer 2 VXC deployment.


Last update: 2023-08-31