连接到一个网络
在您的网络和端口以及虚拟设备之间建立直接、低延迟的连接。
先决条件
-
身份验证 - 提交您的 OAuth2 用户凭据、客户端 ID 和客户端密钥 身份验证。请参阅API身份验证以获取有关如何调用OAuth API来验证和认证您的凭据的说明。
-
获取 Fabric 网络信息 - 向
fabric/v4/networks/search端点发送POST请求,以搜索和检索可用网络的列表。 -
确定您的端口或虚拟设备信息。
-
使用 获取所有端口 端点检索 Equinix Fabric 端口信息。要查找特定端口的信息,请使用 获取指定端口 端点。
-
请确定您的网络边缘设备信息。您需要已配置且已注册许可证的 Equinix 虚拟设备/冗余设备/集群。您可以通过调用 Get Virtual Devices 或 Get Virtual Device {uuid} 来查看可用的虚拟设备和集群。您可以选择设备上的任何可用接口进行连接。但是,如果您未指定接口,Equinix 将自动选择一个。
-
创建从标记端口到 EVPLAN 网络的连接
要从标记端口创建到 EVPLAN 网络的连接,请向 /fabric/v4/connections 端点发送 POST 请求。在请求正文中指定连接的配置详细信息。
| 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, bandwidth, aSide, zSide, notifications, redundancy |
要在生产环境中安全地验证此请求而不创建连接,请参阅生产环境中的测试(API 试运行)。
示例 cURL 请求:
curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "EVPLAN_VC",
"name": "MY-EVPLAN-CONNECTION-1",
"bandwidth": 1000,
"aSide": {
"accessPoint": {
"type": "COLO",
"port": {
"uuid": "9127bb72-5f4f-4517-be74-3af7ce612687"
},
"linkProtocol": {
"type": "DOT1Q",
"vlanTag": 300
}
}
},
"zSide": {
"accessPoint": {
"type": "NETWORK",
"network": {
"uuid": "25f8884e-85e3-4eaa-8ea9-a7ad2ca5b3c2"
}
}
},
"order": {
"purchaseOrderNumber": "1-129105284100"
},
"notifications": [
{
"type": "ALL",
"emails": [
"test@equinix.com",
"test1@equinix.com"
]
}
]
}'
请求正文中包含的参数仅适用于此示例。有关参数及其说明的完整列表,请参阅API 参考。
示例响应:
{
"type": "EVPLAN_VC",
"href": "https://uat2api.npclouda.equinix.com/fabric/v4/connections/01df5124-eed1-4a30-89bb-240c33d5cd12",
"uuid": "01df5124-eed1-4a30-89bb-240c33d5cd12",
"name": "test2",
"operation": {
"providerStatus": "NOT_AVAILABLE",
"equinixStatus": "PROVISIONING"
},
"order": {
"billingTier": "Up to 50 MB"
},
"notifications": [
{
"type": "ALL",
"emails": [
"1eqxnfvuser1@equinix.com"
]
}
],
"changeLog": {
"createdBy": "eqxnfvuser1",
"createdByFullName": "eqxnfvuser eqxnfvuser",
"createdByEmail": "1eqxnfvuser1@equinix.com",
"createdDateTime": "2023-03-27T18:29:53.117Z",
"updatedBy": "eqxnfvuser1",
"updatedByFullName": "eqxnfvuser eqxnfvuser",
"updatedByEmail": "1eqxnfvuser1@equinix.com",
"updatedDateTime": "2023-03-27T18:29:53.117Z"
},
"bandwidth": 50,
"redundancy": {
"priority": "PRIMARY",
"group": "7a58dd05-f46d-4b1d-a154-2e85c396ea63"
},
"aSide": {
"accessPoint": {
"location": {
"metroCode": "DC"
},
"port": {
"type": "XF_PORT",
"href": "https://uat2api.npclouda.equinix.com/fabric/v4/ports/e569f0bb-96d5-6d5e-92e0-387a5c00a379",
"uuid": "e569f0bb-96d5-6d5e-92e0-387a5c00a379",
"name": "eqx-nfv-DC5-L-Dot1q-STD-Pri-1G-JP-2"
},
"linkProtocol": {
"type": "DOT1Q",
"vlanTag": 44
}
}
},
"zSide": {
"accessPoint": {
"network": {
"href": "https://uat2api.npclouda.equinix.com/fabric/v4/networks/ecc81fe0-7a96-4e08-94f2-0ab52fae662b",
"uuid": "ecc81fe0-7a96-4e08-94f2-0ab52fae662b",
"name": "EVPLAN-AMER-1",
"platformUuid": "52c6ec8b-4aad-4167-be6d-1972a12d1b83",
"state": "ACTIVE",
"type": "EVPLAN",
"scope": "REGIONAL",
"location": {
"region": "AMER"
}
}
}
}
}
响应有效负载包含在请求正文中定义的配置参数。有关所有可用参数及其说明的完整列表,请参阅API 参考。
创建从无标记端口到 EPLAN 网络的连接
要从未标记端口创建到 EPLAN 网络的连接,请向 /fabric/v4/connections 端点发送 POST 请求。在请求正文中指定连接的配置详细信息。
curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '
{
"type": "EPLAN_VC",
"name": "MY-EPLAN-CONNECTION-1",
"bandwidth": 1000,
"aSide": {
"accessPoint": {
"type": "COLO",
"port": {
"uuid": "9127bb72-5f4f-4517-be74-3af7ce612687"
}
}
},
"zSide": {
"accessPoint": {
"type": "NETWORK",
"network": {
"uuid": "25f8884e-85e3-4eaa-8ea9-a7ad2ca5b3c2"
}
}
},
"order": {
"purchaseOrderNumber": "1-129105284100"
},
"notifications": [
{
"type": "ALL",
"emails": [
"test@equinix.com",
"test1@equinix.com"
]
}
]
}'
请求正文中包含的参数仅适用于此示例。有关参数及其说明的完整列表,请参阅API 参考。
创建从虚拟设备到 EVPLAN 网络的连接
要从虚拟设备创建到 EVPLAN 网络的连接,请向 /fabric/v4/connections 端点发送 POST 请求。在请求正文中指定连接的配置详细信息。
curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '
{
"type": "EVPLAN_VC",
"name": "MY-VD-EVPLAN-CONNECTION-1",
"bandwidth": 1000,
"aSide": {
"accessPoint": {
"type": "VD",
"virtualDevice": {
"type": "EDGE",
"uuid": "20d32a80-0d61-4333-bc03-707b591ae2f4"
},
"interface": {
"type": "NETWORK",
"id": 7
}
}
},
"zSide": {
"accessPoint": {
"type": "NETWORK",
"network": {
"uuid": "25f8884e-85e3-4eaa-8ea9-a7ad2ca5b3c2"
}
}
},
"order": {
"purchaseOrderNumber": "1-129105284100"
},
"notifications": [
{
"type": "ALL",
"emails": [
"test@equinix.com",
"test1@equinix.com"
]
}
]
}'
请求正文中包含的参数仅适用于此示例。有关参数及其说明的完整列表,请参阅API 参考。