跳至内容

API - 连接到 AWS Direct Connect

使用 Fabric 和 AWS Direct Connect,在您的IBX托管资产和 Amazon Web Services (AWS) 资源之间建立直接的第 2 层连接。使用 API 从端口、Network Edge设备 或Fabric Cloud Router创建连接。

如果您有 AWS 提供的服务令牌,请参阅使用服务令牌连接到目标

API 先决条件

  1. 身份验证 - 提交您的 OAuth2 用户凭据、客户端 ID 和客户端密钥 身份验证。请参阅API身份验证以获取有关如何调用OAuth API来验证和认证您的凭据的说明。

  2. 确定您的 A 面信息。您可以:

    • 要获取 Equinix Fabric 端口信息,请向 /fabric/v4/ports 端点发送 GET 请求。您需要端口 UUID 和链路协议类型(DOT1Q 或 QINQ)。

    或者

    • 要获取您的 A 端服务令牌,请向 /fabric/v4/serviceTokens 端点发送 GET 请求。您需要令牌的 UUID。A 端令牌提供配置连接 A 端所需的必要信息。

    或者

    • 确定您的网络边缘设备信息。通过向 /ne/v1/devices 端点发送 GET 请求来检查可用的虚拟设备和集群。您需要设备的 UUID。向 /ne/v1/devices/{device_id} 端点发送 GET 请求以获取设备的详细信息。您可以选择设备上的任何可用接口进行连接。如果您未指定接口,则连接将自动分配给下一个可用接口。

    或者

    • 确定您的 Fabric 云路由器信息。通过向 /fabric/v4/routers/search 端点发送 POST 请求来检查可用的云路由器。您需要路由器的 UUID。
  3. 确定 AWS Direct Connect 服务配置文件和位置信息。有关应选择哪个服务配置文件的更多信息,请参阅 AWS Direct Connect 概述 页面。

    • AWS Direct Connect UUID - 69ee618d-be52-468d-bc99-00566f2dd2b9
    • AWS Direct Connect 高容量 UUID - de55ca94-df3b-4680-845f-6f7093f76bef
    • AWS Direct Connect 冗余 UUID - 8b5cbdbd-53da-4d37-9bfc-cc988eb522f1
    • AWS Direct Connect - 高容量冗余 - ed48616a-c182-40b4-a462-a78ba812e961

    要查找位置信息,请使用 AWS Direct Connect 服务配置文件 ID 之一,向 /fabric/v4/serviceProfiles/{service_profile_ID} 端点发送 GET 请求。响应中的 metros 对象包含 Equinix Metro 及其关联的 AWS 区域的列表。您需要这两者才能创建连接。

  4. 请识别并验证您的亚马逊账户 ID。登录 AWS 管理控制台并找到您的账户号码。有关如何查找账户号码的说明,请参阅 AWS 文档。向 /fabric/v4/connections/validate 端点发送 POST 请求,以验证您的 AWS 账户 ID 是否可用于在指定都市中创建与所选服务配置文件的连接。

从 DOT1Q端口连接

要从您的 DOT1Q 端口创建到 AWS 的连接,请向 /fabric/v4/connections 端点发送 POST 请求。连接类型为 EVPL_VC

请在 aSide 对象中提供您的端口信息,包括:

  • accessPoint.type as COLO
  • 将端口的 UUID 提供给 port.uuid
  • linkProtocol.type 为 DOT1Q
  • linkProtocol.vlanTag 提供 VLAN ID

请在 zSide 对象中提供您的 AWS Direct Connect 详细信息和位置详细信息,包括:

  • accessPoint.type 设置为 SP
  • profile.type 设置为 L2_PROFILE
  • profile.uuid 中指定要连接的 AWS 服务配置文件。
  • location.metroCode 中指定您要连接的 Equinix Metro 位置。
  • sellerRegion 中指定与 Equinix Metro 关联的 AWS 区域。此信息可从 /fabric/v4/serviceProfiles/{service_profile_ID} 端点获取。请参阅 API 先决条件 端点以了解详细信息。
  • authenticationKey 设置为您的 AWS 账户 ID。

请在请求正文中指定其他连接配置详情,包括bandwidthredundancy。有关参数及其说明的完整列表,请参阅API 参考

