action.skip

Erstellen eines VXC zwischen einem MVE und AWS mit der API

Dieses Thema beschreibt das API-Verfahren, um einen VXC von einem MVE zu AWS zu erstellen, einschließlich wie Sie AWS-Standorte nachschlagen und VXCs auf bestimmten vNICs bestellen.

Sie können zwei Arten von AWS-Verbindungen zu einem MVE einrichten: eine AWS Hosted VIF und eine AWS Hosted Connection.

Sie können den von Partnerstandorten unterstützten Verbindungstyp anhand des Attributs connectType unterscheiden. Hosted VIF-Verbindungen sind connectType=AWS und Hosted Connections sind connectType=AWSHC.

Die Bereitstellung des MVE zu AWS umfasst diese Aufgaben:

  1. AWS-Standortdetails nachschlagen

    Um einen VXC zu AWS zu erstellen, müssen Sie zunächst die productUid des Ports identifizieren, mit dem Sie sich verbinden möchten.

    Sie können AWS-Standorte für das B-Ende der Verbindung mit dem Endpoint v2/dropdowns/partner/megaports nachschlagen.

  2. Einen VXC erstellen und bereitstellen

    Mit den ermittelten Portdetails können Sie den VXC vom MVE zu AWS erstellen.

    Konfigurationsdetails werden im Body der Anfrage angegeben. Zu den wichtigsten anzugebenden Informationen gehören die productUid des MVE, die productUid des AWS-Ports und die AWS-Konto-ID.

Bevor Sie beginnen, beschaffen Sie sich ein gültiges Zugriffstoken. Weitere Informationen finden Sie unter Erstellen eines API-Schlüssels.

AWS-Standortdetails nachschlagen

Verwenden Sie die API, um die productUid des Ports zu ermitteln, mit dem Sie eine Verbindung herstellen möchten. Die Antwort enthält Details zu den verfügbaren Ports. Sie benötigen die Portdetails, um den VXC zu erstellen.

In der API-Antwort sind verfügbare Ports, die VXCs akzeptieren, als “vxcPermitted”: true aufgeführt.

So schlagen Sie AWS-Standortdetails nach

  1. Erweitern Sie im linken Navigationsbereich den Ordner Locations und klicken Sie auf GET Partner Megaports.

  2. Klicken Sie auf Send, um eine GET-Anfrage an den API-Server zu senden.

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

    Diese Anfrage gibt alle Schnittstellen zurück, die Megaport mit Cloud-Service-Providern hat. Sie können über das Lupensymbol suchen und einen Standort, ein Rechenzentrum oder einen anderen Parameter in das Suchfeld eingeben.

    Der connectType kennzeichnet den Cloud-Service-Provider. AWS umfasst “AWS” für Hosted VIFs und “AWSHC” für Hosted Connections.

    Sie können die Ergebnisse nach connectType und vxcPermitted filtern.

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

    Dieses Beispiel verwendet einen Port in der Region eu-west-2 (London), der VXCs akzeptiert (“vxcPermitted”: true).

      {
           "productUid": "b9dcbdca-b73a-4fc9-9ac9-98cecde81ba2",
           "companyUid": "605cb850-dfb4-4a05-a171-8bf17757b3a2",
           "companyName": "AWS",
           "title": "EU (London) (eu-west-2)",
           "locationId": 90,
           "speed": 10000,
           "maxVxcSpeed": 10000,
           "vxcPermitted": true,
           "diversityZone": null,
           "rank": 378,
           "lag_id": null,
           "lag_primary": false,
           "aggregation_id": null,
           "connectType": "AWS"
      },

Erstellen und Bereitstellen eines VXC (Hosted VIF)

Mit den Port-Details erstellen Sie das VXC zu AWS vom MVE aus.

