サービストークンを使用したNetwork Edgeデバイスの接続
Service Tokenを使用して、Fabric API を使用して、Network Edge DeviceとFabric上のネットワークリソース間の接続を確立します。
Fabric API の前提条件
-
認証 - OAuth2用のユーザー認証情報、クライアントID、クライアントシークレットを送信します。 認証を使用します。OAuth APIを呼び出して認証情報を検証および認証する方法については、API認証を参照してください。
-
Get Virtual Devices または [Get Virtual Device {uuid} を使用して Network Edge デバイス情報を取得します。冗長デバイスの場合は、プライマリデバイスまたはセカンダリデバイスの一意の ID を選択します。同様に、クラスタデバイスの場合は
node0またはnode1の一意の ID を選択します。デバイスが冗長化/クラスタ化されている場合でも、接続は1つになります。 -
すべてのサービス トークンを取得 エンドポイントを呼び出して、使用可能なサービス トークンと許可された接続設定を取得します。
サービス・トークンを使った接続
Service Tokenを使用してNetwork Edge仮想デバイスとFabric上の別のネットワークロケーション間の接続を作成するには、/fabric/v4/connectionsエンドポイントにPOSTリクエストを送信します。リクエストの本文で、どの仮想デバイス、サービス・トークン、および接続設定を指定します。ネットワークの場所の詳細は、サービス・トークンによって提供されます。
サービストークンは、複数の受信者に送信することができ、どの受信者も1回だけ使用することができます。
| POST /fabric/v4/connections | |
|---|---|
| Method | POST |
| Endpoint | /fabric/v4/connections |
| Headers | Authorization, Content-Type |
| Path Parameters | Not applicable |
| Query Parameters | Not applicable |
| Body Parameters | type, name, order, redundancy, bandwidth, aSide, zSide, notifications |
この例では、a サイドは Network Edge デバイスであり、サービストークンは z サイドの宛先用です。
サンプルcURLリクエスト:
curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "EVPL_VC",
"name": "Conn-1",
"order": {
"purchaseOrderNumber": "1-129105284100"
},
"bandwidth": 1000,
"aSide": {
"accessPoint": {
"type": "VD",
"virtualDevice": {
"type": "EDGE",
"uuid": "fd5342f3-d067-4683-a24f-be952279630b"
},
"interface": {
"type": "NETWORK",
"id": 5
}
}
},
"zSide": {
"serviceToken": {
"uuid": "20d32a80-0d61-4333-bc03-707b591ae2f4"
}
},
"notifications": [
{
"type": "ALL",
"emails": [
"test@equinix.com",
"test2@equinix.com"
]
}
]
}'
リクエストボディに含まれるパラメータは、この例に特有のものです。パラメーターの全リストとその説明については、APIリファレンスを参照してください。
回答例
{
"type": "EVPL_VC",
"href": "https://api.equinix.com/fabric/v4/connections/ebc37e2e-c36b-4e93-86a4-fc4efce7abc8",
"uuid": "ebc37e2e-c36b-4e93-86a4-fc4efce7abc8",
"name": "Test ST",
"state": "ACTIVE",
"operation": {
"providerStatus": "AVAILABLE",
"equinixStatus": "PROVISIONED"
},
"notifications": [
{
"type": "ALL",
"emails": [
"testNEuser2@equinix.com"
]
}
],
"account": {
"accountNumber": 270235,
"orgId": 92794,
"globalOrgId": "0016u000003JZ55AAG"
},
"changeLog": {
"createdBy": "testNEuser2",
"createdDateTime": "2022-10-05T19:37:12.748Z",
"updatedBy": "testNEuser2",
"updatedDateTime": "2022-10-05T19:37:12.748Z"
},
"bandwidth": 50,
"redundancy": {
"group": "b64dad2a-2763-4084-bc50-b36ef4f67137",
"priority": "PRIMARY"
},
"isRemote": true,
"direction": "INTERNAL",
"aSide": {
"accessPoint": {
"interface": {
"uuid": "11fd6067-149f-4142-a5b4-54a8dd6f53fe",
"id": 6,
"type": "CLOUD"
},
"type": "VD",
"account": {
"accountNumber": 270217,
"organizationName": "eqx-nfv"
},
"location": {
"region": "AMER",
"metroName": "Ashburn",
"metroCode": "DC"
},
"virtualDevice": {
"href": "https://api.equinix.com/ne/v1/devices/3539f96c-7f67-4696-90f3-7b6d2fdcde5f",
"uuid": "3539f96c-7f67-4696-90f3-7b6d2fdcde5f",
"name": "testing1234",
"type": "EDGE"
}
}
},
"zSide": {
"serviceToken": {
"uuid": "e05f4f23-d098-4d7c-a9ca-c2897b465107",
"account": {
"orgId": 92794
}
},
"accessPoint": {
"type": "COLO",
"account": {
"accountNumber": 270235,
"organizationName": "testNEuser2-270235"
},
"location": {
"region": "AMER",
"metroName": "Ashburn",
"metroCode": "DC"
},
"port": {
"href": "https://qa3api.corp.equinix.com/fabric/v4/ports/c791f8cb-59d0-9d00-8ce0-306a5c00a4ee",
"uuid": "c791f8cb-59d0-9d00-8ce0-306a5c00a4ee",
"name": "testNEuser2-DC6-NL-Dot1q-STD-SEC-10G-JN-216"
},
"linkProtocol": {
"type": "DOT1Q",
"vlanTag": 553
}
}
}
}
レスポンスペイロードには、リクエストボディで定義された設定パラメータが含まれます。使用可能なパラメータの一覧とその説明については、API リファレンス を参照してください。
接続の監視
接続ステータスを監視するには、Get Specified Connection API エンドポイントを使用します。