示例 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": "<your_connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
  "aSide": {
   "accessPoint": {
     "type": "COLO",
      "port": {
       "uuid": "<port_uuid>"
      },
      "linkProtocol": {
        "type": "DOT1Q",
        "vlanTag": <vlan_ID>
      }
    }
  },
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<equinix_metro_code>"
},
"sellerRegion": "<aws_region_name>",
"authenticationKey": "<amazon_account_ID>"
}
},
"project": {
"projectId": "<project_uuid>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}'

从 QINQ端口连接

要从 QINQ 端口创建到 AWS 的连接,请向 /fabric/v4/connections 端点发送 POST 请求。连接类型为 EVPL_VC

请在 aSide 对象中提供您的端口信息,包括:

  • accessPoint.type 设置为 COLO
  • 将端口的 UUID 提供给 port.uuid
  • linkProtocol.type as QINQ
  • 将内部标签 ID 提供给 linkProtocol.vlanCTag
  • 将外部标签 ID 提供给 linkProtocol.vlanSTag

请在 zSide 对象中提供您的 AWS Direct Connect 详细信息和位置详细信息,包括:

  • accessPoint.type 设置为 SP
  • profile.type 设置为 L2_PROFILE
  • profile.uuid 中指定要连接的 AWS 服务配置文件。
  • location.metroCode 中指定您要连接的 Equinix Metro 位置。
  • sellerRegion 中指定与 Equinix Metro 关联的 AWS 区域。此信息可从 /fabric/v4/serviceProfiles/{service_profile_ID} 端点获取。请参阅 API 先决条件 端点以了解详细信息。
  • authenticationKey 设置为您的 AWS 账户 ID。

请在请求正文中指定其他连接配置详情,包括bandwidthredundancy。有关参数及其说明的完整列表,请参阅API 参考

示例 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": "<your_connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
  "aSide": {
   "accessPoint": {
"type": "COLO",
      "port": {
       "uuid": "<port_uuid>"
      },
      "linkProtocol": {
       "type": "QINQ",
        "vlanCTag": <inner_tag_ID>,
        "vlanSTag": <outer_tag_ID>
      }
}
  },
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<equinix_metro_code>"
},
"sellerRegion": "<aws_region_name>",
"authenticationKey": "<amazon_account_ID>"
}
},
"project": {
"projectId": "<project_uuid>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}

使用服务令牌进行连接

要使用 A 端服务令牌创建与 AWS 的连接,请向 /fabric/v4/connections 端点发送 POST 请求。连接类型为 EVPL_VC

将您的服务令牌 UUID 提供给 aSide 对象。服务令牌提供建立连接所需的所有其他信息。

请在 zSide 对象中提供您的 AWS Direct Connect 详细信息和位置详细信息,包括:

  • accessPoint.type 设置为 SP
  • profile.type 设置为 L2_PROFILE
  • profile.uuid 中指定要连接的 AWS 服务配置文件。
  • location.metroCode 中指定您要连接的 Equinix Metro 位置。
  • sellerRegion 中指定与 Equinix Metro 关联的 AWS 区域。此信息可从 /fabric/v4/serviceProfiles/{service_profile_ID} 端点获取。请参阅 API 先决条件 端点以了解详细信息。
  • authenticationKey 设置为您的 AWS 账户 ID。

请在请求正文中指定其他连接配置详情,包括bandwidthredundancy。有关参数及其说明的完整列表,请参阅API 参考

示例 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": "<your_connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
  "aSide": {
   "serviceToken": {
"uuid": "20d32a80-0d61-4333-bc03-707b591ae2f4"
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<equinix_metro_code>"
},
"sellerRegion": "<aws_region_name>",
"authenticationKey": "<amazon_account_ID>"
}
},
"project": {
"projectId": "<project_uuid>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}

从Network Edge设备连接

要从您的网络边缘设备创建到 AWS 的连接,请向 /fabric/v4/connections 端点发送 POST 请求。连接类型为 EVPL_VC

aSide 对象中定义您的网络边缘设备,包括:

  • accessPoint.type as VD
  • virtualDevice.type as EDGE
  • virtualDevice.uuid as your device's UUID

请在 zSide 对象中提供您的 AWS Direct Connect 详细信息和位置详细信息,包括:

  • accessPoint.type 设置为 SP
  • profile.type 设置为 L2_PROFILE
  • profile.uuid 中指定要连接的 AWS 服务配置文件。
  • location.metroCode 中指定您要连接的 Equinix Metro 位置。
  • sellerRegion 中指定与 Equinix Metro 关联的 AWS 区域。此信息可从 /fabric/v4/serviceProfiles/{service_profile_ID} 端点获取。请参阅 API 先决条件 端点以了解详细信息。
  • authenticationKey 设置为您的 AWS 账户 ID。

请在请求正文中指定其他连接配置详情,包括bandwidthredundancy。有关参数及其说明的完整列表,请参阅API 参考

示例 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": "<your_connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
"aSide": {
"accessPoint": {
"type": "VD",
"virtualDevice": {
"type": "EDGE",
"uuid": "<device_uuid>"
}
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<equinix_metro_code>"
},
"sellerRegion": "<aws_region_name>",
"authenticationKey": "<amazon_account_ID>"
}
},
"project": {
"projectId": "<project_uuid>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}'

从Fabric Cloud Router连接

要从 Fabric 云路由器创建到 AWS 的连接,请向 /fabric/v4/connections 端点发送 POST 请求。连接类型为 IP_VC

aSide 对象中定义 Fabric 云路由器,包括:

  • accessPoint.type 设置为 CLOUD_ROUTER
  • router.uuid 设置为路由器的 UUID。

请在 zSide 对象中提供您的 AWS Direct Connect 详细信息和位置详细信息,包括:

  • accessPoint.type 设置为 SP
  • profile.type 设置为 L2_PROFILE
  • profile.uuid 中指定要连接的 AWS 服务配置文件。
  • location.metroCode 中指定您要连接的 Equinix Metro 位置。
  • sellerRegion 中指定与 Equinix Metro 关联的 AWS 区域。此信息可从 /fabric/v4/serviceProfiles/{service_profile_ID} 端点获取。请参阅 API 先决条件 端点以了解详细信息。
  • authenticationKey 设置为您的 AWS 账户 ID

示例 cURL 请求:

curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "IP_VC",
"name": "<your_connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
"aSide": {
"accessPoint": {
"type": "CLOUD_ROUTER",
"router": {
"uuid": "<cloud_router_uuid>"
}
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<equinix_metro_code>"
},
"sellerRegion": "<aws_region_name>",
"authenticationKey": "<amazon_account_ID>"
}
},
"project": {
"projectId": "<project_uuid>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}'

监控连接状态

fabric/v4/connections/{connection_id} 端点发送 GET 请求以监控连接状态。

equinixStatus attribute valuesproviderStatus attribute valuesAWS Direct Connect StateDescription
PROVISIONINGPROVISIONINGConnection request has not been sent to AWS yet.
PROVISIONEDPENDING_APPROVALOrdering -> RequestedThe connection awaits for acceptance.
PROVISIONEDPROVISIONINGPendingConnection establishment in progress.
PROVISIONEDPROVISIONEDPending -> AvailableThe connection has been accepted.
此页面有帮助吗?