Sie geben die Konfigurationsdetails im Body der Anfrage an. Die erste productUid identifiziert die MVE-ID und die bEnd: productUid identifiziert den AWS-Portstandort aus der Partner-Megaports-Suche. Sie müssen auch Ihre AWS-Kontonummer in der Anfrage angeben.

Dieses Beispiel verwendet den Verbindungstyp Hosted VIF, connectType=AWS.

Tipp

Um Ihre Anfrage vor der Bestellung zu testen und Preisinformationen zu sehen, verwenden Sie den Endpunkt /v3/networkdesign/validate mit derselben Body-Konfiguration.

So erstellen Sie ein VXC

  1. Erstellen Sie eine Anfrage mit dem Endpunkt POST Buy AWS - Hosted VIF (v3):

    POST {baseUrl}/v3/networkdesign/buy
    
  2. Aktualisieren Sie den Body der Anfrage mit der productUid des MVE, dem Namen des VXC, der productUid des AWS-Ports und der AWS-Konto-ID (ownerAccount).
    Sie können auch zusätzliche Werte ändern, z. B. die Bandbreite, die Vertragslaufzeit, die VLAN-ID, ASN-Werte, authKey und IP-Adressierung. Das vNIC wird durch vNicIndex bestimmt, innerVlan gibt die VLAN-Nummer an, die innerhalb des vNICs verwendet wird, in diesem Fall 103.

    Hinweis

    Die vNIC-Nummer entspricht den folgenden MVE Schnittstellen:

    • vNIC 0 = Schnittstelle 1 auf dem MVE
    • vNIC 1 = Schnittstelle 2 auf dem MVE
    • vNIC 2 = Schnittstelle 3 auf dem MVE
    • vNIC 3 = Schnittstelle 4 auf dem MVE
    • vNIC 4 = Schnittstelle 5 auf dem MVE

    Hier ist eine Beispielanfrage:

[
 {
   "productUid": "{{ mveid }}",
   "associatedVxcs": [
     {
       "productName": "Test AWS VIF MVE VXC",
       "rateLimit": "100",
       "term": 12,
       "shutdown": false,
       "promoCode": "promox3mnthfree2",
       "aEnd": {
       "vNicIndex":2,
       "vlan": null,
         "innerVlan": 103
       },
       "bEnd": {
         "productUid": "{{ awsPortUid }}",
         "partnerConfig": {
           "connectType": "AWS",
           "Name": "Test Megaport",
           "type": "private",
           "asn": 65105,
           "ownerAccount": "XXXXXXXXXXXX",
           "authKey": "123455",
           "customerIpAddress": null,
           "amazonIpAddress": null
         }
       }
     }
   ]
 }
]

Nach dem Senden der Anfrage erhalten Sie eine erfolgreiche Antwort, wenn das VXC bestellt wurde.

Hier ist eine Beispielantwort:

