- get the
productUidfor the service to use as the A-End - find the storage destination to use as the B-End
- validate and order the VXC
Prerequisites
Before you begin, obtain a valid access token. For more information, see Creating an API Key. You also need:- Object Storage provisioned in the . For more information, see Megaport Object Storage Overview.
- A provisioned Port, MCR, MVE, or NAT Gateway to use as the A-End of the connection.
Getting the productUid for the A-End service
To create the VXC, you need theproductUid of the service to connect from.
To get the productUid for the A-End service
-
Get the product list.
-
From the returned product details, locate the
productUidvalue for the Port, MCR, MVE, or NAT Gateway you want to connect from. This example uses this value:ef59ff80-7f50-11f1-b1ba-59b488c88b57
Finding the storage destination for the B-End
The storage destination is the B-End of the connection. Discover the available storage destinations by filtering the Megaport partner interfaces on theSTORAGE connect type.
To find the storage destination
-
Get the list of interfaces Megaport has with partners, filtered on the
STORAGEconnect type. -
From the response, select the storage destination that matches the location where you provisioned your storage.
To order the VXC, you need the following IDs for the B-End from the response:Connect to the location where you provisioned your storage. Connecting to a different location does not provide access to your buckets.
locationId— The ID of the storage location.productUid— The storage port to connect to.companyUid— The ID of the storage provider, used as theownerUidon the B-End.
Validating and ordering the connection
You set the storage configuration on the B-EndpartnerConfig, where you specify the BGP details for the connection. The A-End partnerConfig is empty.
A storage connection requires BGP. At a minimum, specify the asn. You can add the BGP password when you create the VXC or after it is provisioned.
Set the B-End vlan to -1 so that the storage port assigns the VLAN rather than you choosing one. Set the A-End vlan to 0.
The validate endpoint uses v3 of the API while the buy endpoint uses v4.
-
Create a request with this URL:
-
Add these headers to the request:
Content-Type: application/jsonAuthorization: Bearer {your accessToken}
-
Create the request Body with the configuration details.
The validate request Body is an array of design objects. Each design object identifies the A-End service with
productUidand carries the storage VXC inassociatedVxcs.A successful response returns"message": "Validation passed"and the pricing details for the connection.
-
After you validate the configuration, create a request with this URL:
-
Create the request Body.
The buy request wraps the design objects from the validate step in anetworkDesignarray, alongside adiscountCodesarray. -
Send the request.
If the request is successful, the response confirms the created VXC, including its
technicalServiceUid. The VXC then appears in the Megaport Portal.
Storage connection parameters
The storage configuration is set on the B-EndpartnerConfig.
In this example,
prefixes and route_table are set to null. The format for populated values for these parameters is not covered in this example.