{
    "message": "VXC [0d22feee-8d06-4041-98be-5b827c33c78a] created.",
    "terms": "This data is subject to the Acceptable Use Policy https://www.megaport.com/legal/acceptable-use-policy",
    "data": [
       {
           "createDate": 1709811450016,
           "vxcOrderId": 139933,
           "payerMegaPortId": 190079,
           "nonPayerMegaPortId": 6199,
           "payerMegaPortName": "MVE for VNIC config",
           "nonPayerMegaPortName": "EU (London) (eu-west-2)",
           "payerCompanyId": 1153,
           "nonPayerCompanyId": 117,
           "payerLocationId": 89,
           "nonPayerLocationId": 89,
           "salesId": null,
           "payerCompanyName": "Megaport Lab",
           "nonPayerCompanyName": "AWS",
           "payerMegaPortNsId": 510708,
           "nonPayerMegaPortNsId": 13055,
           "payerVlanId": 0,
           "nonPayerVlanId": 0,
           "payerInnerVlanId": 103,
           "nonPayerInnerVlanId": null,
           "payerApproverName": "name",
           "payerApproverId": number,
           "nonPayerApproverName": "name",
           "nonPayerApproverId": number,
           "payerApproval": number,
           "nonPayerApproval":number,
           "fixedTerm": true,
           "duration": 1,
           "rollover": true,
           "serviceName": "from MVE for VNIC config to EU (London) (eu-west-2)",
           "payerStatus": "APPROVED",
           "nonPayerStatus": "APPROVED",
           "speed": 100,
           "distanceBand": "METRO",
           "intercapPath": "",
           "awsId": null,
           "promoCode": null,
           "dealUid": null,
           "rateType": "MONTHLY",
           "vxcJTechnicalServiceId": 190085,
           "vxcJTechnicalServiceUid": "0d22feee-8d06-4041-98be-5b827c33c78a",
           "provisionDate": 1709811449985,
           "orderType": "NEW",
           "monthlyDiscountAmount": null,
           "discountMonths": null,
           "amazonDirectConnectConfigDto": {
               "type": "private",
               "asn": 65105,
               "ownerAccount": "aws account ID",
               "authKey": "123455",
               "customerIpAddress": null,
               "amazonIpAddress": null,
               "prefixes": null,
               "name": null
           },
           "amsixConnectConfigDto": null,
           "sdrcProvItem": null,
           "rate": null,
           "setup": null,
           "asn": null,
           "bgpPassword": null,
           "usageAlgorithm": "POST_PAID_HOURLY_SPEED_METRO_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": 190085,
               "technicalServiceUid": "0d22feee-8d06-4041-98be-5b827c33c78a",
               "requestedDate": 1709811449985,
               "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": 181633,
               "billableUsageAlgorithm": null,
               "productType": "VXC",
               "provisioningStatus": "DEPLOYABLE",
               "failedReason": null,
               "inAdvanceBillingStatus": null,
               "provisioningItems": [],
               "tags": [],
               "vxcDistanceBand": "METRO",
               "intercapPath": "",
               "marketplaceVisibility": true,
               "vxcPermitted": true,
               "vxcAutoApproval": false,
               "createDate": 1709811450003,
               "terminationDate": null,
               "contractStartDate": null,
               "contractTermMonths": 1,
               "rateType": "MONTHLY",
               "trialAgreement": false,
               "payerCompanyId": null,
               "nonPayerCompanyId": null,
               "minimumSpeed": null,
               "maximumSpeed": null,
               "rateLimit": 100,
               "errorMessage": null,
               "lagId": null,
               "aggregationId": null,
               "lagPrimary": null,
               "market": "UK",
               "accountManager": null,
               "promptUid": null,
               "components": [],
               "attributes": [],
               "aLocation": null,
               "bLocation": null,
               "aMetro": null,
               "aCountry": null,
               "aLocationId": null,
               "bLocationId": null,
               "bMetro": null,
               "bCountry": null,
               "attributeTags": {},
               "createdBy": "b0dedbd2-ecc7-4bad-a13b-6c34b4005115",
               "buyoutPort": null,
               "virtual": false,
               "locked": false,
               "adminLocked": false,
               "bgpShutdownDefault": false,
               "originDomain": null
           },
           "connectType": "AWS",
           "payerConfig": {},
           "nonPayerConfig": {},
           "attributeTags": {},
           "serviceLicense": null,
           "originDomain": null,
           "fullyApproved": true
       }
   ]
}

Das VXC wird nun im Megaport Portal angezeigt.

Für dieses Beispiel wird die AWS Hosted VIF im AWS-Portal-Konto unter Direct Connect - Virtual Interfaces angezeigt. Der Kontoinhaber kann die Virtual Interface akzeptieren und sie mit einem Virtual Private Gateway oder einem Direct Connect Gateway und dann zu ihren VPCs verbinden.

Erstellen und Bereitstellen eines VXC (Hosted Connection)

Mit den Port-Details erstellen Sie das VXC zu AWS vom MVE aus.

Sie geben die Konfigurationsdetails im Body der Anfrage an. Die erste productUid identifiziert die MVE-ID und die bEnd: productUid identifiziert den AWS-Portstandort aus der Partner-Megaports-Suche. Sie müssen auch Ihre AWS-Kontonummer in der Anfrage angeben.

Dieses Beispiel verwendet den Verbindungstyp Hosted Connection, connectType=AWSHC.

Tipp

Um Ihre Anfrage vor der Bestellung zu testen und Preisinformationen zu sehen, verwenden Sie den Endpunkt /v3/networkdesign/validate mit derselben Body-Konfiguration.

So erstellen Sie ein VXC

  1. Erstellen Sie eine Anfrage mit dem Endpunkt POST Buy AWS - Hosted Connection (v3):

    POST {baseUrl}/v3/networkdesign/buy
    
  2. Aktualisieren Sie den Body der Anfrage mit der productUid des MVE, dem Namen des VXC, der productUid des AWS-Ports und der AWS-Konto-ID (ownerAccount).
    Sie können auch zusätzliche Werte ändern, z. B. die Bandbreite, die Vertragslaufzeit, die VLAN-ID, ASN-Werte, authKey und IP-Adressierung. Das vNIC wird durch vNicIndex bestimmt, innerVlan gibt die VLAN-Nummer an, die innerhalb des vNICs verwendet wird, in diesem Fall 666.

    Hinweis

    Die vNIC-Nummer entspricht den folgenden MVE Schnittstellen:

    • vNIC 0 = Schnittstelle 1 auf dem MVE
    • vNIC 1 = Schnittstelle 2 auf dem MVE
    • vNIC 2 = Schnittstelle 3 auf dem MVE
    • vNIC 3 = Schnittstelle 4 auf dem MVE
    • vNIC 4 = Schnittstelle 5 auf dem MVE

    Hier ist eine Beispielanfrage:

[
 {
   "productUid": "{{ mveid }}",
   "associatedVxcs": [
     {
       "productName": "Test AWS over Vnic2",
       "rateLimit": 100,
       "term": 12,
       "shutdown": false,
       "promoCode": "promox3mnthfree2",
       "aEnd": {
           "vNicIndex":2,
           "vlan":null,
           "innerVlan":666
       },
       "bEnd": {
         "productUid": "{{ awshcPortUid }}",
         "partnerConfig": {
           "connectType":"AWSHC",
           "ownerAccount": "XXXXXXXXXXXX",
           "name": "AWS link MVE link 2"
           }
          }
        }
     ]
   }
]

Nach dem Senden der Anfrage erhalten Sie eine erfolgreiche Antwort, wenn das VXC bestellt wurde.

Hier ist eine Beispielantwort:

{
    "message": "VXC [5668c467-17eb-47e3-beba-87b9e7784a17] created.",
    "terms": "This data is subject to the Acceptable Use Policy https://www.megaport.com/legal/acceptable-use-policy",
    "data": [
       {
           "createDate": 1709812459883,
           "vxcOrderId": 139936,
           "payerMegaPortId": 190079,
           "nonPayerMegaPortId": 114147,
           "payerMegaPortName": "MVE for VNIC config",
           "nonPayerMegaPortName": "EU (London) (eu-west-2)",
           "payerCompanyId": 1153,
           "nonPayerCompanyId": 117,
           "payerLocationId": 89,
           "nonPayerLocationId": 90,
           "salesId": null,
           "payerCompanyName": "Megaport Lab",
           "nonPayerCompanyName": "AWS",
           "payerMegaPortNsId": 510708,
           "nonPayerMegaPortNsId": 271398,
           "payerVlanId": 0,
           "nonPayerVlanId": 0,
           "payerInnerVlanId": 666,
           "nonPayerInnerVlanId": null,
           "payerApproverName": "David Sloan",
           "payerApproverId": 41315,
           "nonPayerApproverName": "David Sloan",
           "nonPayerApproverId": 41315,
           "payerApproval": number,
           "nonPayerApproval": number,
           "fixedTerm": true,
           "duration": 1,
           "rollover": true,
           "serviceName": "from MVE for VNIC config to EU (London) (eu-west-2)",
           "payerStatus": "APPROVED",
           "nonPayerStatus": "APPROVED",
           "speed": 100,
           "distanceBand": "METRO",
           "intercapPath": "",
           "awsId": null,
           "promoCode": null,
           "dealUid": null,
           "rateType": "MONTHLY",
           "vxcJTechnicalServiceId": 190089,
           "vxcJTechnicalServiceUid": "5668c467-17eb-47e3-beba-87b9e7784a17",
           "provisionDate": 1709812459853,
           "orderType": "NEW",
           "monthlyDiscountAmount": null,
           "discountMonths": null,
           "amazonDirectConnectConfigDto": null,
           "amsixConnectConfigDto": null,
           "sdrcProvItem": null,
           "rate": null,
           "setup": null,
           "asn": null,
           "bgpPassword": null,
           "usageAlgorithm": "POST_PAID_HOURLY_SPEED_METRO_VXC",
           "costCentre": null,
           "azureServiceKey": null,
           "oracleVirtualCircuitId": null,
           "serviceKey": null,
           "vxc": {
               "serviceName": "Test AWS over Vnic2",
               "name": "Test AWS over Vnic2",
               "secondaryName": null,
               "technicalServiceId": 190089,
               "technicalServiceUid": "5668c467-17eb-47e3-beba-87b9e7784a17",
               "requestedDate": 1709812459853,
               "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": 181637,
               "billableUsageAlgorithm": null,
               "productType": "VXC",
               "provisioningStatus": "DEPLOYABLE",
               "failedReason": null,
               "inAdvanceBillingStatus": null,
               "provisioningItems": [],
               "tags": [],
               "vxcDistanceBand": "METRO",
               "intercapPath": "",
               "marketplaceVisibility": true,
               "vxcPermitted": true,
               "vxcAutoApproval": false,
               "createDate": 1709812459869,
               "terminationDate": null,
               "contractStartDate": null,
               "contractTermMonths": 1,
               "rateType": "MONTHLY",
               "trialAgreement": false,
               "payerCompanyId": null,
               "nonPayerCompanyId": null,
               "minimumSpeed": null,
               "maximumSpeed": null,
               "rateLimit": 100,
               "errorMessage": null,
               "lagId": null,
               "aggregationId": null,
               "lagPrimary": null,
               "market": "UK",
               "accountManager": null,
               "promptUid": null,
               "components": [],
               "attributes": [],
               "aLocation": null,
               "bLocation": null,
               "aMetro": null,
               "aCountry": null,
               "aLocationId": null,
               "bLocationId": null,
               "bMetro": null,
               "bCountry": null,
               "attributeTags": {},
               "createdBy": "b0dedbd2-ecc7-4bad-a13b-6c34b4005115",
               "buyoutPort": null,
               "virtual": false,
               "locked": false,
               "adminLocked": false,
               "bgpShutdownDefault": false,
               "originDomain": null
           },
           "connectType": "AWSHC",
           "payerConfig": {},
           "nonPayerConfig": {},
           "attributeTags": {},
           "serviceLicense": null,
           "originDomain": null,
           "fullyApproved": true
       }
   ]
}

Der VXC wird nun im Megaport Portal angezeigt.

In diesem Beispiel wird die AWS Hosted Connection im AWS-Portal-Konto unter Direct Connect - connection angezeigt. Der Kontoinhaber kann die Hosted Connection akzeptieren und eine private, eine öffentliche oder eine Transit-VIF erstellen und sie mit einem Virtual Private Gateway oder einem Direct Connect Gateway oder Transit Gateway verbinden und anschließend mit seinen VPCs.